Sign in to follow this  
Followers 0
IanJohnston

GX IEC Developer task-pool problem

2 posts in this topic

Hi, GX IEC Developer (ver 4 & 5) & Q02 cpu. I decided I needed a POU that will only run say every 4000ms (4 secs), so I created a new entry in the task pool and specified:- Prio=10 Interval = T#4000ms I'm finding that the POU doesn't run for 4 secs after everything else is running, but from that point onwards it seems to be running full whack. I'm using a Mits GOT930 terminal which works by way of direct memory access, so the parameters on the LCD are actual PLC memory locations. I can see them delay for 4 secs but then continually refresh. There's no other POU's updating the same memory locations. Any ideas? Ian.

Share this post


Link to post
Share on other sites
The problem with the tasks is that once you enable them, you must disable them when finished. Here is how I would tackle this, assuming that you want your subroutine to run every 4 seconds for one scan only.. In your main continuous task, create a 4 second timer which, when done will set a BOOL which you have declared in the GVL (lets call it Task_1) Create a new task within the task pool which will run your "one scan" POU In the task attributes box you will set Event = Task_1, Interval=0, priority=10. This will then enable the POU after a 4 second delay, all you will need to do now is turn it off after 1 scan. Therefore at the end of your "one scan" POU, you will turn off or reset the timer which is still enabled in the main program. I am sure there must be a simpler way than this, but it's the best I can think of. Regards Ian

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0