LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert pulse to latched

Solved!
Go to solution

I am trying to take a pulse trigger from a wave when it is higher than a value and latch a digital I/O "on".

Then take a pulse from a wave when it is lower than a different value and turn a digital I/O "off".

 

In other words switch a latching output from two different inputs.

 

0 Kudos
Message 1 of 17
(4,815 Views)
Hmmm, I'm still running 8.5.  Can you post a screen shot of the VI?
0 Kudos
Message 2 of 17
(4,800 Views)

Here is a screen shot.

 

0 Kudos
Message 3 of 17
(4,787 Views)
Try this.  I copied the while loop to show both the true and false states of the case statement.
Message 4 of 17
(4,781 Views)
Of course, there are other logic methods for achieving the same result -- the main thing is the use of a shift register.  I realized that you also need some reset logic.
0 Kudos
Message 5 of 17
(4,772 Views)

I looked at your screenshot and i think it wil work when greater then 0.6 or less than 0.3 but willnot stay latched between 0.6 and 0.3.

 

After it latches above 0.6 i want it to stay latched "true" until it goes down below 0.3 then stay latched "false" until it goes above  0.6 again.

 

like i said i just looked at it and did not run it yet but what do you think.

 

 

 

 

0 Kudos
Message 6 of 17
(4,758 Views)

That's exactly how it is wired (per your description) and you should try it yourself.  You should wire a constant "false" to initialize the shift register, since whenever you reenter the loop, you can't be sure what the value will be (and I believe it uses the last value anyway).

 

BTW:  Coding it took less time than posting to this forum

0 Kudos
Message 7 of 17
(4,745 Views)
Hi

I have a couple of questions that might help you figure out what you are trying to accomplish. What hardware are you planning on using? Do you know that if you right click the LEDs you can, change if it switches or latches, by changing the “mechanical actions”?

You can also use the “in range and coerce” function, instead of the greater and smaller than.

I hope it helps
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 8 of 17
(4,698 Views)

I am using a usb-6008 DAQ.

What i am tring to do is simulate a vehicle ECU and use the rich and lean signal to activate the oposite.

when it goes rich (above .6) send a latched lean signal. Whan it goes lean (below .3) change the latched lean signal to a rich signal.

 

I hope that helps to understand .

I was tring not to get to technical before and i think that was holding us back.

sorry...

0 Kudos
Message 9 of 17
(4,673 Views)

That's exactly how my logic works, you should actually try it, you'll find it works!

 

 

   ...Dan
 

0 Kudos
Message 10 of 17
(4,654 Views)