Sign in to follow this  
Followers 0
snowmaxx

PLC 5/80 processor scan time

6 posts in this topic

OK, so I inherited a PLC 5 from another company that did work before we did. the problem I am having is that the processor scan time is averaging 506 ms. Are there any tweaks I can do to make it run faster? It is an enhanced processor, not sure if that means mush at this point. Any information I need to provide?

Share this post


Link to post
Share on other sites
Quite a bit. First thing to do is to identify what it is spending so much time on. First, go into the system status and look at the MCP section. How many master control programs do you have? Second, go to the STI section. Look at how often the STI is firing (or if it has one), and also although it doesn't give you an "average" scan rate, look at how long the scan is. Look if the "overlapping" minor error bit is triggered. Let's start with that stuff. We'll move on from there after that.

Share this post


Link to post
Share on other sites
Post the .rsp file and fourm members can help you look.

Share this post


Link to post
Share on other sites
well, I am not sure all what is causing the problem, however I have identified a large number of loops programmed into the logic. Some of the loops execute 800 times. It very much looks like a PC programmer programmed a PLC. That is where my initial thought of the large scan times came from. the max scan time on the scan times tab was 5005 ms and the last scan time is generally close to the 506 ms i was talking about. I will get more information from the STI tab when am hooked up to the PLC again tomorrow. I don't recall the overlapping error was triggered, but I will look.

Share this post


Link to post
Share on other sites
If you can I'd take that 800 time loop out and see what happens to scan time, just as a test. You may want to recode the loop so it executes 25 times per scan and takes 32 scans to complete. This will require some thought on your part to not use partially processed data. Also paying atention to location of things on rungs can produce some improvement. Use of CPT versus FAL is another one.

Share this post


Link to post
Share on other sites
Wow, that's a good indication. Can you improve on the loop in the first place, even such as replacing it with block instructions like COP or FAL? What about trimming things out of the loop (removing loop constants)? Second, can you pipeline the loop as has been recommended (break it up over several cycles)? Generally the common things (basically, strength reduction, dead code elimination, etc.) will give you roughly 25% improvements on most programs. But you need almost a 100 fold improvement to get this thing down closer to reality so it's going to require some heavy duty algorithmic improvements, not just the standard code improvement tricks that compilers typically do (and hence the reason that PC programmers tend to make lousy PLC programs...they mostly assume "well, the compiler will optimize it").

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