Novice Posted November 22, 2015 Report Posted November 22, 2015 Hi, I have a function that is handling peer to peer plc Communication, I am updating my function through an event which updates once per second, is there any way to do this faster than once per second? In the manual, the example only shows 00:00:01 as the fastest option,
michael G Posted November 22, 2015 Report Posted November 22, 2015 Yes Start your own cicode task that runs forever by creating a loop that runs forever in that loop use the SleepMS function to control how fast your repeat the function call WARNING - you must yield using the Sleep function so other tasks can execute Other useful function to read up on are the Task functions (eg TaskNew)
Novice Posted November 22, 2015 Author Report Posted November 22, 2015 Thank you for your reply, I am not that experienced in this. I know how to do events, functions and run it the way I have but that is about it, is it possible for you to do a little example? (I can easily read up on the SleepMS and the TaskNew in the manual but how exactly to use them?)
michael G Posted November 24, 2015 Report Posted November 24, 2015 (edited) go to the example project in Citect Open file Simulatr.ci search for the PID function to find more examples search all *.ci files for "tasknew" you will have to read the help to be sure that you are using it correctly for your application Edited November 24, 2015 by michael G
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now