Right-click Tasks and add a new task to set the scan cycle for the new tasks, such as 100ms
?
Right-click the entire project of the PLC, then add a referenced task, select the task you created
?
Create a new program in Pou (such as AAAAA), then hold the PRG down and drag it down to the Tasklagrange (you can see that standard main is the same, that is, the task of main executes the pou of main)
?
After the execution of the program, it can be found that the ABC variable is a 100ms increase of 1, it is obvious that he is different from the main program scan cycle (this makes sense, for example, some drives only allow 8ms or more scanning cycle, and the standard drive must be 2ms or below the cycle, if you must use a unified scanning cycle, It is not possible to control both of these drives in one project, and if you can set up different scan cycles, the problem is solved.
?
?
For more instructional videos and downloads, please pay attention to the following information:
My Youku Space:
Http://i.youku.com/acetaohai123
?
My online forum:
http://csrobot.gz01.bdysite.com/
?
Problem Exchange:
qq:910358960
Email:[email protected]
?
Twincat (Balford Beckhoff) Frequently asked Questions (FAQ)-How to add a custom task, how to get a part of the program to have a different execution cycle