193
M 8
DMOV
HSC0
D0
D
≥
D0
K3000
CNT_AB
HSC0
K999999
SM 0
Y2
M 9
RST
HSC0
( )
When M8 is ON, HSC0 starts to count. The signal inputs from X0 (A phase) and X1 (B
phase).
When SM0 is ON, the value in HSCD0 (double words) related to HSC0 is written to D0
(double words) in real-time.
When the present counting value is over 3000, Y2 is ON.
When the rising edge of M9 is coming, reset HSC0 and HSCD0 (double words).
SM0
DMOV
HSC0
CNT_AB
HSC0
K88888888
D
<
D0
K0
Y0
D
≥
D0
K100 D0
D
<
K200
D
≥
D0
K200
Y1
Y2
D0
SM2
RST
HSC0
D
≥
D0
K100
( )
( )
( )
When the rising edge of the original forward pulse coil SM2 comes, that is, at the beginning
of each scanning cycle, HSC0 is reset and the counting value in HSCD0 is cleared.
When coil SM0 is on, HSC0 begins to count X0 and X1 ports in AB phase mode. The
setting value of counting is K888888. At the same time, the counting value in HSCD0
(double words) is written into D0 (double words) in real time.
When the counting value in D0 (double words) is greater than K0 and less than K100, the
output coil Y0 is ON; when the counting value in D0 (double words) is greater than or equal
to K100 and less than K200, the output coil Y1 is ON; and when the counting value in D0
(double words) is greater than or equal to K200, the output coil Y2 is ON.
Since the high-speed counter is a double words counter, it is necessary to use the double
words comparison instruction DLD
≥
and DLD < for comparison.
AB phase input mode
Since the high-speed count value is 32-bit, the
instructions here are all 32-bit instructions.
Such as DMOV
,
DLD
<
, DLD
≥
Содержание XD Series
Страница 1: ...XD XL series PLC User manual Instruction WUXI XINJE ELECTRIC CO LTD Data No PD05 20201022 3 5 ...
Страница 210: ...209 ...
Страница 314: ...313 B Double click the middle part to modify ...