
7 APPLICATION INSTRUCTION
7.14 Pulse related instruction
529
7
16 bit binary pulse width modulation
PWM
This instruction outputs the pulse (in 16-bit data units) of the ON time (in 16-bit data units) specified by (s1) and the period
specified by (s2) to the output destination specified by (d).
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
*1
When a bit device is specified, specify one of Y0 to Y7.
Only Y can be used for a bit device.
If Y is specified, outputs are enabled when there is an unused channel number in the parameter setting and the specified Y number is
not used.
The nibble of a bit device cannot be specified.
*2
When a word device or constant is specified, specify one of the channel numbers.
Processing details
• This instruction outputs the pulse of the ON time specified by (s1) and the period specified by (s2) to the output destination
specified by (d).
• Time with a unit selected on the parameter setting screen (
s or ms) can be specified by (s1) and (s2).
• The pulse output destination channel number selected on the parameter setting screen can be specified by (d).
• This instruction store the number of pulses, pulse width, and period output from each channel to an SD device. The pulse
width and period are stored in the units set by the parameters. When 0 is specified in the pulse output, pulses are output
without any limitation.
Ladder diagram
Structured text
ENO:=PWM(EN,s1,s2,d);
Operand
Description
Range
Data type
Data type (label)
(s1)
ON time or the device number storing the ON time
1 to 65535
16-bit unsigned binary
ANY16
(s2)
Period or the device number storing the period
1 to 65535
16-bit unsigned binary
ANY16
(d)
Channel number or device number from which pulses are to be
output
Bit/16-bit unsigned
binary
Bit/ANY16
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s1)
(s2)
(d)
Pulse output
destination channel
Number of output pulses
R/W
Initial
value
Timing of reflection on
operation
Timing of clearing to initial
value
CH1
SD5301, SD5300
R/W
0
• When the DHCMOV
instruction is executed
• When the PWM instruction is
executed
• END processing
STOP/PAUSE
RUN
CH2
SD5317, SD5316
CH3
SD5333, SD5332
CH4
SD5349, SD5348
(s1)
(s2)
(d)
(s1)
(s2)
OFF
ON
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......