Mitsubishi Electronics FX5 ユーザーズマニュアル

ページ / 306
200
19  BUILT-IN I/O FUNCTION
19.7  PWM Function
Program
 • Example of program for PWM output using the HIOEN instruction
 • Example of program for PWM output using the PWM instruction
HIOEN
K0
K1
K50
Interrupt program is permitted.
DHCMOV
K1
SD5300
SM402
RST
Y0
I0
SM400
FEND
K0
SM400
EI
IMASK
D0
MOV
H1
SM402
D0
IRET
END
The number of pulses to be output is set.
Y0 is reset before PWM is output. 
Not necessary when Y0 is already OFF.
PWM output from CH1 starts by the rising 
edge interrupt of X0.
Interrupt 
pointer
PWM
K1
K60
K50
Interrupt program is permitted.
DHCMOV
K1
SD5300
SM402
RST
Y0
I0
SM400
FEND
K0
SM400
EI
IMASK
D0
MOV
H1
SM402
D0
IRET
END
The number of pulses to be output is set.
Y0 is reset before PWM is output. 
Not necessary when Y0 is already OFF.
PWM output from CH1 starts by the rising 
edge interrupt of X0.
Interrupt 
pointer