jvalstar Posted July 30, 2018 Report Share Posted July 30, 2018 Hello, I'm looking for a solution to run 1 function multiple times at the same time with different values. I've already made a function with local tags, function in tags and function out tags. Inside the function is a small calculation and a short delay, divided in steps. I think the timer is the biggest problem, how can I solve this? How can I make a timer a local tag? Thank you in advance. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted August 1, 2018 MVP 2022 Report Share Posted August 1, 2018 How long is your short delay? I'd look into the system tags and roll my own timer. For a longer time, you could use Frequency.Frequency 100 (ms) and increment a counter. For more precise time, create some logic that takes a snapshot of the value of General.Milliseconds Counter, add your preset to it, and then wait until it's current value exceeds the sum. That's just what comes to mind. Joe T. Quote Link to comment Share on other sites More sharing options...
jvalstar Posted August 13, 2018 Author Report Share Posted August 13, 2018 Already solved it by putting the timer outside the function and activate it by an output bit and get timer.out by an input bit. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.