From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using one-time-only events to trigger value changes

Solved!
Go to solution

Hello. I have experience with LabVIEW, but not much experience with event structures. Here is my situation:

 

Lets say I have an input, X, which comes from an external source. X is essentially random, from -100 to 100. My output will be Y, which will be generated by labview.  I want Y to have an initial value of 0. The first time that X becomes greater than 10, I want Y to change to 1, and stay 1 from now on, until the first time that X becomes greater than 20. The first time that X is greater than 20, I want Y to change to 2, and stay at 2 forever no matter what X is, until the program is terminated. 

 

Basically the program will constantly be sampling X, and when X reaches a certain threshold, it will change and hold the value of Y until the next threshold is reached. 

 

Any help is appreciated.

0 Kudos
Message 1 of 4
(2,849 Views)

The event structure is not useful for this situation.  Sounds what you really need is an Action Engine.  I'll let Ben's nugget speak for itself.


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
Message 2 of 4
(2,840 Views)
Solution
Accepted by topic author WillB123

Hi WillB123,

 

See the attached example.

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 3 of 4
(2,829 Views)

thanks

0 Kudos
Message 4 of 4
(2,806 Views)