High
-S
peed
Input
and
Pulse
O
utput
Features
3--13
High-Speed Input and Pulse Output Features
DL105 PLC User Manual, 3rd Edition
The following example shows how to program the HSIO circuit to trigger on three
preset values. You may recall the industrial lathe example from the beginning of this
chapter. This example program shows how to control the lathe cutter head to make
three grooves in the work-piece at precise positions. When the lead screw turns, the
counter device generates pulses which the DL105 can count. The three preset
variables A, B, and C represent the positions (number of pulses) corresponding to
each of the three grooves.
Industrial Lathe
Counter
A
Preset Data
V2320 0000
V2322 0000
V2324 0000
V2326 0000
1500
3780
4850
FFFF
B
C
A
B
C
Device
Start
Lead screw
Cutter head
X5 -- Cutter head retracted
Y0 -- Lead screw motor
Y1 -- Cutter head solenoid
X4 -- Cutter head extended
I/O
Assignments
SP0
LD
K10
Load constant K10 into the accumulator. This
selects Mode 10 as the HSIO mode.
OUT
V7633
Output this address to V7633, the location of
HSIO Mode select register.
LD
K107
Load the constant required to configure X2 as
an external reset with interrupt.
OUT
V7636
Output the constant to V7636, the location of the
setup parameter for X2.
Select Mode 10
Direct
SOFT
SP0
ENI
Enable Interrupts before reaching a preset
generates an interrupt. Special Relay SP0 is on
during the first CPU scan.
LDD
K1500
Load the preset A value into the accumulator.
OUTD
V2320
Output the accumulator contents to the memory
location for preset 1.
LDD
K3780
Load the preset B value into the accumulator.
OUTD
V2322
Output the accumulator contents to the memory
location for preset 2.
Load Presets
SP0
LDA
O2320
Load the octal address O2320 into the
accumulator. This instruction automatically
converts the address into hex.
OUT
V7630
Output this address to V7630, the location of
the pointer to the Preset Table.
LD
K1
Load the constant required to configure X0 as
the counter clock.
OUT
V7634
Output the constant K1 to V7634, the location of
the setup parameter for X0.
Counter With
Presets
Program Example
Summary of Contents for DL105
Page 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Page 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Page 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Page 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Page 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...