03-21-2011 04:45 PM
I have a CCD camera with a trigger input which I am trying to control using LabView and a NI USB-6218 DAQ.
Right now, my LabView program and DAQ board is generating an analog square wave and acquiring 3 analog voltages for measurements.
My front panel interface displays my analog signals and I would like to add a "switch" (boolean) to send a trigger to the CCD camera to begin recording whenever I want it to.
I've tried many different things with no success. Does anyone have a solution to this? It would be very helpful to my project. Thanks.
03-21-2011 06:23 PM
Perhaps you could attach your vi so we can better understand how it's currently working.
What sort of trigger input to the camera is it?
I guess you want to add an even structure in a while loop (to capture the button press) and send out a pulse on one of the digital output lines of the DAQ board connected to the trigger input of your camera.
03-21-2011 06:46 PM
I'm fairly certain the CCD camera is triggered by a rising edge on a single pulse or pulse train. I used to have it hooked up to a square wave from a function generator to take multiple pictures at a given frequency and it always took pictures on the rising edge of the square wave.
I can't upload the vi right now but it's pretty simple. I just have 1 DAQ Assist vi to generate the analog square wave and 1 DAQ Assist vi followed by a Split Signal vi to acquire 3 analog voltage signals. I have a bunch of other charts, controls, math functions, statistics, comparison, etc functions attached to those to get data from signal and manipulate them to get some meaningful information out of them. Everything is in one single While Loop.
I've been trying to create a digital pulse (or train) to output to one of the digital outputs on my USB-6218 when I click on a boolean switch but haven't had any luck so far.
It doesn't seem like something that would be complicated but for some reason, I can't figure it out.
03-22-2011 04:38 PM
Could you post a screenshot of your VI? I'd like to get a better picture of what you're doing.
03-22-2011 05:27 PM
I've attached a [LabVIEW 2009] vi with two examples of sending a pulse out of a digital line.
'trigger 1' sends out two discrete digital output changes and has a 10ms wait in between. It won't be precisely 10ms beacause of the variable setup, execute and USB latencies.
'trigger 2' sends out a digital waveform of 2 samples, 1 then 0. The pulse timing can be precisely set in the waveform dt value.
03-23-2011 12:38 PM
Ok I see what you're trying to do. So what happens when you execute that? It seems like you know precisely what you're doing and I don't see anything obviously wrong with you code. What's going wrong? What troubleshooting steps have you tried already?