Questions about missing XML files?

Hello:
Currently the customer is using the MpRecipe function block to save recipes directly to the F drive in XML format. Currently there is a device in operation for two months, in the morning of 3/19 at about 3-4 am, the end customer due to servo failure reasons, the PLC 24V power unplugged, and then reboot after, found that it can not be normal loading recipe parameters. After the customer’s engineer accessed the F disk via FTP, he found that the recipe XML file that should have been saved in the F disk had been lost, but the audit folder that was saved there still existed normally. Check the mprecipexml function block alarm-1064302419 in the loger at that time after power failure and restart, is it possible that the XML file is lost in the case of power failure? The dump file of the system is shown in the attachment, please help me to see it. Thanks!
BuR_SDM_Sysdump_2025-03-19_13-56-9.zip (2.1 MB)

Hi!

File systems usually don’t simply “lose” data, even during power failures.

However, there are some situations where things may go wrong. Mainly during write operations! As one example, if there was an MpRecipe “Save” command that has been interrupted by a power failure, the file may be incomplete. Unfortunately (as far as I know) MpRecipe does not write “backup” files before saving to the original file.

For example (note: I do not know if this is the exact process of MpRecipe internally, but it should be quite close):

  1. “Save” command given on MpRecipeXml/Csv
  2. Command started, information about new file prepared in memory (DRAM)
  3. Old recipe file deleted
  4. Power-failure
  5. Not executed anymore: MpRecipe writes the new/changed file

MpRecipe (like most mapp Services function blocks) is executing file operations in the background (idle time). Due to priority reasons other libraries and the cyclic system can “interrupt” the MpRecipe process, which can lead to above situation (if the “interrupt” happens at the wrong time).

There may also be other reasons (outside of MpRecipe) but these would be even more guessing (like the “FAT” or CF being damaged, …).

Please note that this is just a guess. Investigating would be difficult as MpRecipe does not write log-entries when commands are started/finished.

1 Like

Thank you for your reply.