Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger on clock and read serial data

Using a USB-6211 with Visual C++ 6.0 and NI NIDAQmx.
How can I trigger on the rising edge of the clock and read the data on another pin?
Any example or advice would be appreciated.
 
Thanks!
0 Kudos
Message 1 of 4
(3,140 Views)

In general, one of the PFI lines can be used as an external digital trigger.The USB 6211 has external digital triggers through  PFI<0..3>&PFI<8..11>.

If synchronization is needed throughout the whole acquisition process with the external clock, the external clock can be used as a clock source for the DAQ device.

For more information on the USB 6211 check the specification manual. If you are using windows xp, a good example to start with can be found at

Start menu>>All programs>>National Instruments>> Measurment studio for visual studio 2005>>visual C++ examples >> Analog In >> ContAcqVoltageSamples_ExtClkDigStart 

 

Faris A.

Applications Engineer

National Instruments

Bueller
0 Kudos
Message 2 of 4
(3,115 Views)

This is a good example for external trigger on AI0 and external sample clock other pin, but the data that is read is on AI0.

How can I read and capture data on a different AI or DI when the trigger event occurs on AI0?

Do I need to create another task and have it triggered from the same source?

When I do this I get errors about resoruces not availabele or not available.

Not sure how to trigger on AI0 and capture data on another pin.

Any other examples on how this would be done?

 

Thanks,

Tech Products

 

 

0 Kudos
Message 3 of 4
(3,104 Views)

The example accepts a digital trigger on PFI0( pin 11) , while AI0 is pin 68.

Nevertheless, since the 6211 accepts triggers at PFI 0 - PFI3 and PFI8-PFI11 , you can select any of those as a trigger source. Also, you can choose acquisition on any of the AIs.

The same code can be used , but you have to set the appropriate channel names for your specific hardware connection. I recommend reading the program description when you open the C++ code.

Regards,

Faris

 

Bueller
0 Kudos
Message 4 of 4
(3,080 Views)