Comparison instructions
618
Part III FP Instructions
F374_DDTR
32-bit data revision detection
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types
Availability of F374_DDTR (see page 1325)
The status of the carry flag is updated at each execution of the instruction.
Therefore, programs that use the carry flag should utilize it immediately after
F374_DDTR is executed.
Variable Data type Function
s 32-bit area for detecting data changes
d
ANY32
32-bit area where data of previous execution is stored
For Relay T/C Register Constant
s DWX DWY DWR DWL DSV DEV DDT DLD DFL -
d - DWY DWR DWL DSV DEV DDT DLD DFL -
No. IEC address Set If
R9009 %MX0.900.9 to TRUE the input value at s has changed in
comparison to the former value.
Description
The function detects changes in a value at input s by comparing it with its former value that is
stored at output d. If the new input value at s does not coincide with the old value, the function
assigns the new value to output d. To signal the change, the carry flag R9009 is set
simultaneously.
Data types
Operands
Error flags
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start is set to TRUE, the function is carried out. If the input value present_value
has changed in comparison to the output value old_value the carry flag R9009 is set. The status of
the carry flag is then assigned to the variable changed_value.