7-15
Section
Timer and Counter Instructions
403
High-speed Counter or Pulse Output 0 Status (P=000)
The following table shows the function of the bits in D when P=000. Bits not listed
in the table are not used and will always be 0.
Usage
Bit
Function
High-speed
counter
00
High-speed counter comparison status.
(0: Stopped; 1: Comparing)
cou e
01
High-speed counter underflow/overflow.
(0: Normal; 1: Underflow/Overflow occurred.)
Pulse output
05
Total number of pulses specified for pulse output 0.
(0: Not specified; 1: Specified.)
06
Pulse output 0 completed. (0: Not completed; 1: Completed)
07
Pulse output 0 status (0: Stopped; 1: Outputting)
08
Pulse output 0 PV underflow/overflow.
(0: Normal; 1: Underflow/Overflow occurred.)
09
Pulse output 0 acceleration
0: Constant; 1: Accelerating or decelerating
Pulse Output 1 Status (P=010)
The following table shows the function of the bits in D when P=010. Bits not listed
in the table are not used and will always be 0.
Bit
Function
05
Total number of pulses specified for pulse output 1.
(0: Not specified; 1: Specified.)
06
Pulse output 1 completed. (0: Not completed; 1: Completed)
07
Pulse output 1 status (0: Stopped; 1: Outputting)
08
Pulse output 1 PV underflow/overflow.
(0: Normal; 1: Underflow/Overflow occurred.)
09
Pulse output 1 acceleration (0: Constant; 1: Accelerating or decelerating)
If C is 002, PRV(62) reads the results of the comparison of the PV to the 8 ranges
defined by CTBL(63) and writes this data to D. Bits 00 through 07 of D contain
the Comparison Result Flags for ranges 1 to 8. (0: Not in range; 1: In range)
If C is 003, PRV(62) reads the pulse output PV and writes the 8-digit BCD value
in D and D+1. (The leftmost 4 digits are written to D+1.)
The PV can be –16,777,215 to 16,777,215. Bit 15 of D+1 acts as a sign bit; the
number is negative if bit 15 is ON, positive if it is OFF.
Flags
ER:
The port specifier and control data are incompatible.
(For example: P=010 and C=000)
The address specified for D or D+1 exceeds the data area boundary.
There is an error in the operand settings.
Indirectly addressed DM word is non-existent. (Content of *DM word is
not BCD, or the DM area boundary has been exceeded.)
PRV(62) is executed in an interrupt subroutine while a pulse I/O or high-
speed counter instruction (INI(61), PRV(62), CTBL(63), SPED(64),
PULS(65), ACC(––), PWM(––), or SYNC(––)) is being executed in the
main program.
Read Range Comparison
Results (C=002)
Read Pulse Output PV
(C=003)