747
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
High-speed Counter/Pulse Output Instructions
3
CTBL
z Operand Specifications
Flags
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
P, C --- --- --- --- --- --- --- --- --- --- OK
--- ---
---
--- --- --- ---
TB OK OK OK OK OK OK OK OK OK OK --- OK
Name Label Operation
Error Flag P_ER • ON if the specified range for P or C is exceeded.
• ON if the number of target values specified for target value comparison is set to 0.
• ON if the number of target values specified for target value comparison exceeds 48.
• ON if the same target value is specified more than once in the same comparison direction for target comparison.
• ON if the upper value is less than the lower value for any range.
• ON if the set values for all ranges are disabled during a range comparison.
• ON if the number of ranges specified for range comparison (1 to 32) is set to 0.
• ON if the number of ranges specified for range comparison (1 to 32) is set to a value higher than 32.
• ON if the high-speed counter is set for incremental pulse mode and decrementing is set in the table as the direction
for comparison.
• ON if an instruction is executed when the high-speed counter is set to Ring Mode and the specified value exceeds
the maximum ring value.
• ON if specified for a port not set for a high-speed counter.
• ON if executed for a different comparison method while comparison is already in progress.
• ON if CTBL(882) is executed in the interrupt task when an interrupt occurs during CTBL(882) execution.
• For a CJ2M CPU Unit, ON for any function that uses I/O on the Pulse I/O Module even if a Pulse I/O Module is not
mounted.
• OFF in all other cases.
TB
TB+1
TB+2
TB+3
TB+4
TB+5
TB+156
TB+157
TB+158
TB+159
TB+160
Number of ranges
Lower word of range 1 lower limit
Upper word of range 1 lower limit
Lower word of range 1 upper limit
Upper word of range 1 upper limit
Range 1 interrupt task number
Lower word of range 32 lower limit
Upper word of range 32 lower limit
Lower word of range 32 upper limit
Upper word of range 32 upper limit
Range 32 interrupt task number
0001 to 0020 hex (1 to 32 decimal)
0000 0000 to FFFF FFFF hex
0000 0000 to FFFF FFFF hex
0000 0000 to FFFF FFFF hex
0000 0000 to FFFF FFFF hex
0 hex
Interrupt task number
Interrupt task execution condition
0 hex: When value enters range
8 hex: When value leaves range
03478
111215
Interrupt task number
00 to FF hex (0 to 255 decimal)
AAAA hex: Do not execute interrupt task. (Flag output only)
FFFF hex: Ignore the settings for this range.
Note Always set the upper limit greater than or equal to the lower limit for any one range.