751
Step Instructions Section 3-21
Description PWM(891) outputs the frequency specified in F at the duty factor specified in
D from the port specified in P. PWM(891) can be executed during duty-factor
pulse output to change the duty factor without stopping pulse output. Any
attempts to change the frequency will be ignored.
Pulse output is started each time PWM(891) is executed. It is thus normally
sufficient to use the differentiated version (@PWM(891)) of the instruction or
an execution condition that is turned ON only for one scan.
The pulse output will continue either until INI(880) is executed to stop it (C =
0003 hex: stop pulse output) or until the CPU Unit is switched to PROGRAM
mode.
Flags
Example When CIO 0.00 turns ON in the following programming example, PWM(891)
starts pulse output from pulse output 0 at 200 Hz with a duty factor of 50%.
When CIO 0.01 turns ON, the duty factor is changed to 25%.
3-21 Step Instructions
This section describes Step Instructions, which are used to set up break
points between sections in a large program so that the sections can be exe-
cuted as units and reset upon completion.
STEP(008)/SNXT(009) can be used together to create step programs.
Name Label Operation
Error Flag ER ON if the specified range for P, F, or D is exceeded.
ON if pulses are being output using ORG(889) for the
specified port.
ON if PWM(891) is executed in an interrupt task when an
instruction controlling pulse output is being executed in a
cyclic task.
@PWM
#0000
#07D0
#0032
0.00
@PWM
#0000
#07D0
#0019
0.01
CIO 0.00 ON CIO 0.01 ON
Pulse output 0
Frequency: 200.0 Hz
Duty factor: 50%
Pulse output 0
Frequency: 200.0 Hz
Duty factor: 25%
Duty factor: 50% Duty factor: 25%
Instruction Mnemonic Function code Page
STEP DEFINE STEP 008 752
STEP START SNXT 009 752
Instruction Operation Diagram
SNXT(009):
STEP START
Controls progression to the next step of the program. Corresponds
STEP(008):
STEP DEFINE
Indicates the start of a step. Repeats the same step
program until the conditions for progression to the
next step are established.
Corresponds