LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure/State machine

Solved!
Go to solution

Here's the scenario.

 

I'm using user controlled buttons in an event structure to control a state machine. Currently I have a different state corresponding to each button. However, 4 or 5 of these buttons could ideally correspond to the same state which is what I would like to happen... Each of these 4 or 5 buttons causes data to stream and the results are stored in an array, but the data streamed is different for each button! Therefore, if each of these 4 or 5 buttons caused the same state to occur how could I decipher which button was pushed? Ideally I'd have 4 or 5 different arrays once all the buttons are pushed out of the same state.

 

Is there anyway I can achieve this? 

0 Kudos
Message 1 of 5
(3,907 Views)
Solution
Accepted by topic author Strokes

Hi Strokes,

you have access to the element refnum inside of the event case. With the Ref you can simply get the name or every other proptery of the control to differentiate them.

 

Mike

Message 2 of 5
(3,900 Views)

Hi,

 

Also you can try this example. Not sure whether this is ideal or not.But it works:).


Regards,


Nitzz

(Kudos are always Welcome, Mark as a solution if it is the one;))

Message 3 of 5
(3,896 Views)

Thanks mike, I think the using the refnum will open some doors for me.

 

 

0 Kudos
Message 4 of 5
(3,892 Views)

have a good day, was working on a program that combines state machines and events, it went up in another forum topic, yet need to improve but I hope they can serve

Message 5 of 5
(3,516 Views)