nktasingh Posted June 30, 2015 Report Share Posted June 30, 2015 Hello! What's the difference in execution time between reading data from a data table and reading data from the PLC's memory? I'm trying to write a function that could use different parameter values, not sure if I could just read the parameter values from the data tables each scan or if that would significantly slow the PLC scan time. Otherwise, would reading the data table data into the PLC's memory just once, then referencing those operands be more efficient? The problem with this method would be then maintaining that memory. Thanks for your opinions! Link to comment Share on other sites More sharing options...
cantcliff Posted July 1, 2015 Report Share Posted July 1, 2015 More of a personal preference really. There are advantages and disadvantages to both. Time probably isn't an issue as the time to run the FB is probably far faster than you think it is. If you want to check your scan time put SI 0 (scan time with a 1ms resolution) on the screen you're using and see what the effect is on scan time by reading each pass or not reading each pass. Link to comment Share on other sites More sharing options...
nktasingh Posted July 8, 2015 Author Report Share Posted July 8, 2015 Thanks! I ended up running a test and the PLC scan jumped from 3 to 4 mSec when I had 6 subroutines reading from a data table each scan. Doesn't seem like the best implementation choice for many routines, thanks for your input! Link to comment Share on other sites More sharing options...
cantcliff Posted July 9, 2015 Report Share Posted July 9, 2015 Your scan time may have been 3.97 ms and adding the additional functions may have only increased it to 4.04 ms. The resolution on the scan time is only 1 ms. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now