11-23-2010 05:34 AM
Hi, i'am going to need to transfer a data array between two parallel loops. Which i have done in my example attached, but i need to understand if one of the loops i use has a faster loop rate will it keep the action engine reading one action/state? or will it allow the slower loop to read its action/state? or will it behave like queue behaviour?
Solved! Go to Solution.
11-23-2010 06:16 AM
Remove the wait inside the AE and change the default to Read. 🙂
AE does no difference to loop function, if you have different loop times you might read 10 times faster than you write or the opposite. AE's prevent you from reading and writing at once (thus the wait in the AE is a bad idea since it'll lock the other loop), and removes the use of redundant "variable controls", else it's the same as a Local variable.
/Y
11-23-2010 07:15 AM - edited 11-23-2010 07:19 AM
Why would you not use a queue?
You are creating a race condition by trying to read data that has not been written yet.
The ActionEngine does not behave as a queue. There might be a way to implement features to the AE to make it behave more like the queue, but that would be additional overhead that would be better to use a queue in the first place.
11-23-2010 09:15 AM
Thanks Yamaeda. That solves my question 🙂