From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Hold a pulse until get a new one

Solved!
Go to solution

I want to do something very simple, but, that is giving me a lot of work.

 

I just want to switch on a LED with a ''toggle switch'' with a ''latch until release" mechanical action, and keep this led on, until a new pulse (with the same ''toggle switch''). I know it's very simple, but, is a priciple that will clarify a lot of things for me.

If you can send me a VI, would be great.

 

sorry for my bad english, it's not my native language.

 

thank you all!

 

 

 

0 Kudos
Message 1 of 3
(2,181 Views)
Solution
Accepted by topic author ManuSpadim

Are you talking about an LED on the front panel or a real LED?

What do you mean by "pulse" and where is it coming from?

 

If you want a software version, and the "pulse" is just another press of the latch action button, use a while loop containing an event structure and a shift register. Initialize the shift regsiter with a false diagram constant and place the LED terminal inside the loop. Use an event structure with "switch...value changed" and invert the boolean inside it whenever it is pressed. wire the output to the shift register on the right. There are many other ways to do this. Try to find them all. 😄

0 Kudos
Message 2 of 3
(2,173 Views)

I want to use this concept to control a simple valve that will control a hydraulic cylinder. I also have an optical sensor (with an output of 1-10V) that reads this distance, so, for example, I want to create a boolean value when the cilinder is at the point equals to 350 milemeters that will make it go forward and, when it arrives to 400 milimeters a new boolean pulse is generated and makes the cylinder come backward.
The cylinder will keep going and coming.

 

I want to do this with a DAQ 6009 and use two digital output to control an electronic board that I created, that will control relays that will control the valve.

When de first digital output is on, the second is off,  and vice versa.

Whats the easier way?


For this logic I think it's necessary a control like this, that "memorizes" the boolean "pulse", anyway, if someone teach me something that don't need this "memorizing tool" I will apreciate, but, I'd like also to know how to do this "memory".

 

This is all. 
Sorry for my bad english, and hope someone help me.



Thank  you! 

 

0 Kudos
Message 3 of 3
(2,152 Views)