FX Series Programmable Controlers Applied Instructions 5
5-75
5.6.6 HSZ (FNC 55)
Operation 1 - Standard: (Applicable to all units)
This instruction works in exactly the same way as
the standard ZCP (FNC11). The only difference is
that the device being compared is a high speed
counter (specified as S
3).
Also, all of the outputs (D) are updated immediately due to the interrupt operation of the DHSZ.
It should be remembered that when a device is specified in operand D it is in fact a head
address for 3 consecutive devices. Each one is used to represent the status of the current
comparison, i.e. using the above example as a basis,
Y10 (D) C251 is less than S
1, K1000 (S3<S1)
Y11 (D+1) C251 is greater than S1, K1000 but less than S2, K1200 (S3>S1,S3<S2)
Y12 (D
+2) C251 is greater than S2, K1200 (S3>S2)
Operation 2 - Using HSZ With A Data Table: (Applicable units: FX2N and FX2NC)
Operation 2 is selected when the destination device (D) is assigned special M coil M8130. This
then allows devices (S
1,S2)tobeusedtodefineadatatableusing(S1) as the head address
and (S2) as the number of records in the table - maximum number of records is 128. Each
record occupies 4 consecutive data registers proportioned in
the following manner (for a
single record of data registers D through D+3):
Mnemonic Function
Operands
Program steps
S
1 S2 S3 D
HSZ
FNC 55
(High
speed zone
compare)
Operation 1:
The current value
of a high speed
counter is checked
against a specified
range
K, H,
KnX, KnY,
KnM, KnS,
T, C, D, V, Z
C
Note:
C = 235 to
255,
Y, M, S
Note:
3 consecutive
devices are
used
DHSZ:
17 steps
Operation 2:
The designated
rangeisheldina
data table driving
‘Y’ outputs directly
DK,H
Using
values
from
1to
128
(deci-
mal)
M8130 (only)
This flag can
only be used
with one
DHSZ
instr’ at a time
Operation 3:
The designated
rangeisheldina
data table driving
PLSY frequencies
directly using
D8132
M8132 (only)
This flag can
only be used
with one
Single Record
Data
registers
D,
D
+1
Used as a double (32 bit) data register to contain the comparison data
D
+2
Stores the I/O device number, in HEX, of the ’Y’ Output device to be controlled, i.e.
H10=Y10. Note: Hex digits A through F are not used.
D
+3
Stores the action (SET/RESET) to be performed on the Output device D+2. Note:
For a SET (ON) operation D+3 must equal 1, for a RESET (OFF) D+3 must equal 0.
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
M8000
C251 Y10
K1000
DHSZ
K1200
[ S1 ] [ S2 ] [ S3 ] [ D ]
For further, general points, about using high speed counter functions please see the
subsection ‘Points to note’ under the HSCS (FNC 52). Relevant points are; a, b, and c. Please
also reference the note about the number of high speed instructions allowable.