we’re using the MpAlarmXCore and MpAlarmXHistory FB’s in our application and with the export command of MpAlarmXHistory we’re exporting the alarm history to csv. Here’s an example of the original history report:
Unfortunately MpAlarmX does not directly provide any options to change the export format (as @xabier.zaldua has mentioned). You could however use the “Query” functionality of MpAlarmX to retrieve exactly the data you are interested in (which would allow you to process the data pretty much however you want).
Your query could for example be configured like this:
With your Type and PV configuration looking like this (you can change sizes based on your needs):
When you then execute this query you should get information similar to this entered into the PV:
This information you could then process however you need it (e.g. upload to a database, webpage, …, save it to a file, dataobject, …). Please note that the newest alarm is always entered into the lowest index of the array (in other words, newest entry is “on top”; I guess same as you wanted in the CSV file), this order cannot be changed. You can also either make your array big enough to fit all alarms you are interested in or make the array smaller and use the “Next” command of the Query-FB (GUID: 86b51f00-5da3-4124-98bb-3e3c8b5f9c47) to iterate through the complete alarm history.
Of course, you could also implement some sort of post-processing on the system you want to view the CSV file (eg. a PowerShell or Python script), but that relies on all systems having this “post-processing functionality”…
I hope this can help you at least a little bit!
PS: I’m not an expert when it comes to writing files, so I’m really sorry that I cannot provide you any more guidance in this direction…
@xabier.zaldua Hm, I’ve already though so since I couldn’t find anything too in the configuration of MpAlarmX and MpAlarmXHistory. Thanks for confirming.
@michael.stockhammer That’s a good workaround idea, we will check this possibility.
Writing a post-script to format the file on my machine would be little work, but this would require to have the script on all service technician machines too. Thank you very much!