From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneously trigger the start of a DAQmx and a IMAQdx task?

Solved!
Go to solution

Hi everyone!

 

Any reccomendation on how to build a system that will grab images from an IEEE394b camera (using IMAQdx) and simultaneously sample an analog signal through a NI USB-DAQ device (using DAQmx)?  Perhaps you could point me to an example somewhere?

 

Basically, I just want them to start acquiring at the same time.  I don't need them to be "continuously" synched ... just the start trigger needs to be synched.  How can I simultaneous start trigger a DAQmx and IMAQdx task?

 

NOTE:  I am using a USB DAQ device for various reasons.  I can't use one of those NI firewire cards with built-in digital I/O.  I know that might make it easier, but its not possible given the hardware in our application.

 

- John

http://www.medicollector.com
0 Kudos
Message 1 of 4
(3,067 Views)
Solution
Accepted by topic author josborne

Assuming the camera has a trigger input, you can just configure both tasks to wait for a start trigger and  then use a spare digital line on the DAQ as the trigger.  You can just use two subsequent DAQmx write commands to toggle it.  Just wire this line to the trigger input for the camera and whatever input you use for a trigger for the DAQ (the default is PFI0).

 

Take a look in the NI Example Finder

 

DAQmx>>Measure Voltage.llb>>Acq&Graph Voltage-Int Clk-Dig Start.vi

 

IMAQ>>IMAQ SignalIO.llb>>HL Triggered Snap.vi

Randall Pursley
Message 2 of 4
(3,066 Views)

Thanks,rpusley8.  And kudos.  I have a follow up question for ya:

 

I am considering switching to an IP camera, instead of firewire.  Mainly because I can find cameras that have auo-iris and day/night functionality.  I am not really using the camera for machine vision, its more of a video surveillance solution.  So I think an IP camera might be a better solution, even though it will just be directly attached to the PC (no actual network).

 

So my question is:  Can I trigger an IMAQdx task using an IP camera?  I don't think I can trigger every frame by inputting a pulse to the camera.  But I think I can do a start trigger, right?.  And then have it begin streaming images into an AVI file?

http://www.medicollector.com
0 Kudos
Message 3 of 4
(3,045 Views)

Most of these cameras have external triggers too.  It should work the same way as the firewire.  Also, you could trigger every frame if you wanted. You would just set the Trigger Action to 'Trigger each buffer'

Randall Pursley
Message 4 of 4
(3,033 Views)