Instructions

UM-0085-B09 DT80 Range User Manual Page 341
RG
Phase Encoder Operation
The following diagram illustrates how the reported PE position values relate to the phase encoder pulses received on the
counter inputs. In particular, note that a pulse is counted on each edge of the A and B inputs. This is sometimes referred
to as "x4" mode, because if the encoder speed is such that it generates a 100Hz pulse train on its A and B outputs then
the DT80's position count will increment at 400Hz.
Figure 163: Relationship between phase encoder signals and reported position (1PE) value
P1 Phase Encoder Inputs
The following diagram shows the connection of a phase encoder to the counter inputs on a DT80 or DT85. (For DT81
you would use the 3C and 4C inputs.)
Figure 164: Wiring for reading a phase encoder (quadrature) signal
To measure
Use the command
position (in counts)
1PE
Other Considerations
Sleep Mode
The high-speed counter inputs continue to function while the DT80 is asleep, so the phase encoder inputs will too.
As discussed in the High Speed Counter section (P339), it is important to ensure that the 16-bit hardware counters do
not overflow during sleep. The DT80 calculates the encoder position in software, by subtracting the count values read
from the "up" and "down" hardware counters. This means that incorrect readings will result if there are more than 65536
pulses in either direction while the DT80 is asleep.
Presetting Counters
The count value for a phase encoder channel can be preset using an expression, e.g.
RA3-E 1PE=0
will reset the encoder position to 0 when a button wired to digital input 3 is pressed.
Examples – Digital and Counters
Pulse Train Output
The schedule command
RA2S 6DS0(500,R)=1
produces a pulse train from channel 6D which is HIGH for 0.5s and LOW for 1.5s.
Sensor Power Control
In the schedule command
RA20M D T 4DSO(1000)=0 1..4V 4DSO=1
digital state output 4 controls a relay that switches the power supply to a group of sensors. Every 20 minutes the sensors
are powered up, the system waits one second while the sensors settle, the sensors are scanned, and the sensor power
supply is turned off again.
Manual Control
The polled schedule (see Trigger on Poll Command (P54)) can also be used to switch digital state output channels. For
example, the command
RBX 3DSO(5500,R)=0
turns a load connected to channel 3D ON for 5.5 seconds when an
XB poll command is received.