LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Produce second pulse from latch button press

Hi,

I would like to generate a second latch pulse from a single press of a latching Boolean type button.

I currently have two buttons - the user presses the first (it performs a "reset" type operation) then presses the second button (for a "capture"). A reset must be performed before the capture, and my code is written so that both work with Latch When Pressed mechanical action.

I have tried using Switch When Pressed mech action and performing eg. Reset on True and Capture on False, but this doesn't work for other reasons within the code.

What I would like is for one press of a single button to generate two pulses: a first pulse I can connect to the "reset" piece of code, then a short delay, and then a second pulse I can connect to the "capture" piece of code.

thanks,
Kathryn
0 Kudos
Message 1 of 5
(4,151 Views)
What is this pulse?  Is it something you want to send out of a DAQ device?  Then just create a waveform that has both pulses with the desired delay, then when you press the boolean button, have it output the waveform from the True case of a case structure.
0 Kudos
Message 2 of 5
(4,149 Views)

Hi RavensFan,

 

Sorry I wasn't specific enough. No, the "pulse" I was referring to was the term I'd chosen to represent the False-True-False Latch mechanical behaviour of the Boolean button. It/they are not being sent to a DAQ device.

 

I would like one button press to operate as two: to generate two Latch type "pulses" with the first "pulse" to go to the selector terminal of one Case structure, and the  second "pulse" to go to the selector terminal of a second Case structure.

 

thanks,

Kathryn

0 Kudos
Message 3 of 5
(4,141 Views)

Hi RavensFan and other forum members,

 

I'm sorry if this thread is a stupid question, and I hope I was clearer in my second post. I dont' feel I can use a Waveform for the selector of a case statement, I created a waveform in the shape of a pulse, and did a "greater than" comparison with the magnitude of the waveform I created but this creates a Boolean array, which I don't think will work for the case statement selector. If I am wrong here, can you please give more detail as to how I can use a waveform to create two Boolean pulses to use for two separate case statement selectors.

 

I am looking at two options, either will work:

1. Using a switch in Latch When Pressed mode, two Boolean pulses are created, one after the other with a time gap, for the selector of two separate Case statements.

2. Using a switch in Switch When Pressed mode, one pulse is created on a rising edge and a second on a falling edge. In this case, the problem may be how to create a Boolean pulse from a step change in sense.

 

The Boolean signals have to be F-T-F pulses rather than held True.

 

 Any help appreciated...

 

thanks,

Kathryn

 

0 Kudos
Message 4 of 5
(4,107 Views)

Try this.  The switch is set to latching.   It will blip an indicator on when first pressed.  It will blip a 2nd LED on 3 seconds later.  One problem is that the elapsed time VI automatically resets itself on first call.  I believe if you convert that to a subVI (right click, Open Front Panel) and go in and remove the First Call? primitive, it will prevent that from happening.

 

Message Edited by Ravens Fan on 02-17-2010 03:01 PM
0 Kudos
Message 5 of 5
(4,096 Views)