Scan Times

gbradley

Lifetime Supporting Member
Join Date
Apr 2002
Location
Corona, Ca.
Posts
1,637
I have an old Koyo DL405 (D4-430) and the Scantime is around 74 milliseconds.

The program has less than 300 rungs, but I probably could go in and clean it up some.

How slow is this in todays terms?

If I pared dowm the program to just a few rungs, how much would this reduce the scan time?
 
74ms may be just fine if it doesn't impact your machine response time. For me, that is way too long. I am running DL-250s with 3300+ steps (1020 rungs) and I am getting 26-29ms with one time scans as high as 50ms (this occurs when I access the variable change routines which are math intensive). My program is very heavily coded with Block/Stage programming to keep the scan time low. I need to react quickly when filling containers by weight so that I don't overfill them.

Although rung length is a factor, the ones to be more concerned with are math functions. They take the most time to process. You need to look at how many math functions you are doing and ask yourself "do I have to do this every scan?" Another area that can slow you down is for next loops.

If you process is working fine though, I don't think I would mess with it.

Bob
 
Last edited:
Thanks for the tip on the math functions.
I am moving a cylinder about .275 inches per second, so my scan time can cause a variation of up to .020 inches.
I'm gonna look and see if I can remove any unnecessary calculations.
 
You're welcome.

A 0.020 deviation can add up real fast if that occurs every second. I assume you are pressurizing the cylinder at a set rate. Do you have any sensors to give you feedback on how quickly/slowly the cylinder is extending? Based on your rate, can I assume this is hydraulic, not pneumatic?

I have been using DL-250s for about 6 years now. If you need any help let me know. The code can't be too much different for the 430 (considering they both use DirectSoft for programming).

Bob
 
Are you sure that your scan time isnt 7.4 ms. rather than 74 ms?

Scan is more dependent on the number and type of insturctions. You could have 600 insturctions in 300 rungs, or you could have 2000 instructions in 300 rungs. Generally though 300 rungs shouldnt cause such a long scan time. The PLC manual list execution times for each instruction used. A lot of math or lookups etc would cause a longer scan time.

I have a program with 1800 instructions running at 12ms scan time. If your scan time is really 74 ms I would say that someting is amiss.

Mike
 
Bob,

I guess your right. But 74 ms just sounds a little long to me. I would imagine the default on the watchdog timer is shorter than this.

Mike
 
I actually went online to check it out PLC Diagnostics Scan Time
The
Current was 72 ms
Maximum was 78 ms
Minimum was 52 ms
I was watching it run, and the scan time was changing depending on which segments were on.
 
That's normal to see it flickering for the reason you just stated. I agree with Mike though. I am very curious to know what is in that program to have such a high scan time. As you were able to notice, this is giving you a deviation in the linear motion. If you can react faster, then that deviation will drop.

Bob.
 
gbradley

I'm going to suggest you program may not be making good use of subrutines. One issue in particular is inital setup for timers counters loading of static values etc. You know.. stuff that is done on the first scan only. Consolidate all this code and place it in a sub under the end statement. SP0 would then execute a goto sub. That way the code isnt being read on each scann.

The 1st scan on my program is 200+ ms, then it drops to 12 ms. I know this because I had to set the watchdog timer to 240ms before i stopped getting errors.

Mike.
 
Interesting the application, by the fact of demand balance resorts.

You can present the system, describe?

IHMO, perhaps do not be necessary acquire to varíable of the way that does. Can have alternative.
Sincerely talk, the application in in the foreground of vision can demand mathematics, but be converted for another axis físíc, time, action, reaction.. Alternate the thought, associates the variables: time, space, acceleration, energy, concentration, .
It can find a new solution

Alternative, instrutions binary they are more quick:

binary shift left = multiplication X 2 (n bits)
binary shift right = division X 2 (n bits)
Basically turned out, of the factor 2 (binary)

Sucess it project! :cool:
 
The 430 is the slowest of all the 405 CPUs and some of the math instructions are very time consuming. Other factors can impact scan time as well such as certain modules. The D4-HSC can add 5-6 ms to your scan time for each module of that type in the base. Follow this link which will show instruction time for the 405 series CPUS from the online manuals. Hope this helps.

Andy

www.automationdirect.com/static/manuals/d4user/appxc.pdf]
 
Mike is probably right. Scantime can be reduced a lot just by arranging the program. I am sure you wouldn't need all of the 300 rungs to run on the same scan.

- You can arrange some rungs as a group based on some condition and run them only when the condition is true.
- Use Jump, Label instructions.
- If possible, use a lot of one shots that only runs for one scan.
- Do not use double words if not needed. Math operations with double integers have high execution time.
- If you are using timed interrupts, make sure to keep it short and if possible increase the time. Timed interrupts almost double the overall scantime.

But most of it depends on the PLC and the processor as well. Try to download a simple program with 1 or 2 rungs and watch the scan time. If it is 5ms or more than the processor is slow and you cannot do much changes in your program. If it is lesser than you can very well make some changes on your program to reduce the scantime.

Hope this helps!
 

Similar Topics

Hi please can anyone help. A PLC system has an input filter delay of 6ms, relay outputs with a quoted delay of 10ms and, when monitored, the...
Replies
1
Views
1,223
I have a 1747-L552 that has been getting occasional scan times over 1 second. The normal average on this processor is around 20ms but about once a...
Replies
3
Views
1,554
I have a printing machine running RIO with ASB modules in each section talking to a SN series B card in a SLC 500. I converted the Panelview...
Replies
6
Views
2,327
I have a large program with a high scan time I am looking to reduce the scan time so I can pick up a prox. on a screw shaft with a fast sink card...
Replies
10
Views
3,025
I have a compact logix controller that contains one main program consisting of 15 -20 subroutines IF I click on that one main program and select...
Replies
1
Views
3,135
Back
Top Bottom