Data/ Event Logging Capability

More
2 months 2 weeks ago #436 by Daniel De Renzy
Hi, I am running LogiCad3 with Procon Web IoT on a Revolution Pi Core 3 (designers installed on windows PC, runtimes installed on Rev Pi). I am completely new to ST programming and was wondering what are some common methods for exporting data to either a text file or SQLite database.

Basically whenever an event is triggered I would like to export the date, time, event type, and sensor readings for access later and use with excel.

I have tried reading through the logicad help and found the system_open and system_write functions which can be used for creating, opening, and write data bytes to a file. This could work but I'm not sure how to convert strings and dt data into a byte array

Any help you can provide would be greatly appreciated.

Please Log in or Create an account to join the conversation.

More
2 months 3 days ago #441 by Walter Zögernitz
Hello Daniel,


a basic implementation how to log into a file can be found within this topic:
www.logicals.com/de/support/forum/st-edi...new-line-in-file#440

For creating your own style of logging entrys you only need to convert the single informations (date, time, event, variable values,...) into a string and write it down to the log file.


kind regards
Walter

Please Log in or Create an account to join the conversation.

LOGI.CALS AUSTRIA

Address

Europaplatz 7/1,
3100 St. Pölten

LOGI.CALS GERMANY

Address

Postfach 1306,
40738 Langenfeld
© 1987 - 2019 logi.cals GmbH