301
PWM
1
2
3
4
6
7
8
6.8
O
ther Con
venient Instru
ctions
6.8.9
P
WM
Program Example
(1) The following program outputs a 10 Hz pulse 5 times to Y20 when X0 is ON.
[Ladder Mode]
[List Mode]
n1
: ON time or the number of the device where the ON time is stored (BIN 16 bits)
n2
: Frequency or the number of the device where the frequency is stored (BIN 16 bits)
: Number of the device to which pulses are output (bits)
*1:
Only output (Y) can be used.
Function
(1) Outputs the pulse of the cycle set by n2, for the amount of time ON designated by n1, to the output module designated
by .
(2) The setting ranges for n1 and n2 are shown below:
*2:
The value specified by n1 should be less than the value specified by n2.
PWM
Pulse width modulation
6.8.9
PWM
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
n1
––
n2
––
*1
––
––
CPU Module Type Name
Setting Range for n1 and n2 [ms] *2
High Performance model QCPU, Process CPU,
Universal model QCPU, LCPU
1 to 65535 (0001
H
to FFFF
H
)
Step
Instruction
Device
Basic
Redundant
Process
High
performance
Universal
LCPU
Command
n2
n1
D
PWM
P
W
M
D
D
D
n1
n2