24 HIGH-SPEED INPUT/OUTPUT FUNCTION
24.7 PWM Function
297
24
Examples of program
An example of a program using the PWM function is explained below.
Outline of operation
An example of a program using output Y0 on the CPU module to output one pulse with a delay is explained below.
Parameter setting
This program assumes that parameters are set as follows.
CH2, CH3 and CH4 need not be set.
Program
An operation diagram and program are shown below.
■Operation diagram
Item CH to be used
CH1
Output destination Y0
Output pulse logic Negative logic (Output from OFF)
Pulse width 50 ms
Cycle 60 ms
Delay time: 50 ms
1 pulse output
10 ms
X0 input
Y0
PWM output
PWM output start