mandeep0921 - 2020-10-10

I am working with Pi and a IO module. The IO module send CAN messaged to my PI where i calculate different parameters with output as: BOOL, INT and REAL values.

I want to store all this data and download or save it in raspberry PI ( my PI does not have SD card slot).

Now, to log data I used CAA file library ( in CFC format where I used file open, write, flush and close in a sequence. But it does not create the file in PI.

I have seen the CAA examples but those are in structred text and I bit confused on how to use it with my current program therefore I am trying to use function blocks instead.

1>>>>> Is this the write way to go and do logging?

2>>>>> In order to store and write data are there any setting i must change in PI? things i must do to ensure files are written and read without issues?

3>>>>> If my way is correct is there a particular way (file open,write, flush and close) should be put together? like it works in sync or something? ( Since i UNderstand that file must be first opened, written, flushed and then closed. But do i need to keep the xExecute of File.Write high the whole time, things like this I am curious if I am doing correct or not.

My main objective is to get all those variables into a single or multiple files then be able to get it to PC. if there is other way i can try please propose it so i can research and work on it.

Note: I have tried AC_datalog but very confused on how to use it despite reading all of datalogging threats.

Thank you for your time and suggestions