User manual
High-Speed Input and
Pulse Output Features
3--21
High-Speed Input and Pulse Output Features
DL105 PLC User Manual, 3 rd Edition
SP0
LD
K20
Load constant K20 into the accumulator. This selects
Mode 20 as the HSIO mode.
OUT
V7633
Output this address to V7633, the location of the HSIO
Mode select register.
LD
K12
Load the c onstant required to configure X 0 as Phase A
input.
OUT
V7634
Output the c onstant to V7634, the location of the setup
register for X0.
DirectSOFT
UDC
CT76
Kxxxxxxxx
C1
C0
C2
END
END c oil marks the end of the main program..
CT76 is the HSIO quadrature counter. The first rung’s SP1
always enables the counter. The preload contact in the
middle i s controlled by the logic below this counter
instruction.
LD
K0
Load the c onstant required to configure X 1 as Phase B
input.
OUT
V7635
Output the c onstant to V7635, the location of the setup
register for X1.
LD
K7
Load the constant required to configure X2 as an external
reset.
OUT
V7636
Output the c onstant to V7636, the location of the setup
register for X2.
LD
K1006
Load the c onstant required to configure X 3 as a filtered
discrete i nput with a 10 mS time constant.
OUT
V7637
Output the c onstant to V7637, the location of the setup
register for X3.
SET
Set C0 on at powerup to enable counting.
C0
SP0
Select Mode 20
The third rung’s Reset input is normally off,
because we will use the external reset. You can
optionally reset the counter value on each powerup
using the SP0 contact.
SP1
LDD
V1076
Load the c urrent value of the counter into the accumulator
on each scan.
CMPD
K44292
Compare the value in the accumulator with the constant
K44292. If they are equal, the SP61 contact will be
turned on.
Select Mode 20
SP61
SET
Y0
Set Y 1 to ON when the counter reaches our
comparison value.
To preload the counter, just add the following example rungs to the program above.
Program
Example Cont’d










