06-01-2018 11:44 AM
Tried a few searches and I couldn't find anything to help out.
I am trying to use LabView as a signal generator, to make a square wave to use as a trigger for a Laser. Can I output this signal through my USB ports of the computer LabView is running on, or do I need an actual DAQ device?
Solved! Go to Solution.
06-01-2018 11:59 AM
Hi George,
You will probably need a DAQ device that has a digital output (DO) channel. What does the input to your laser trigger look like, just 2 pins? What speeds do you need to be able to trigger at?
Alternatively, if you have a function generator, like the Agilent 33120A, these can be easily controlled using LabVIEW. Some of them have USB ports, and some have GPIB ports.
06-01-2018 12:13 PM
Thanks for the reply!
The input for my laser trigger is a BNC input. The speeds can be fairly slow, <= 1Hz.
Using an external waveform generator is a great idea! I have an Agilent 33120A. What are my next steps to hooking this guy up? Finding a VISA for it?
06-01-2018 12:17 PM
There is a LabVIEW driver page for this hardware: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=103
06-01-2018 12:41 PM - edited 06-01-2018 12:41 PM
Yes, download the driver that Patrick linked you to (and put it in your "instr.lib" folder). Does your function generator have a USB port on it? If not, it looks like the driver is designed for these other interfaces: IEEE 488.2 (GPIB) , USB , Ethernet , Serial , LXI. The GPIB would be my second choice, but usually requires an expensive adapter if your computer doesn't have a GPIB card already.
Once you get the instrument hooked up to your computer, I would open NI MAX (measurement and automation explorer). Hopefully you can find your instrument in there, open a test panel, and send a query like "*IDN" which should respond with the instrument model. Once you know you have communication, you can try running some of the examples in the LabVIEW driver.
If you cannot find your instrument in MAX, you may need to find some drivers from the vendor first (in this case Agilent).
06-01-2018 01:07 PM
It looks as if your Agilent 33120A device is either GPIB or Serial controlled. Additionally, you will need to set the interface (GPIB or Serial) and set the language to use SCPI in order to get a response from the
*IDN?\n
query.
The hardware interface can be done using a USB to serial dongle or by purchasing an inexpensive USB to GPIB converter like the one from Prologix.