LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use boolean valaue change to trigger valaue change in Event structure

Solved!
Go to solution

Hi.

 

I am trying to build an alarm system for triggering an alarm whenever a given valaue is reached. 

Is there any way to get a action which triggers a valaue change in a event structure whitout having to use a button?

I.e: If the simulated valaue reaches 45 i want a H alarm to go off, if it rises to 50 i want a HH alarm to go of, etc.

 

See attached VI.

0 Kudos
Message 1 of 11
(5,506 Views)

I do not have base development system...

0 Kudos
Message 3 of 11
(5,502 Views)

Is there any way to do this iwthout Creating custom events?

0 Kudos
Message 4 of 11
(5,484 Views)
Using the property Value (Signaling): http://digital.ni.com/public.nsf/allkb/024828947672E68586256ADB0071FB1B
Thanks
uday
0 Kudos
Message 5 of 11
(5,481 Views)

I have already tried this, and though it was the apparent solution. But it keeps on writing an alarm for every iteration of the event structure, instead of just writing when it enters the given limits.

Do i need som sort of reset function?

0 Kudos
Message 6 of 11
(5,475 Views)

How have you implemented the use of the Val (signalling) property?  An event will fire every time the property is set whether it has changed or not.  Post the vi with your latest attempt.

 

Ken

0 Kudos
Message 7 of 11
(5,467 Views)

Even if the valaue is inside the given valaue the H boolean writes an alarm for every loop iteration.

 

Ask if there is any questions to the VI

0 Kudos
Message 8 of 11
(5,455 Views)

Thats because you execute Val(sgnl) every loop.  If you only want your Event to trigger when H is TRUE then you have to only call Val(sgnl) when H is TRUE.

 

To reiterate, Val(sgnl) ALWAYS fires the event regardless of whether the value is a change from the last value. 

 

Try this.PNG

The false cases are empty

 

Ken

 

 

0 Kudos
Message 9 of 11
(5,439 Views)
Solution
Accepted by topic author Magnhel90

Ken_Naylor wrote:

To reiterate, Val(sgnl) ALWAYS fires the event regardless of whether the value is a change from the last value. 

 

Try this.PNG

The false cases are empty


Also note that you will keep getting the alarm event each iteration as long as this is TRUE.  If you just want a single event when the alarm condition goes TRUE, you will want to add a Boolean Crossing PtByPt to detect the transition from FALSE to TRUE and use that for the case structure.



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
Message 10 of 11
(5,421 Views)