From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-07-2017 05:20 PM
Hello guys.
In order to perform voltage measurements with the PXI4464, I am writing a code in C using the LabWindows.
In a simple way, I have created the Task, the Voltage Channel and set the Timing. To do this, I used the following functions:
DAQmxCreateTask("",&taskHandle);
DAQmxCreateAIVoltageChan(taskHandle ,chan ,"", DAQmx_Val_Cfg_Default, min, max, DAQmx_Val_Volts, NULL);
DAQmxCfgSampClkTiming(taskHandle, clockSource, rate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 1000);
Sometimes I need to perform test using DC coupling mode; sometimes using AC coupling mode. However, I did not find how to set the coupling mode using the DAQmx functions.
Could anyone help me?
Regards,
Johann
Solved! Go to Solution.
07-10-2017 02:12 AM
I never tried this, but digging into channel attributes I have found this one that should suit your needs:
DAQmxSetChanAttribute (taskHandle, "Channel", DAQmx_AI_Coupling, DAQmx_Val_AC);
As per the channel name, since you don't assign names when creating the channels you can pass the physical channel name, which is the one DAQmx assigns internally if not passed. If you have only one channel in the task you can pass an empty string or NULL as the channel name.
07-10-2017 04:29 PM - edited 07-10-2017 04:30 PM
Thank you so much Roberto. It seems to be working.
But now I have another question. How did you find it?
It is pretty hard to find what I need using the help and the Library Tree.
Best regards
07-11-2017 03:19 AM
Well, a little bit of experience made me think that the coupling mode could be a channel attribute, so I opened DAQmxSetChanAttribute function panel and clicked on Attribute field to open the list of attributes: since I couldn't find coupling into Analog Input >> Voltage branch I switched to Analog Input >> General properties and found it into Input Configuration sub-branch.