![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bgb9.png)
FX Series Programmable Controlers Applied Instructions 5
5-59
Operation 3 - Combined HSZ and PLSY Operation:
(Applicable units: FX
(2C)
and FX
2N(C)
)
Operation 3 allows the HSZ and PLSY instructions to be used to
ether as a control loop. This
operation is selected when the destination device (D) is assi
ned special M coil M8132. This
then allows devices (S
1
, S
2
) to be used to define a data table usin
(S
1
) as the head address
and (S
2
) as the number of records in the table - maximum number of records is 128. Each
record occupies 4 consecutive data re
isters (D throu
h D
+3
) proportioned in to two 32 bit data
areas.
The first pair of data re
isters (D,D
+1
) contain
the comparison value for use with the hi
h
speed counter. The second pair of data
re
isters (D
+2
,D
+3
) contain a value (from 0 to
1000) which represents an output frequenc
in
Hz. This value is loaded in to special data
re
ister D8132 when the comparison made b
the DHSZ instruction
ives a ‘TRUE’ output.
Special data re
ister D8132 can be used as the
source data for a PLSY (FNC57) output
enablin
the output to be varied with relative
count data.
As with Operation 2 onl
one record in the data
table is active at an
one time. The current
‘Record number’ bein
processed is stored in
data re
ister D8131. To observe the current
comparative value, data re
isters D8134 and
D8135 should be monitored as a double word
(32 bit) device.
Once the final entr
in the data table has been
processed, the operation complete fla
M8133
is set ON and the record counter (D8131) c
cles
back to the first record.
It is recommended that if the hi
h speed counter
and PLSY operations form a closed loop that
the last record entr
in the data table is set to K0
for the comparison value and K0 for the PLSY
output frequenc
. This will brin
the controlled
s
stem to a stop and the ‘Record number’
counter will not be able to c
cle back to the start
of the data table until the associated hi
h speed
counter is reset b
either pro-
ram or hardware
methods. This situation can be easil
monitored
b
checkin
the paired data re
isters D8134
and D8135 for the ‘0’ value.
It is recommended that the operation of the
PLSY instruction is dela
ed for 1 scan to allow
the DHSZ data table to be constructed on initial
operation. A su
ested pro
ram usin
a pulsed
fla
is shown in the example on this pa
e.
40
100
400
800
D8131
C251 - count value
equals HSZ
comparison value
C251 reset
M8000
K9999
M8132C251DHSZ D180
K5
C251
X17
100
600
550
40
PLSY Output Frequency in Hz
0
1
324
D8132, output value
in Hz for PLSY
instruction
M10
PLS M10
PLSY
D8132
K0 Y7
1
32
1
32