Lost_Scavenger Posted January 30 Report Posted January 30 Hi, I am saving data in a CSV for a project and I wanted to associate time to my data. To do so, I used _CurrentTime internal variable as a time mark. In simulation, _CurrentTime is a direct increment of my scan time (2ms). When I run the code on my PLC, the _CurrentTime is refreshed at every 100ms. I can output about 10 data in the file per 100ms. This is a problem since about 10 data points are associated with the same time point now. Is this normal ? Am I missing something ? I understand that writing to the file will be slower in real life due to delays and SD card speed which will affect my number of point per sec, but the refresh time of a system variable ? I tried to look for an answer, but nothing comes up. I don't understand why it's not resfreshed since the code is executed faster than 2ms. Is there any other way to synchronise time with execution time ? Any help on this would be greatly appreciated. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.