Jump to content

Data Table Write Speed


Recommended Posts

We have an application that requires frequent (1 to 4 times a second) logging of time, target, and actual value.

Is there any difference in speed of writing to a data table compared to writing to MIs?

I am wondering which is the best way to perform the write tasks to the data table, either:

1. Every time we receive a new actual value (which happens 1 to 4 times a second) we write the current RTC, target and actual value into the table, or

2. Store the sequence of values into MIs and then once we have say 10 then write all of them into the data table instead.

Furthermore, we'll eventually be needing to get this data out into a PC over ethernet (within a minute of it being recorded), probably with a c# program; is there any significant difference between pulling the information out of data tables vs a sequence of MIs?

Link to comment
Share on other sites

  • 2 months later...

MI's are faster and more robust. Datatable functions are not immediate or even guaranteed under all circumstances. Try putting 4 or more data table functions on one ladder and enable them with a positive transition. I have not used version 9 so this may have been addressed.

However,

The DT is the best way to list several items and then makes it easier to send them all to the PC.

I would use one DataTable copy function and make it a FIFO. Then when the table is full, send it all to the PC and clear the table.

2 lines of ladder.

If your data is in an array of MIs it is easy to copy the data into the first row of the datatable and then clear the data in the array.

Shift the data in the datatable down one row and continue.

If there is data in the last row, send the whole table to the PC and clear the datatable.

  • Upvote 1
Link to comment
Share on other sites

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.   Paste as plain text instead

  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...