Jump to content

Recommended Posts

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...