News Center
PLC custom time countdown program design ideas
- Categorize:Industry Information
- Author:China Industrial control network
- Source:China Industrial control network
- Release time:2023-11-15
- pageviews:0
Summary
PLC custom time countdown program design ideas
Summary
- Categorize:Industry Information
- Author:China Industrial control network
- Source:China Industrial control network
- Release time:2023-11-15
- pageviews:0
Speaking of time timing is the PLC necessary instructions and program design, but if the reverse through the countdown to drive the program, but the timer is first set the time and then arrive at the time, rather than the countdown function of the operation, if you want to achieve how to operate? Next I will take you to write a design how to customize the time countdown program design.
1. Write variable scale
Enter the required symbol name based on the corresponding variable type and data type
2, design the subroutine with parameters
Step 1: (Start the countdown and input the countdown time to output the countdown marker)
Step 2: (Start the countdown and compare if the set value is less than 0 or equal to 0 do not run the countdown)
Step 3: (Press the reset button to reset the countdown time and countdown marker)
3, call the subroutine
Step 1: Call the countdown subroutine in the main program, and then fill in the external corresponding pin)
Step 2: After the countdown is complete, output Q0.0 coil by comparing instructions when the countdown time is equal to or less than 0.
Step 3: (Make the second call multiple calls, while filling in the external pin)
Step 4: (After the countdown is complete, output Q0.1 coil by comparing instructions when the countdown time is equal to or less than 0)
4. Demonstration effect
Step 1: Enter the countdown time in VW0 and press I0.0 to trigger the countdown
Step 2: Countdown time to trigger Q0.0 coil output
Popular news
Fuzhou Zhuokai Electronic Technology Co., LTD
Page Copyright © 2024 Fuzhou Zhuokai Electronic Technology Co., Ltd All rights reserved. 闽ICP备17019029号-2 Powered by saa
© 2024 Fuzhou Zhuokai Electronic Technology Co., Ltd