07-18-2012 10:05 AM
@pierroil wrote:
http://www.ni.com/cms/images/devzone/tut/a/95de74b4575.gif
What the...
The Queue out is never pushed to the consumer loop... How is data added on to the input wire...
Trippy...
The queue wire is a refernce to the queue itself. It is not the not the data you are posting to the queue. An Enqueue places data into the queue and teh Dequeue removes the data from the queue. That is how the data gets transfer from one loop to another. When using queues you can have multiple things enqueuing data but should only have one thing remove data from the queue. Otherewise you have a race condition and you have no guarantee which task will get the data.
07-18-2012 10:07 AM
@pierroil wrote:
http://www.ni.com/cms/images/devzone/tut/a/95de74b4575.gif
What the...
The Queue out is never pushed to the consumer loop... How is data added on to the input wire...
Trippy...
I don't understand what you mean by this. A queue is based on the reference. The producer loop "Enqueues" the data onto the FIFO (queue). The consumer loop "Dequeues" the data from the FIFO that the producer put on it.
07-18-2012 10:11 AM
Reference was the key.
Didn't know that, have yet to use Queues
07-18-2012 10:14 AM
@pierroil wrote:
Ok the whole point of using events was to be able to detect event changes withuot me having to write a bunch of OR and Ands or compare and use shift registers to save my old data etc etc.
Is there no way to trigger the Vaue change event only when the value has actually changed.
And lol... I<m actually currently stepping through and I found this "value change bug" rather confusing... Been triggerring events even if there was no change...
I guess in other words: What's the point of events, fi at the end of the day, the signalling function triggers it which ends up just being Polling all over again.
It is not a bug. It is kind of confusing that it triggers a value change event. But the property name is Value (Signaling) and not Value Changed (Signaling).
07-18-2012 10:15 AM
Here is my code.
There's a bunch of garbage in there - sorry.
Here is what you need.
OPEN Go To Full.vi and Pierre2.vi.
You will also need to change the top level file paths to match your computer.
The problem is in Pierre2.vi, I need to understand how to get the event triggers working.
Make sure you read GO TO FULL.vi and the important note on the front... seriously, don't say I didn't warn you 😛
07-18-2012 10:19 AM
"
07-18-2012 10:24 AM
I don't have the time to edit or modify your VIs at this time. I recommend that you look at the examples that explain queues. You may also want to look at the examples for user events. Either of these would allow you to achieve what you want.
07-18-2012 10:26 AM
Yep. I'm already on it :).
Thanks anyway.
I learned a lot in this conversation alone.
07-18-2012 10:34 AM
Ok so I ended up simply putting a case structure inside my event. Comparing the cluster to see if anything changed and then using the index of the change as the case selector.
Works I guess. Not elegant, but works.