Allen Nelson
Member
Ron:
What's so scary about that? I do it all the time. I set up a subroutine called SIM, which I conditionally enable as the very first line in the code.
It's full of all sorts of "wacko" logic like:
So while the shop is wiring the rack and I/O modules, I'm debugging the PLC / HMI / SCADA, with the processor sitting in a spare rack.
By the time the PLC is in the field, and trying to actually operate machinery, I've run a hundred batches, and I know the program is at least 50% bug-free (Ma Nature & Mr. Murphy are always good for a few wrinkles).
When I want to (have the time to), I'll put timer delays on driving all my inputs and then the system really looks real. This makes FAT a breeze.
"What happens if the valve fails to open?" - Just increase the delay timer to 32767, and watch.
<hr>
Thanks for the object lesson on why NOT to use the ALWAYS bits. I'm not sure I'll abandon my ways (too lazy to add two instructions). The guy must have been a knucklehead indeed not to notice that the coil he just inserted was already annotated and said "ALWAYS OFF"
I'm trying to figure out what THREE errors are in the AFI description.
"Disables its rung" are two - if used on a branch, it only disables the branch, not the rung. Plus, I would quibble about the use of the word "Disable" An OTE will still get evaluated, and the bit RESET on an AFI'ed rung.
What do you have for the other?
What's so scary about that? I do it all the time. I set up a subroutine called SIM, which I conditionally enable as the very first line in the code.
It's full of all sorts of "wacko" logic like:
MOTOR MOTOR
AUX CONTACT
O:0/1 I:1/0
------| |--------------( )
VALVE VALVE IS
OPEN LS
O:0/1 I:1/1
--+---| |------------( )
|
| VALVE VALVE IS
| CLOSED LS
| O:0/1 I:1/2
+---|/|------------( )
So while the shop is wiring the rack and I/O modules, I'm debugging the PLC / HMI / SCADA, with the processor sitting in a spare rack.
By the time the PLC is in the field, and trying to actually operate machinery, I've run a hundred batches, and I know the program is at least 50% bug-free (Ma Nature & Mr. Murphy are always good for a few wrinkles).
When I want to (have the time to), I'll put timer delays on driving all my inputs and then the system really looks real. This makes FAT a breeze.
"What happens if the valve fails to open?" - Just increase the delay timer to 32767, and watch.
<hr>
Thanks for the object lesson on why NOT to use the ALWAYS bits. I'm not sure I'll abandon my ways (too lazy to add two instructions). The guy must have been a knucklehead indeed not to notice that the coil he just inserted was already annotated and said "ALWAYS OFF"
I'm trying to figure out what THREE errors are in the AFI description.
This input instruction disables its rung when inserted in the condition side of the rung. Use for debugging programs and for temporarily deactivating a rung that will be needed later. Program an AFI as the first input in the rung. © 1997 Rockwell Software Inc.
"Disables its rung" are two - if used on a branch, it only disables the branch, not the rung. Plus, I would quibble about the use of the word "Disable" An OTE will still get evaluated, and the bit RESET on an AFI'ed rung.
What do you have for the other?
- "when inserted in the condition side of the rung" - implies that it could be inserted on the result side of the rung - it can't.
- "Program an AFI as the first input in the rung." - it can go anywhere (except as a coil). On a branch is one handy place.
- "and for temporarily deactivating a rung that will be needed later" - this could be interpreted as the AFI (or some other instruction) can reactivate the rung later (which of course, only modifying the program can).