03-22-2019 05:31 AM
Dear Labview users,
For a project I have to trigger a Photron high speed camera with a current signal that comes from a function generator; the camera should start recording when the current gives a peak in the signal. The camera TTL cable is connected to the PFI 12/P2.4 on a BNC 2110 daq board. I want to use DAQmx and IMAQ in the program. Does anyone has suggestions?
Solved! Go to Solution.
03-22-2019 05:33 AM
Dear Labview users,
For a project I have to trigger a Photron high speed camera with a current signal that comes from a function generator; the camera should start recording when the current gives a peak in the signal. The camera TTL cable is connected to the PFI 12/P2.4 on a BNC 2110 daq board. I want to use DAQmx and IMAQ in the program. Does anyone has suggestions?
03-22-2019 07:19 AM
Sure. I would suggest that you first write the code that will "snap" (take one image) from your camera and display it for you in an Image display. You mention the BNC 2110 board, but this doesn't produce pulses, it just is a connector box. What DAQ device is generating the pulses? You should write a separate small VI that sets up the DAQ and delivers a Pulse when you push a Front Panel button. It would be useful to have an oscilloscope handy to test that you get a TTL Pulse (quick quiz -- how would you make a 1 ms pulse out of a Digital Out line?) when you push the button.
You now have a VI that can take an image "when told", another VI that can deliver a TTL Pulse "when told". All you have to do now is connect the TTL Pulse to the Camera (via the BNC 2110 and an appropriate cable) and combine the two VIs (which you've already tested separately, so you know they work) to cooperate with each other.
Bob Schor
03-25-2019 07:19 AM
Dear Bob,
Thanks or your reply! I tried to write a script according to your suggestion. Could you have a look at it, hopefully it's not that bad?
kind regards,
Daniel
03-25-2019 07:52 AM
There is nothing inherently "wrong" with your VI, but it doesn't do what I thought you wanted to do. It consists of two independantly-running loops:
Each loop has its own Stop button, and share no obvious information or common inputs or common outputs.
I'm guessing that you are relatively new to LabVIEW, including to DAQmx and especially to Vision. LabVIEW Vision is relatively complex and "under-documented" -- I think you probably need another few months doing serious LabVIEW development before attempting this particular Project on your own. Notice I said "on your own" -- when I first was introduced to LabVIEW Vision, it was in the context of helping a colleague who had used it to make simple movies, but who otherwise didn't write very good LabVIEW code. I helped him "improve his code" (I forced him to start using LabVIEW Project, I made him write sub-VIs instead of one huge Block Diagram that required 6 screens (we only had two) to view, straighten out his wires, made him use the Error Line, etc., and he "taught me" about LabVIEW Vision and IMAQdx. In the process, we learned a lot more about how Vision worked, largely because we wrote a lot of "tiny test routines" to "see what happens if you do this ...".
My understanding of what you want to do is the following:
As you can see, what I thought you wanted is very far from what you presented in your code. Here are some suggestions:
Bob Schor