103
Pulse I/O Board
Section 2-2
• Operating Status
Using PRV(62)
The status of high-speed counters 1 and 2 can also be determined by execut-
ing PRV(62). Specify high-speed counter 1 or 2 (P=001 or 002) and the desti-
nation word D. The status information will be written to bits 00 and 01 of D.
Bits 02 to 15 will be set to 0.
The status of the specified high-speed counter is stored in bits 00 and 01 of
P1, as shown in the following table.
Bits 04 to 07 indicate the pulse output status; all other bits are 0.
Example
This example shows a program that outputs standard pulses from port 1 while
counting those pulses with high-speed counter 1. The high-speed counter
operates in Up/Down Mode, with the pulse output’s CW pulses incrementing
the counter (B-phase input) and the CCW pulses decrementing the counter
(A-phase input). Before executing the program, set the PC Setup as follows
and restart the PC to enable the DM 6611 settings.
DM 6611: 0000 (High-speed Counter Mode).
DM 6643: 0002 (Port 1: Fixed duty factor pulse output, Linear Mode, Z-phase
signal with software reset, and Up/Down Mode).
Other PC Setup settings use the default settings. (Inputs are not refreshed
before interrupt processing.)
Word
Bit
Name
Function
Counter 1
Counter 2
AR 05
AR 06
00
High-speed Counter
Range Comparison Flags
ON when meeting first
condition.
When the high-speed
counter is used in range
comparison format, a bit
turns ON when the corre-
sponding condition is
met.
01
ON when meeting second
condition.
02
ON when meeting third
condition.
03
ON when meeting fourth
condition.
04
ON when meeting fifth
condition.
05
ON when meeting sixth
condition.
06
ON when meeting sev-
enth condition.
07
ON when meeting eighth
condition.
08
High-speed Counter
Comparison Flag
Indicates the status of the comparison operation.
0: Stopped
1: Running
09
High-speed Counter
Overflow/Underflow Flag
Indicates the overflow/underflow status of the PV.
0: Normal (No overflow/underflow)
1: Overflow/Underflow has occurred
Bit
Function
00
Comparison Operation Flag (0: Stopped; 1: Running)
01
High-speed Counter 1 and 2 PV Overflow/Underflow Flag (0: Normal; 1:
Underflow or overflow occurred)
(@)PRV(62)
P
000
D
P: Port
001: Port 1
002: Port 2
D: Destination word