User Manual Instruction Manual

Publication 1746-UM009B-EN-P - September 2007
Write Ladder Logic 59
Example Program for SLC 5/02 (or later) Processors (scaled current input and
output)
Rung 2:0
Rung 2:1
Scale the analog input with math instructions.
IIM
IMMEDIATE INPUT w MASK
Slot
Mask
Length
I:1.0
FFFF
1
MUL
MULTIPLY
Source A
Source B
Dest
I:1.0
16383
N7:0
Multiply by scaled range
Clear overflow fault bit
Divide by input range
Add offset
DDV
DBL DIVIDE
Source A
Dest
1638
N7:0
ADD
ADD
Source A
Source B
N7:0
–4091
S2:5
(U)
0