01-10-2014 04:12 PM
I'm sure there is an easy way to do this, but I can't figure it out for the life of me. How can I program a VI to send a TTL 5V trigger to a BNC location on my PCI-6251 (ELVIS)? I want to use LabVIEW to trigger a spectrometer to collect data, and it needs a TTL 5V trigger on a BNC line.
Thanks in advance,
Megan
01-13-2014 05:41 PM
Hi Megan,
How are you using the ELVIS in your setup? Could you give more details on what you are trying to do? Is the PCI-6251 generating the trigger?
Regards,
01-14-2014 10:34 PM
Hi Noah--thanks for your response!
I am attempting to build an automated data acquisition VI that simultaneously collects temperature and spectra. I am using the prototyping board of the ELVIS to connect a K-type thermocouple to LabVIEW. I want to be able to click the run arrow and have the VI automatically send a one-time TTL 5V signal to a BNC connection (no delay), as well as begin recording temperatures with respect to time. I already have the thermocouple portion working, but can't figure out how to send the TTL signal. I am using a Thorlabs CCS200 (http://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=3482) which has a BNC connection to trigger the spectrometer to start recording.
I hope this helps. If you need any other info, please let me know.
01-15-2014 05:32 PM
Megan,
The way I understand your goal is to output a single digital output to a line at the time you run your VI. If that is true. The only lines you can right a digital out to is a DIO line. Those lines have no connection to a BNC connector so unfortunately you will not be able to output your TTL signal to a BNC connection on your ELVIS.
01-17-2014 03:32 AM - edited 01-17-2014 03:44 AM
As it's TTL, you'll probably be OK as I think logic high is 2V but It's worth pointing out that the MyRIO digital outputs are 3.3V logic - all of the digital outputs are 3.3V so they won't output a 5V signal. You will need some extra electronics (e.g. a logic level converter) to output a 5V signal.
You should be able to wire up a digital output pin and digital ground to a BNC connector to connect to the BNC connector to do the triggering.
There are Express VIs included in the MyRIO 2013 software for controlling a digital output pin - just send a boolean true value when you want to trigger the device.
01-20-2014 10:04 AM
Hello Megan,
Just to clarify, we're talking about an ELVIS (version 1) unit tethered to the PC with a PCI-6251, not a myRIO. The Digital Output signals are 5V, so you won't need any level translation. If you are using the standard prototyping board, there are a couple of BNC connectors available. You could wire a DIO or PFI line over to one of the BNCs (make sure you wire ground to the BNC shell as well). If you aren't worried about milliseconds of uncertainty in your start trigger, you could use a simple Digital Output at the beginning of your VI. If you need hardware-timed synchronization (microseconds of uncertainty), then you'd need to use a PFI line and maybe set it up as a counter output. Then use a software trigger to initiate both the counter and the analog input tasks. If you're measuring temperature, I suspect you don't need that level of synchronization and can just do the Digital Output.
Take a look at the examples in LabVIEW:
Help -> Find Examples -> Hardware Input and Output -> DAQmx -> (Digital Generation, Generating Digital Pulses, Analog Measurements, etc.)
I hope this is helpful,
Charles Y.
National Instruments
01-23-2014 02:38 PM
Thanks for your help, Charles! I'll try that!