310 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Description
The UPDN instruction follows these algorithms.
Condition Action
Hold is cleared
and
Initialize is
cleared
AccumValue
n
= AccumValue
n-1
+ InPlus - InMinus
Out = AccumValue
n
Hold is set and
Initialize is
cleared
AccumValue
n
= AccumValue
n-1
Out = AccumValue
n
Initialize is set AccumValue
n
= InitialValue
Out = AccumValue
n
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related
faults.
Execution
Function Block
Condition/State Action Taken
Prescan EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is false EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is true EnableIn and EnableOut bits are set to true.
The instruction executes.
Instruction first run Internal accumulator is set to zero.
Instruction first scan N/A
Postscan EnableIn and EnableOut bits are cleared to false.
Structured Text
Condition/State Action Taken
Prescan See Prescan in the Function Block table.
Normal Execution See Tag.EnableIn is true in the Function Block table.
Postscan See Postscan in the Function Block table.