02-03-2011 05:28 PM
Hello,
I am currently working on our USB-9162 + NI 9234 to collect data in Linux. We used to use NIDQAMX but it dosent support this under linux. After making the switch to NIDAQMX base I wanted to re write our program. I notcied that in the base version when I create a Ai channel there is no place to input a excitatin value and sensitivity. Is there currently a way to do this in NIDAQMX c base?
thank you,
-vlad
02-04-2011 01:05 PM
Hello,
DAQmx Base does support IEPE excitation for the USB NI-9234 but only as far as to enable it. It will supply the 2 mV excitation as it would in DAQmx. The sensitivity input is a feature exclusive the DAQmx, therefore the data will need to be scaled once acquired using DAQmx Base. You can however select the source of the excitation by placing a DAQmxBase Set Property.vi and selecting the instance Channel Properies»Analog Input»General Properties»Signal Conditioning»Excitation»Source.
Regards,
Justin
11-14-2011 10:10 PM
Hi Justin,
You said DAQmx Base supports IEPE excitation for the USB NI-9234. I was looking at the C reference in DAQmxBase and cannot find out how to switch on the IEPE. What C function I can use to switch on the IEPE for USB NI-9234? I also want to select AC coupling if it is possible. I run the application on Linux so I can only use the DAQmx Base program.
Looking forward to hearing from you.
11-16-2011 09:39 AM
Greetings,
You can setup the excitation directly by creating an analog output voltage at the desired voltage and reading an analog input voltage. The ratio will be the mV/V value typically returned from an excitation task.
If you have to use a C function, there is a driver for DAQmx (not base) for SuSe (http://joule.ni.com/nidu/cds/view/p/id/2322/lang/en), and then all of the APIs would still work.
Regards,
Aldo
National Instruments
Applications Engineer
11-16-2011 05:22 PM
11-16-2011 07:06 PM
Thanks for your reply.
NI documentation clearly stated that only NI-DAQmx Base can support USB on Linux. Please see the attachment.
It also clearly stated in the Readme file on NI-DAQmx Base 3.4.5 (RedHat, Suse) that the base driver supports NI USB 9234 and I can select AC coupling and IEPE in software.
Please see:
http://joule.ni.com/nidu/cds/view/p/id/2649/lang/en
and click on README.txt
NI USB-9234 *Analog Input -Multi-channel, multi-sample read (scaled) -Software selectable AC coupling and IEPE excitation per channel
My question is:
Forget about DAQmx driver which we tried and couldn't detect the USB device. (error: 200220 - Device identifier is invalid)
Please concentrate on the NI-DAQmx Base driver. We need to use this with the NI USB 9234 with some TEDS microphones which needs IEPE 2mA.
Please let me know how to select AC coupling and supply IEPE excitation through the NI-DAQmx Base driver. C example of how to set them will be greatly appreciated. I cannot see any functions in C that we can select them as stated in the README documentation.
Looking forward to hearing from you soon.
11-17-2011 08:21 AM
Greetings,
I need to correct myself, DAQmx for Linux does not support the 9234, instead, you can use an undocumented function in DAQmx Base:
DAQmxBaseSetChanAttribute(TaskHandle taskHandle, const char channel[],int32 attribute, int32 value);
To implement IEPE, use the constants:
DAQmx_AI_Excit_Src for attribute
and
DAQmx_Val_Internal for value.
You can find the hidden functions by navigating to the header file NIDAQmxBase.h located in /usr/local/natinst/nidaqmxbase/include
I apologize for the confusion. Thanks.
Aldo
11-17-2011 04:33 PM
Thanks for your help. I think we are getting much closer to a solution.
Is the order of function calls important?
This compiles and runs but does not seem to have any effect. That is the measured voltages are just the same as not setting the Excit.
DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_Diff,min,max,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxBaseSetChanAttribute(taskHandle,"Dev1/ai0",DAQmx_AI_Excit_Src,DAQmx_Val_Internal));
When I set the channel attribute before creating the Voltage task:
DAQmxErrChk (DAQmxBaseSetChanAttribute(taskHandle,"Dev1/ai0",DAQmx_AI_Excit_Src,DAQmx_Val_Internal));
DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Diff,min,max,DAQmx_Val_Volts,NULL));
This error message appears:
DAQmxBase Error -200452: <err>Specified property is not supported by the device, is not applicable to the task, or is not implemented.
Are there any other attributes I should be setting? Such as the excitation current of 2mA
Are the following items attributes also required? From my testing these produce the same 200452 error message
DAQmxErrChk (DAQmxBaseSetChanAttribute(taskHandle,"Dev1/ai0",DAQmx_AI_Excit_DCorAC,DAQmx_Val_AC));
DAQmxErrChk (DAQmxBaseSetChanAttribute(taskHandle,"Dev1/ai0",DAQmx_AI_Excit_VoltageOrCurrent,DAQmx_Val_Current));
Cheers
11-21-2011 02:32 PM
Hi guys,
I just wanted to let you know that I have escalated your issue to R&D in order to get a clear explanation of what you should do to get this working. I will let you know when I hear back. Are you both working together on this?
Kind Regards,
Allie
11-21-2011 03:32 PM
Yes, we both work together with this issue.
The problem is that we are working on the undocumented C function and has so many unknowns and keeps getting error:
200452: <err>Specified property is not supported by the device, is not applicable to the task, or is not implemented.
We also tried using the "Ni-DAQmx Base Configuration Utility" but it cannot detect the USB NI 9234 device properly. So the only way is to tackle the C function directly.
We can test the microphone using the Test Panel / Create Task in "Measurement & Automation" but I assume it uses Ni-DAQmx instead of Ni-DAQmx-Base.
Please get back to us how to switch on the IEPE and gives 2mA on USB NI 9234 using the Ni-DAQmx-Base so that we can get some decent voltages when the TEDS microphones are attached.
Looking forward to hearing from you soon.