FX Series Programmable Controlers Applied Instructions 5
5-76
The following points should be read while studying the example on the right of the page.
Please note, all normal rules associated with high speed counters still apply.
Thedatatableisprocessedone‘record
number’ at a time, i.e only 1 record is ever
active as the comparison data. The currently
active record number is stored in data register
D8130. As the comparison value for the active
record is ‘reached’, the assigned ‘Y’ device is
SET or RESET and the active ‘Record number’
is incremented by 1. Once all records in a data
table have been processed, the current record
pointer (D8130) is reset to 0 (the table is then
ready to process again) and the operation
complete flag M8131 is set ON.
If the high speed counter is reset (by program
or hardware input), when it resumes counting
and reaches the first record’s comparison value,
the M8131 flag will be reset. Both the status of
M8131 and contents of D8130 are not editable
by the user. If the DHSZ instruction is turned
OFF then all associated flags are reset.
Care should be exercised when resetting the
high speed counter or turning OFF the DHSZ
instruct as all associated ‘Y’ output devices will
remain in their last state, i.e. if an output was
ON it will remain ON until independently reset
by the user.
Thedatawithininactiverecordscanbe
changed during operation allowing data tables
to be updated. Any change made is processed
at the end of the current program scan. The
HSZ instruction will continue to process only the
active data record, i.e. it will not reset due to the
updating of an inactive data record.
When the DHSZ instruction is initially activated it will not process a comparison until the
following program scan as the CPU requires a slight time delay to initialize the comparison
table.
0
[D150, D151]
K321
1
Record
number
[D8130]
Selected 'Y'
Output
Device
[D
+2
]
SET/RESET
'Y'Device
(1=SET,
0=RESET)
[D
+3
]
Comparison
value
(lower/upper
register)
[D, D
+1
]
2
3
4
[D154, D155]
K432
[D158, D159]
K543
[D162, D163]
K765
[D166, D167]
K765
[D152]
H10 (Y10)
[D156]
H10 (Y10)
[D160]
H10 (Y10)
[D164]
H10 (Y10)
[D168]
H37 (Y37)
[D153]
K1
[D157]
K0
[D161]
K1
[D165]
K0
[D169]
K1
321
432
543
654
765
Y10
Y37
ON
OFF
M8131
D8130 0 1 2 3 4 0
C251 - count value
equals HSZ
comparison value
C251 reset
M8000
K9999
M8130C251DHSZ D150
K5
C251
X17