34
Pulse Output Function (CQM1 Only) Section 1-3
1-3-5 Determining the Status of Ports 1 and 2
The status of pulse outputs (for standard or variable-duty-ratio pulses) of ports
1 and 2 can be determined either by reading the status of the relevant flags in
the SR and AR areas or by executing PRV(62).
Reading Flag Status The status of pulse outputs can be determined by reading the contents of the
words and flags shown in the following table.
Executing PRV(62) The status of pulse outputs can be determined by executing PRV(62). Specify
port 1 or 2 (P=001 to 002) and the destination word D. The port status infor-
mation will be written to bits 04 to 07 of D and bits 00 to 03 and 08 to 15 will
be set to 0.
When PRV(62) is used to read the port’s status, the most recent information
will be read, so the PC’s cycle time will not be a factor.
Bits 04 through 07 of D contain the specified port’s status information.
Word(s) Bit(s) Function Description
SR 236 and
SR 237
00 to 15 Port 1 PV Indicates the 8-digit present value of the number of pulses
output from port 1. SR 237 contains the higher four digits.
SR 238 and
SR 239
00 to 15 Port 2 PV Indicates the 8-digit present value of the number of pulses
output from port 2. SR 239 contains the higher four digits.
AR 04 08 to 15 Pulse output status Indicates pulse output status.
00: normal
01 or 02: Hardware error
03: PC Setup error
04: Operation stopped during pulse output
AR 05 12 Port 1 Deceleration flag Indicates deceleration.
(0: Not specified; 1: Specified.)
13 Port 1 Number of Pulses flag Indicates whether the number of pulses are set.
(0: Not specified; 1: Specified.)
14 Port 1 Pulse Output Completed
flag
Indicates whether pulse output has been completed.
(0: Not completed; 1: Completed.)
15 Port 1 Pulse Output Status flag Indicates whether pulses are being output.
(0: No output; 1: Output in progress.)
AR 06 12 Port 2 Deceleration flag Indicates deceleration.
(0: Not specified; 1: Specified.)
13 Port 2 Number of Pulses flag Indicates whether the number of pulses are set.
(0: Not specified; 1: Specified.)
14 Port 2 Pulse Output Completed
flag
Indicates whether pulse output has been completed.
(0: Not completed; 1: Completed.)
15 Port 2 Pulse Output Status flag Indicates whether pulses are being output.
(0: No output; 1: Output in progress.)
Bit Function Description
04 Deceleration flag Indicates deceleration.
(0: Not decelerating; 1: Decelerating)
05 Number of Pulses
flag
Indicates whether the total number of pulses have
been specified. (0: Not specified; 1: Specified.)
06 Pulse Output Com-
pleted flag
Indicates whether pulse output has been completed.
(0: Not completed; 1: Completed.)
07 Pulse Output Status
flag
Indicates whether pulses are being output.
(0: No output; 1: Output in progress.)
@PRV(62)
001
P
Execution condition
D