20: PULSE INSTRUCTIONS
20-28 « FC4A MICROSMART USER’S MANUAL »
Sample Program: ZRN1
This program demonstrates a user program of the ZRN1 instruction used for zero-return operation to generate output
pulses of 3 kHz initial pulse frequency from output Q0 while input I1 is on. When deceleration input I3 is turned on, the
output pulse frequency reduces to the creep pulse frequency of 800 Hz. When deceleration input I3 is turned off, ZRN1
stops generating output pulses.
Initial pulse frequency: 3,000 Hz
Creep pulse frequency: 800 Hz
Deceleration input: I3 (high-speed deceleration input)
Operand Settings
Operand Function Description Allocation No. (Value)
S1+0 Initial operation mode Frequency range 100 to 10,000 Hz D0 (1)
S1+1 Initial pulse frequency 10,000 Hz × 30% = 3,000 Hz D1 (30)
S1+2 Creep operation mode Frequency range 10 to 1,000 Hz D2 (0)
S1+3 Creep pulse frequency 1,000 Hz × 80% = 800 Hz D3 (80)
S1+4 Error status D4
S2 Deceleration input High-speed deceleration input I3
D1+0 Pulse output ON
0: Pulse output OFF
1: Pulse output ON
M100
D1+1 Pulse output complete
0: Pulse output not complete
1: Pulse output complete
M101
M8120
M8120 is the initialize pulse special internal relay.
When the CPU starts, four MOV(W) instructions store parameters to data
registers D0 through D3.
D0 (initial operation mode): 1 (100 to 10,000 Hz)
D1 (initial pulse frequency): 30 (10,000 Hz
× 30% = 3,000 Hz)
D2 (creep operation mode): 0 (10 to 1,000 Hz)
D3 (creep pulse frequency): 80 (1,000 Hz
from output Q0.