Sign in to follow this  
Followers 0
mitnick

Scan time

4 posts in this topic

Hi, I want to optimize my PLC scan time, but i want to understand how scan time works really. If I have many rung or instructions with a always OFF, the scan time is affected? if yes, only for check the state of the contact, output? If I have Subroutine, the subroutine is only scanned when a SBS is true? and the scan time is not affected when not called? Thanks

Share this post


Link to post
Share on other sites
When you have an open (OFF) contact or condition on a rung (always off or any contact) the scan stop to read that rung and go to the next one. So if you want to optimize scan time with this, if you have many contact in a rung, put the one that is more often "OFF" in the beginning of the rung. You should check in the programming manual of your PLC, there is more info in this, scan time of different instruction, etc. Edited by pfort

Share this post


Link to post
Share on other sites
Another thing that you can use to reduce scan time is task switching. If there are blocks of code that do not need to be executed you can use task scheduling with the TKON and TKOF instructions to only execute them when they are needed. The only drawback to this approach is that your scan time can vary widely depending on how many tasks need to execute. I just finished a CP1L-EM30 program that is 7.5k with an average scan time of about 2ms. It is broken up into 9 separate tasks and 14 subroutines. Only two of the tasks execute on every scan. Section 5-2 of the CJ2 manual (W473) has a good writeup on tasks.

Share this post


Link to post
Share on other sites
Not quite, the output side of the rung is still processed. I think this is a common mis-understanding of using the Always Off contact. Yes, the scanning of the inputs after the always off are no longer scanned, but the output side must be. How else does a standard output coil switch off?

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