How to log every bit of data send or received by automation pc

Hi
i want to log every bit send or received by the automation pc in automation studio 6. I am interested in getting data value, event ID and timestamp. what can be the simplest and efficient way to do that without introducing significant delay or overhead to the system.

Regards

Hi AAK,

When you say, “every bit sent or received”, do you have a specific communication interface in mind?

In general, the easiest way to add your own log messages is to write to the User logbook with the ArEventLog library, or a wrapper of that library (see this post for example). Another option is to create your own logging system (i.e. by writing to a text file).

You would call ArEventLogWrite() in your program when you receive or send data. This shouldn’t create any performance problems based on my experience. I’ve had projects where this function is called many times in one cycle. However, keep in mind that your log may fill up very quickly if you are logging a lot of data.

2 Likes

Hi Markus, thank you for sharing my wrapper EasyLog Library.

AAK, if you have any doubts about how to use it, please let me know.

Best regards.

2 Likes

Hi Raul thankyou so much for the reply. I am able to get some values in the log using your wrapper EasyLog Library. Can you please guide me is there a way to save this logger module in .csv or .xlsx file so that i can use it for analysis? thanks in advance

Regards

Hi there,

if you want to capture data for analysis, I recommend another approach than the logger: a datalogger:

Best regards

1 Like