Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 39
Preface
If an operand or parameter supports more than one data type, the bold data types
indicate optimal data types. An instruction executes faster and requires less
memory if all the operands of the instruction use the same optimal data type,
typically DINT or REAL.
Relay Ladder Rung Condition
The controller evaluates ladder instructions based on the rung condition
preceding the instruction (rung-condition-in). Based on the rung-condition-in
and the instruction, the controller sets the rung condition following the
instruction (rung-condition-out), which in turn, affects any subsequent
instruction.
If the rung-in condition to an input instruction is true, the controller evaluates
the instruction and sets the rung-out condition based on the results of the
instruction. If the instruction evaluates to true, the rung-out condition is true; if
the instruction evaluates to false, the rung-out condition is false.
The controller also prescans instructions. Prescan is a special scan of all routines
in the controller. The controller scans all main routines and subroutines during
prescan, but ignores jumps that could skip the execution of instructions. The
controller executes all FOR loops and subroutine calls. If a subroutine is called
more than once, it is executed each time it is called. The controller uses prescan of
relay ladder instructions to reset non-retentive I/O and internal values.
During prescan, input values are not current and outputs are not written. The
following conditions generate prescan:
· Toggle from Program to Run mode.
· Automatically enter Run mode from a power-up condition.
Prescan does not occur for a program when the following occurs:
· The program becomes scheduled while the controller is running.
· The program is unscheduled when the controller enters Run mode.
Input Instruction
Rung-in
Condition
Output Instruction
Rung-out
Condition