612
8 APPLICATION INSTRUCTION
8.17 Pulse Related Instruction
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 Only Y can be used for a bit device.
When a bit device is specified, specify one of Y0 to Y7. The high-speed pulse input/output module bit device (Y) cannot be specified.
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.
Specify K1 to K4 (axis 1 to 4) for the CPU module, and K5 to K12 (axis 5 to 12) for the high-speed pulse input/output module.
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).
Ladder diagram
Structured text
ENO:=PWM(EN,s1,s2,d);
FBD/LD
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/Word
ANY_ELEMENTARY
EN
Execution condition
Bit
BOOL
ENO
Execution result
Bit
BOOL
Operand
Bit
Word
Double word Indirect
specification
Constant
Others
X, Y, M, L, SM,
F, B, SB, S
T, ST, C, D, W,
SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s1)
(s2)
(d)
(s1) (s2)
(d)
EN
ENO
s1
s2
d
(s1)
(s2)
OFF
ON
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......