10. High-speed Input/Output Design Examples Control Program: X0 System start M0 X2 X3 X4 Setting the opening degree as 25% M0 X3 X2 X4 M0 X4 X2 X3 Setting the opening degree as 50% Setting the opening degree as 100% X1 System stop (Opening degree: 0%) M1000 Program Description: z In this program, the sprayer valve opening degree is controlled by the value in D0. Opening degree = t on /t off = D0 / (K1000-D0) z When START is pressed, X0 will be ON to set M0. The water spraying system will be ready and will start spraying as long as the corresponding opening degree button is pressed. z When the button 25% is pressed (X2 = ON), the value in D0 = K200 and D0/(K1000 - D0) = 0.25.
The valve opening degree will be 25%. z When the button 50% is pressed (X3 = ON), the value in D0 = K333 and D0/(K1000 - D0) = 0.50. The valve opening degree will be 50%. z When the button 25% is pressed (X4 = ON), the value in D0 = K500 and D0/(K1000 - D0) = 1. The valve opening degree will be 100%. z When STOP is pressed, X1 will be ON to clear D0 as 0 and D0/(K1000 - D0) = 0. The valve opening degree = 0. At the same time, the system start flag M0 will also be reset. DVP-PLC Application Examples 10-10 SET M0 MOV K200 D0 MOV K333 D0 MOV K500 D0 RST D0 RST M0 PWM D0 K1000