767
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
High-speed Counter/Pulse Output Instructions
3
ACC
S: First Word of Settings Table
z Operand Specifications
Flags
Function
ACC(888) starts pulse output on the port specified in P using the mode specified in M using the target
frequency and acceleration/deceleration rate specified in S. The frequency is increased every pulse
control period (4 ms) at the acceleration rate specified in S until the target frequency specified in S+1
and S+2 is reached.
Pulse output is started each time ACC(888) is executed. It is thus normally sufficient to use the
differentiated version (@ACC(888)) of the instruction or an execution condition that is turned ON only
for one scan.
In continuous mode, pulse output will continue until stopped from the program.
In independent mode, pulse output will stop automatically when the number of pulses set with
PULS(886) in advance have been output.
An error will occur if the mode is changed between independent and continuous mode while pulses are
being output.
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 OKOKOKOKOKOKOKOK OK OK --- OK
Name Label Operation
Error Flag P_ER • ON if the specified range for P, M, or S is exceeded.
• ON if pulses are being output using ORG(889) or IFEED(892) for the specified port.
• ON if ACC(888) is executed to switch between independent and continuous mode for a port that is outputting
pulses for SPED(885), ACC(888), or PLS2(887).
• ON if ACC(888) is executed in an interrupt task when an instruction controlling pulse output is being executed in a
cyclic task.
• ON if ACC(888) is executed for an absolute pulse output in independent mode but the origin has not been estab-
lished.
• ON if bit 14 (parameter change operation compensation) of M is ON to specify not using parameter change opera-
tion compensation 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.
S+1
S+2
S
0
15
Lower word with target frequency
Upper word with target frequency
0 to 100,000 pps
(0000 0000 to 0001 86A0 hex)
Specify the frequency after acceleration or deceleration in pps.
Acceleration/deceleration rate
Specify the increase or decrease in the frequency per pulse control period (4 ms).
CJ1M CPU Units, no unit version
1 to 2000 pps (#0001 to 07D0)
CJ1M CPU Unit with unit version 2.0 or later or CJ2M CPU Unit
1 to 65535 pps (#0001 to FFFF)
Target frequency 1
Time
Acceleration/deceleration rate
ACC(888) 1 executed.
Pulse frequency
ACC(888) 2 executed.
Target frequency 2