Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire voltage from PFI0 synchronized with AI channel

I am testing a board that has a digital trigger line and an analog voltage line. There are two modes I want to test it in.

 

1. Acquire analog voltages when triggered by the trigger line

2. Acquire analog voltages and digital trigger voltage continuously to compare relative rise of analog signal with triggering.

 

The first mode I have setup fine with a voltage task and a counter task. 

 

For the second mode I intended to drop the counter task, and add a channel to the AI Voltage task but can't provide "dev1/PFI0" to DAQmxCreateAIVoltageChan without error DAQmxErrorInvalidPhysChanType.

 

I'm using a USB 6343 and the ANSI C interface. Is it possible to treat the trigger line as both a trigger and a signal source without rewiring between tests?

Can I add AI and DI channels to the same task? If not, is there a way to deterministically start an AI and a DI task simultaneously so that the indexes of the output arrays match in the time domain?

Message 1 of 2
(2,720 Views)

Hello thwest,

 

It appears that the reason you are getting this error: " DAQmxErrorInvalidPhysChanType" is that you are not able to select a digital channel for use in your AI Voltage task. I recommend wiring the "dev1/PFI0" channel to an AI trigger channel (depending on which trigger you want) and just read from that in your voltage task. Here is the X-Series manual that describes some methods for wiring this trigger source: http://digital.ni.com/manuals.nsf/websearch/DB99DF5BA93B63B18625777C00684538

 

Regards,

 

Jeff L.

0 Kudos
Message 2 of 2
(2,686 Views)