508 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 13 Special Instructions (FBC, DDT, DTR, PID)
Data Transitional (DTR)
The DTR instruction passes the Source value through a Mask and compares
the result with the Reference value.
Operands:
Relay Ladder
Description: The DTR instruction passes the Source value through a Mask and compares
the result with the Reference value. The DTR instruction also writes the
masked Source value into the Reference value for the next comparison. The
Source remains unchanged.
A ‘1’ in the mask means the data bit is passed. A ‘0’ in the mask means the data
bit is blocked.
When the masked Source differs from the Reference, the rung-condition-out
goes true for one scan. When the masked Source is the same as the Reference,
the rung-condition-out is false.
Enter an Immediate Mask Value
When you enter a mask, the programming software defaults to decimal values.
If you want to enter a mask using another format, precede the value with the
correct prefix.
Arithmetic Status Flags: Not affected
Operand Type Format Description
Source DINT Immediate
Tag
Array to compare to the reference
Mask DINT Immediate
Tag
Which bits to block or pass
Reference DINT Tag Array to compare to the source
ATTENTION: Online programming with this instruction can be
dangerous. If the Reference value is different than the Source
value, the rung-condition-out goes true. Use caution if you insert
this instruction when the processor is in Run or Remote Run mode.
Prefix Description
16# Hexadecimal
For example; 16#0F0F
8# Octal
For example; 8#16
2# Binary
For example; 2#00110011