LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value Signalling Event Case

Solved!
Go to solution

Hi Guys,

 

I am trying to trigger an event using "Value Signalling" and i hit a little bit of snag.

 

I am reading logic inputs continuously and i wanted to trigger an event if there is a change on logic signals.

 

What i did is i read the logic signals initially so to get the default state and re-read again the logic signals inside the timed loop in the event case waiting for the signals to change. 

 

However, the event keep triggering even there is no change in signal.

 

Any advice?

 

 

Regards

Ray

0 Kudos
Message 1 of 5
(3,676 Views)
Solution
Accepted by topic author boys2men
Callin a value(sgnl) property always fires the associated event, even if the actual value remains thre same. You need a feedback node, comparing current and prevoius values. Place the signaling property in a case so it execute only if the values differ.
Message 2 of 5
(3,671 Views)

I was hoping that there could be other solution besides that if i have quite a number of events waiting to be triggered.

Smiley Happy  Thanks. I dont want to waste time finding any other means. 

 

 

0 Kudos
Message 3 of 5
(3,660 Views)

Of course you did not show any actual code (just an image) so we can only guess the overall program architecture and what's in the other cases and events.

 

Still, you might be over-thinking all this. Since the loop is already spinning it seems overkill to trigger things using signaling events. All you probably need is a small case structure that executes additional code whenever things change. Events are primarily used to handle user interaction from the front panel. You just need to branch depending on the "changed/not_changed" case, which is trivial.

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

Hi,

 

Thanks for the comments. The main reason i use an event trigger for this application is that the system would be receiving digital inputs (min 15) from another application at random. The application would be a handshaking event from my application and the target application where i received the digital ins and in response i send out a digital out.

 

I might have phrase my reply poorly, but your initial suggestion was my accepted solution and is working right now.

What i did is put all digital in an array and compare the arrays between loops using a shift register and trigger the value signalling inside a case structure everytime there is a change on array values.

 

Regards

 

 

 

0 Kudos
Message 5 of 5
(3,623 Views)