LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Events and Clusters

Hi,

 

I am using a cluster with 5 controls to trigger an event.

 

I am feeding a Cluster Reference to this VI and from there I am writting to a local variable. The change on this local variable is being monitored by my event loop. Unfortunately this is not working.

 

Am I doign something wrong?

 

If it is not possible to use his local variable appraoch to simulate a new control, how else can I trigger evenst based on wires? ---> Note I don't want to create 5 User events.

 

0 Kudos
Message 1 of 19
(2,897 Views)

Writing to a local variable will not trigger an event. If you do not want to use user events then write to the Value(Signaling) property.

=====================
LabVIEW 2012


0 Kudos
Message 2 of 19
(2,894 Views)

What would be the event if I use value (Signalling)

 

0 Kudos
Message 3 of 19
(2,888 Views)

It will trigger a value changed event.

 

Edit: Some clarification. This is called value changed but the event will trigger even if you write the same value that the control already has. I have seen this cause confusion before.

 

Also you probably don't need to create five user events. You can create a single user event and make the datatype a cluster. You can put a typedef enum or just a string to indicate the source or type of event. Then in the user event case you unbundle that and feed it to a case selector.

=====================
LabVIEW 2012


0 Kudos
Message 4 of 19
(2,884 Views)

Other question.

 

How else can I transfer wire data from 1 loop to another. That is, if I have some data that is craete within a while loop, how can I push it to another parralel while loop? 

 

Local Vars don't seem to work.

 

And I don't want to use References + Property nodes since I read they have slow run time and I'm designing a rather large application.

 

0 Kudos
Message 5 of 19
(2,881 Views)

I edited my post while you were writing yours.

 

Local variables should be able to transfer data from one loop to another as long as the loops are in the same VI. Otherwise you can use global variables. Better yet use something like events, notifiers or queueus. You could also use a functional global.

=====================
LabVIEW 2012


0 Kudos
Message 6 of 19
(2,878 Views)

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.

 

0 Kudos
Message 7 of 19
(2,872 Views)

@pierroil wrote:

How else can I transfer wire data from 1 loop to another. That is, if I have some data that is craete within a while loop, how can I push it to another parralel while loop? 


This sounds like a Producer/Consumer.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 19
(2,869 Views)

@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.

 


This is starting to sound like an architectural issue.  Care to share some code and maybe we can find a better solution for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 19
(2,867 Views)

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...

 

0 Kudos
Message 10 of 19
(2,866 Views)