Multifunction DAQ

取消
显示结果 
搜索替代 
您的意思是: 

Synchronization AI/AO

Hi,

 

I have the NI USB-6251, and I am trying to run the example "Synch AI-AO.c" to read input and generate output at the same time.  Because of the USB device's limitations, I had to set the sampling type to "On Demand" and comment out the trigger command.  The program reads in data just fine, but it is not outputting anythin like it should be.  One thing that has confused me is that there is no "DAQmxWriteAnalogF64" command, so how would this example ever output anything?  I see that there is an AOdata array, but if it's never written, how would it be outputted?

Thanks,

Tim

0 项奖励
1 条消息(共 3 条)
3,459 次查看

Hi Tim,

 

You're right, this example was missing the following line of code between the calls to GenSineWave() and DAQmxStartTask():

 

DAQmxErrChk (DAQmxWriteAnalogF64(AOtaskHandle, 1000, FALSE, 10.0, DAQmx_Val_GroupByChannel, AOdata, NULL, NULL));

 

It also had the wrong trigger terminal name at one point. "ai/aiStartTrigger" should be "ai/StartTrigger".

 

These issues were discussed in a previous forum thread (SynchAI-AO example does not work) and reported to R&D as CAR #181942. The example is fixed in DAQmx 9.1 and later.

 

Brad

---
Brad Keryan
NI R&D
2 条消息(共 3 条)
3,456 次查看

Hi Brad,

 

Thanks for your quick reply.  Sorry I missed it in the other thread.

 

Tim

0 项奖励
3 条消息(共 3 条)
3,445 次查看