04-15-2012 06:13 AM
Hi,
I am using an array control and event structure for detecting changes in the array value.
At first,I have performed changes in the array(during runtime) and the event structure detected it.
The next step was adding a parallel while loop in which I am writing to the control array(using local variable).
During the runtime the layout of the array indeed changed,but the event structure didn't detect it.
I have attached 2 figures :1)The loop of the event structure 2)the parallel loop.
Is it possible working in such way?
How can I make the event structure detect changes the software performed in the control array?
Thanks,
Leonid
Solved! Go to Solution.
04-15-2012 08:23 AM
Changes done via a local variable are not user events, hence the event structure will not detect them, by definition. You have to write to the control using the "Value (signaling)" property node.
That said, your small showing of your code starts to raise red flags in my mind with the use of local variable and global variables. While not evil, their abuse can lead to poor programming architecture and race conditions. Perhaps you should consider uploading your whole VI so someone can take a look at it and offer suggestions on improving it.
04-16-2012 03:54 AM
Hi ,
Thanks for the advice.Now it works fine.
I replaced the 'writing'(to local variable) to the value property as you had offered.
The red flags were about writing to local variables?
Thanks,
Leonid
04-16-2012 04:11 AM
This is a long discussion about "red flags" 😉
Norbert