03-24-2017 04:20 AM
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.
Solved! Go to Solution.
03-24-2017 04:23 AM
03-24-2017 04:30 AM
I do not have base development system...
03-24-2017 05:02 AM
Is there any way to do this iwthout Creating custom events?
03-24-2017 05:05 AM
03-24-2017 05:14 AM
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?
03-24-2017 05:27 AM
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
03-24-2017 05:41 AM
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
03-24-2017 05:59 AM
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.
The false cases are empty
Ken
03-24-2017 06:33 AM
Ken_Naylor wrote:
To reiterate, Val(sgnl) ALWAYS fires the event regardless of whether the value is a change from the last value.
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.