LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital input to switch on and off analog output

Hi,
I want to use a digital input to switch on and off a defined voltage at the analog output. The voltage should only be on as long a high signal is at the digital input. I need this relatively fast so I wonder if this could be controlled just by hardware.
 
Any help would be appreciated.
 
Thanks
   Christian
Message 1 of 7
(4,627 Views)
What hardware (DAQ card?) and software are you using?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 7
(4,624 Views)
LabView 7.1 and the DAQPad 6016. Sorry for not providing this - it's a bad day.
0 Kudos
Message 3 of 7
(4,618 Views)

Hi,

 

I’ve attached a screenshot of a program that does something very close to what you’re asking.  A pause trigger is used on one of the counter lines, which clocks the analog output.  The digital input is what triggers the pause.  However, the analog output will not return to a known voltage – you would have to add this yourself.

 

On the other hand, this program would be very easy to create if you could just use software timing for the digital trigger.  You could just read a Boolean, and then use a case structure to switch the different analog output voltages.

 

Lastly, I would ultimately recommend using one of the USB relay modules.  These are designed specifically for tasks like the one you’ve described.

 

I hope this helps!

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 4 of 7
(4,592 Views)

Christian,

If you really want it to work fast, you'd better try to use a MOSFET. Switch it on and off using the signal you want to apply to the input. Keep the voltage on the Analog Output constant (the one that you defined). Plug the transistor into your circuit, so that it would modulate the output voltage.

If you send me more details about what you want to get I might be able to sketch a circuit for you. Typical response time of a MOSFET (a cheap one) is better than 0.5 us (and down to nanoseconds).   

Sergey.

0 Kudos
Message 5 of 7
(4,586 Views)

Hello Sergey,

I want to use a TTL signal which comes from a CCD camera which is connected to spectrometer. When the TTL is high I want to switch on a diode laser. The diode laser has an analog input where the voltage determines the current of the laser. Therefore I need to convert the TTL signal to a defined voltage, which I will adjust in amplitude from time to time. A circuit schematic would be welcome.

 

Thanks a lot and also thanks to Ed for the LabView schematic.

    Christian

0 Kudos
Message 6 of 7
(4,575 Views)

Christian!

I attached two easiest (up to me) variants to do that.

The only thing is that the transistor will be open only while TTL is high. If you can vary the length of the TTL pulse than it's fine.

Another question is whether you need all that. According to your description (diode laser, CCD) you are doing some experiments in the lab. If so, you must have a pulse generator (if you don't have it, ask next door. This kind of stuff is available in EVERY lab). Trigger this pulse generator with your TTL and it will give you analog output pulse you desire.

If there is no pulse generator available, than try with FET.

In the scheme Rballast should be much greater than the input resitor of your laser (if it's 1 MOhm, take 10 MOhm for Rballast).

Regards,

Sergey.

0 Kudos
Message 7 of 7
(4,564 Views)