759
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
High-speed Counter/Pulse Output Instructions
3
PLS2
z Operand Specifications
Flags
Function
PLS2(887) starts pulse output on the port specified in P using the mode specified in M at the start
frequency specified in F (1 in diagram).
The frequency is increased every pulse control period at the acceleration rate specified in S until the
target frequency specified in S is reached (2 in diagram).
When the target frequency has been reached, acceleration is stopped and pulse output continues at a
constant speed (3 in diagram).
The deceleration point is calculated from the number of output pulses and deceleration rate set in S and
when that point is reached, the frequency is decreased every pulse control period at the deceleration
rate specified in S until the starting frequency specified in S is reached, at which point pulse output is
stopped (4 in diagram).
Pulse output is started each time PLS2(887) is executed. It is thus normally sufficient to use the
differentiated version (@PLS2(887)) of the instruction or an execution condition that is turned ON only
for one scan.
PLS2(887) can be used for positioning only in independent mode.
PLS2(887) can also be used to change settings during pulse output. With the CJ1M and CJ2M CPU
Units, PLS2(887) can be executed during pulse output for ACC(888) in either independent or
continuous mode, and during acceleration, constant speed, or deceleration. (See note.)
ACC(888) can also be executed during pulse output for PLS2(887) during acceleration, constant speed,
or deceleration.
Note Executing PLS2(887) during speed control with ACC(888) (continuous mode) with the same target fre-
quency as ACC(888) can be used to achieve interrupt feeding of a fixed distance. Acceleration will not be
performed by PLS2(887) for this application, but if the acceleration rate is set to 0, the Error Flag will turn ON
and PLS2(887) will not be executed. Always set the acceleration rate to a value other than 0.
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
P, M --- --- --- --- --- --- --- --- --- --- OK
--- ---
---
--- --- --- ---S
OK OK OK OK OK OK OK OK OK OK
---
OK
F OK
Name Label Operation
Error Flag P_ER • ON if the specified range for P, M, S, or F is exceeded.
• ON if PLS2(887) is executed for a port that is already outputting pulses for SPED(885), ORG(889) or IFEED(892).
• ON if PLS2(887) is executed in an interrupt task when an instruction controlling pulse output is being executed in a
cyclic task.
• ON if PLS2(887) is executed for an absolute pulse output but the origin has not been established.
• ON if bit 14 (parameter change operation compensation) of M is ON and a constant speed cannot be achieved
when changing the parameters.
• For a CJ2M CPU Unit, ON for any function that uses I/O on the Pulse I/O Module even if a Pulse I/O Module is not
mounted.
• OFF in all other cases.
Target frequency
Starting frequency
Time
PLS2(887) executed.
Pulse frequency