396
Special Instructions
Section 5-28
2.
The INI(61) instruction is executed with C=003.
3.
SPED(64) is executed again with the output frequency, F, set to 000.
When outputting pulses in independent mode, specify the number of pulses
beforehand by executing PULS(65). When outputting from port 1 or 2, specify
the direction (CW or CCW) as well.
In independent mode, the number of pulses that have been output to ports 1
and 2 are contained in IR 236 and 237 (port 1) and IR 238 and IR 239 (port 2).
Although the number of pulses can be monitored in independent mode, the
number of pulses cannot be monitored while pulses are being output in con-
tinuous mode.
In continuous mode, pulses will be output until the INI(61) instruction is exe-
cuted with C=003 or SPED(64) is executed again with F=0000. If the direction
(CW or CCW) is not specified when outputting from port 1 or 2, the pulses will
be CW.
Pulse Frequency (F)
The value of F sets the pulse frequency, as shown below. Setting F to 0000
will stop the pulse output at the specified location.
Precautions Regarding Pulse Output
The pulse frequency output from the CQM1H-PLB21 Pulse I/O Board is gen-
erated by dividing the 500-kHz basic clock pulse by an integer value, which
results in a difference between the set frequency and actual frequency. Refer
to the following equation for calculating an actual frequency.
Set Frequency:
Output frequency set in the instruction by the user
Dividing Unit:
An integer set in the dividing circuit to generate an output
pulse of the set frequency
Actual Frequency:
Output pulse frequency actually output from the dividing
circuit
Equation:
Actual frequency (KHz) = 500 (KHz)/INT (500 (kHz)/Set frequency (kHz))
INT: Function for obtaining an integer value
INT (500/Set frequency): Dividing unit
The difference between the set frequency and actual frequency becomes
larger as the frequency becomes higher.
Leftmost 4 digits Rightmost 4 digits
IR 237
IR 236
Port 1 pulse output PV:
IR 239
IR 238
Port 2 pulse output PV:
Output
Units
Possible values of F
Output bits
10 Hz
0000 (Stops output.) or 0002 to 0100 (20 Hz to 1 kHz)
Port 1 or 2
10 Hz
0000 (Stops output.) or 0001 to 5000 (10 Hz to 50 kHz)
1 Hz
0000 (Stops output.) or 0010 to 9999 (10 Hz to 9,999 Hz)
The dividing unit is set based on
the frequency set by the user.
500 kHz
Pulse-
generating
clock
Dividing circuit
Output pulse
(actual frequency)