Hi all, I got a request to obtain all of the historical data of our alarms from the last 3 months and if possible download to a CSV/Excel file. Is this possible? And if so, how?
You'll need to script something to use system.alarm.queryJournal
to fetch the alarm data. The return format is a list of pyAlarmEvents
, you'll likely need to loop through this to pick out the information you want to export.
From there, convert it to an excel or csv format, and write it to a file using system.file.writeFile
If you assemble your data you plan to export into a dataset, you can pass it to system.dataset.exportExcel
or system.dataset.exportCSV
to have Ignition handle the conversion and file writing for you.