Mapp Data Recorder Does Not Maintain File Count

Hello all,
I recently started experimenting with MpDataRecorder as a quick method to store machine data.

I have found that after a power cycle the Info.FileCount reverts back to 0. This results in creating a new set of files getting created. E.g. If I power cycle 5 times there will be a total of 6 files created regardless of what the Maximum number of files is set to. If these files are not manually deleted they could fill up the partition.

Setting the FB as retain results in a page fault. It wouldn’t be the greatest solution anyway due to retained memory getting reset on occasion such as a transfer.

Additional Info:
Mapp Services V5.24 (have tried several versions with no difference)
Maximum number of files set to ‘3’ in DataConfig.mpdatarecorder

Hi Curtis, it is because number of files is related to current record command according to ASHelp. B&R Online Help So I think you have to use FileIO library to manage number of your files then.

Hi @c213227 Curtis Weyenberg,

It looks like you got a good answer from Jaroslav, and it has been a couple of weeks since the last activity on this post. You will need to use FileIO (DirInfo is the most straight-forward, DirRead requires parsing) to keep track of the number of files and remove old ones if you intend to only retain a certain number of files.
If the answers helped you with your question, can you help the next person with the same question by marking the solution on the information which helped you the most. If you still have open questions on this topic, can you provide an update?