Sign in to follow this  
Followers 0
Penko Mitev

PLC manual scanning time

7 posts in this topic

Hello guys! I am really lacking the "General PLC questions" sub-forum, so I will use this one. What I am interested in, what is the real purpose of increasing the scanning time of the PLC manually? For exampe, Schneider Twido is extremely fast(1000 instructions are executed for 1 ms), but there is possibility to manually assign scanning time(2 - 150 ms). So, what can this be used for? What is the real aim as I don't understand where is useful. Regards, Penko

Share this post


Link to post
Share on other sites
I can't comment on the particular PLC you mention as it's a rather obscure one, but... There are two reasons for doing so that I can think of. First, if the CPU within the PLC is responsible for processing both I/O AND solving the program, then many have a mechanism to allow you to allocate more time to doing I/O vs. solving the program. This may be necessary with nondeterministic I/O. For instance PLC/HMI communications may get very bogged down if you don't allocate extra CPU time to processing the HMI communications. Second, and this is more common, there are times where you need a definite scan time. For instance, control loops and totalizers are two places where a definite, consistent scan rate is a definite advantage.

Share this post


Link to post
Share on other sites
Most PLCs have a scan time that is 'standard default' as a maximum. After that maximum has timed out, the PLC raises an alarm. Increasing the maximum scan time increases the time taken before an alarm for 'exceeded maximum scan time' is raised. Most I have seen have 100ms as the maximum scan time. By the way, it would be a pretty serious program with heaps of scan time consuming floating point maths, FBs (they take a lot of resources), SCL (painfully slow and resource consuming), and/or massive amounts of PID loops to cause the scan time to go over with modern high powered PLCs. Edited by BobB

Share this post


Link to post
Share on other sites
You can fix the scan time to a specific value so that you can know for certain that each scan is a fixed time apart. PLC scan is variable based on which logic is active or not at any given scan. So this allows you to set up, say for example, 100ms, so you know this scan is exactly 1/10 of a second after the last. Typically for timing purposes. BobB is talking about what we call a watchdog timer, which checks to see if scan time exceeds a set warning level. Not fixed scan cycle time.

Share this post


Link to post
Share on other sites
Thank you for the explanations guys! It now really makes sense what can this be used for.

Share this post


Link to post
Share on other sites
Just to add a counterpoint to BobB. I used to think that anything over 100 ms would not work very well also. I was in the meterial handling world where scan time routinely ran in the 10 to 30 ms. Fast Forward a few years and I'm in a batch process environment and the first ControlLogix L63 CPU program I open had a continuous routine with a scan time of 1472 ms. I thought something was wrong until i realized that everything time critical was in a periodic task and it was the math and indirect addressing of multiple constructs which made the scan time so large.

Share this post


Link to post
Share on other sites
The continuous task gets interrupted by everything else so that is not unusual. I remember a demo for the L5K task monitor at an AB seminar where the continuous task was running with some ridiculously long scan time. The presenter changed it to a periodic task with a period of 1/4 of what it was taking before and it then scanned in only a few mS, so the task scanned four times in the amount of time it ran once as the continuous task and CPU usage went down. While I realize this was a demo designed specifically to demonstrate the task monitor, it was nevertheless an enlightening demonstration. Edited by Alaric

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0