Processor Overload/Overwork

lawebster

Member
Join Date
Dec 2006
Location
Baton Rouge, Louisiana
Posts
16
What is a quick way to tell and monitor if a processor is on the verge or had reached saturation? Have written some extensive code with multiple nested branches and not sure if it is too much.

Using a AB PLC-5/20

Thanks
 
Watch your scan time.

Nesting too deeply will either be disallowed when you try to assemble edits, or will just fault the processor. Similarly, having too many nested subroutine calls will generally fault the processor at run time (the compiler doesn't know how many are actually nested).

Another thing, is that on AB PLC's, there is a difference between NESTING branches, and just extending them down (or up).

Paste the following two rungs into Logix to see what I mean:

Bad example:
BST XIC N7:0/0 NXB BST XIC N7:0/1 NXB XIC N7:0/2 BND BND OTE N7:0/7

Proper way of doing that:
BST XIC N7:0/0 NXB XIC N7:0/1 NXB XIC N7:0/2 BND OTE N7:0/7
 
I have nested like your second example just worried about the number of branches on each

The processor has Max Overall S:9 and Last Overall S:8, I assume if the Last exceeds Max I'm in trouble..
 
No, the max scan time will almost always peak higher than the last scan time. The 'Max' scan time is affected by everything in the program, including how many instructions need to be evaluated. I'm pretty sure that AB PLC's short-circuit logic (if a rung starts out as false, the rest of the logic is ignored, and the output type is evaluated... If it is direct ie. simple OTE, the OTE is set false.)

The max scan time can also be bumped up during online edits, when the CPU is shuffling around bits and bytes.

Honestly, it would be tough to see the 'Last' exceeding 'Max' by much, since 'Max' is always updated to the longest single scan since the CPU enters run (or is it powers up? or just when Max is manually cleared? I forget).

I just keep an eye on my approximate scan times, with an acceptable limit in my mind. It depends on what I've got the PLC doing, but generally I try to keep scan times under 25ms or so on PLC-5's. If I make some edits, and see my scan jump up suddenly to 35ms, I'll worry. Then again, that would be a severe edit.

Things that absolutely WILL kill scan times would be, oh, say, having a Discrete Input Interrupt on a block transfer module... <shudder>. Yes, I did that, by accident once, and scans went from 27ms to 12000 and tripped the watchdog.
 
No, as long as the last scan time never exceeds the watchdog timeout limit (S:28), you're okay...that is as long as the process can tolerate a slower scan time.

The more code you stuff in that PLC5, the slower it will scan. Some applications don't mind much, but others do.

Take a look at the max scan time before and after your changes.

Note that you can clear (enter a zero into S:9) for that max scan time value while online and it will start again recording the longest scan time.

It takes quite a bit of code to make a noticeable difference in a typical PLC.

In the book "Enhanced and Ethernet PLC-5 Programmable Controllers User Manual" in appendix D page 30 the instruction execution times are given for each instruction.

EDIT: 2 Slow....:)
 
Last edited:

Similar Topics

Hi, Is it possible to for an RIO with Flex 5000 series module, e.g. 5094-AEN2TR, to communicate with an 1756-L72E processor.
Replies
1
Views
92
Is there anything I Should take into account while updating the firmware on a safety processor? I have a 1756-L61S running version 17 and need...
Replies
0
Views
101
Hello all, I have been experiencing dropping network connections on the Co Pro quite a bit, 3 times a month. The remedy that we do to bring the...
Replies
11
Views
755
I have an application where I will be using two PanelView Plus 7s to run two machines that share a common processor. The machines are identical...
Replies
1
Views
399
So I have an interesting question. I work with sites that don't have controls tech's and wanted to know if its possible for a processor to be...
Replies
10
Views
1,218
Back
Top Bottom