Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Setting Excitation Voltage for 9237

Hi,

 

I have 3 load cells (full bridge) connected to a 9237 (in a 9171 chassis) and will do some measurements with Matlab 2012bin conjunction with DataAquisitionToolbox over NI-DAQmx 9.7.5.

 

If  I configure only 1 channel everything is fine.

But if I create a second or more channels, I get the following error:

 

>> s = daq.createSession('ni');
>> s.Rate=2000;
>> s.addAnalogInputChannel('cDAQ2Mod1','ai0','Bridge');
>> s.Channels(1,1).ExcitationVoltage = 3.3

s =

Data acquisition session using National Instruments hardware:
   Will run for 1 second (2000 scans) at 2000 scans/second.
   Number of channels: 1
      index Type  Device   Channel MeasurementType              Range             Name
      ----- ---- --------- ------- ---------------- ----------------------------- ----
      1     ai   cDAQ2Mod1 ai0     Bridge (Unknown) -0.025 to +0.025 VoltsPerVolt
   
Properties, Methods, Events

>> s.addAnalogInputChannel('cDAQ2Mod1','ai1','Bridge')
NI Error -200257:
Excitation property must be the same for related physical channels.

Refer to the documentation for information about setting excitation across
related physical channels.
Conflicting Properties

Property: DAQmx_AI_Excit_Src
Corresponding Value: DAQmx_Val_Internal

Property: DAQmx_AI_Excit_Val
Corresponding Value:  2.500000

Channel Name: cDAQ2Mod1/ai1

Task Name: _unnamedTask<20>

Status Code: -200257
 
>>

 

I get the same error when I first create more channels and then change the ExitationVoltage-Property.

My intention is to change the exitation voltage for all 3 or 4 channels to 3.3V.

 

1.) How can I set the ExitationVoltage value without getting an error ?

2.) Is it possible to change the default value for all channels ?

 

Thank you for any help,

 

Lutz

0 Kudos
Message 1 of 5
(4,181 Views)

Hi Lutz,

 

could you post your complete MATLAB Code here, from the moment you start your task?

 

I dont know yet if the problem is an NI-one or a Mathworks-one. The command in DAQmx C would be the following:

 

DAQmxCreateAIPressureBridgeTwoPointLinChan - NI-DAQmx C Reference Help - National Instruments
http://zone.ni.com/reference/en-XX/help/370471W-01/daqmxcfunc/daqmxcreateaipressurebridgetwopointlin...

There you can set the excitation voltage for the whole task so for all channel at the same time.

I dont know the Mathworks syntax, but hopefully I can make sense of it if you send me the complete code for the DAQ-Task?!

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 5
(4,138 Views)

Hi Christoph,

 

thank you very much for your reply.

My Matlab Code is

    s = daq.createSession('ni');
    s.IsContinuous = true;
    s.Rate=2000;
    s.addAnalogInputChannel('cDAQ2Mod1','ai0','Bridge');
    s.addAnalogInputChannel('cDAQ2Mod1','ai1','Bridge');
    s.addAnalogInputChannel('cDAQ2Mod1','ai2','Bridge');
    s.Channels(1,1).Name = '50N';
    s.Channels(1,2).Name = '100N';
    s.Channels(1,3).Name = '200N';
    s.Channels(1,1).BridgeMode = 'Full';    
    s.Channels(1,2).BridgeMode = 'Full';    
    s.Channels(1,3).BridgeMode = 'Full';
    s.Channels(1,1).NominalBridgeResistance = 350;
    s.Channels(1,2).NominalBridgeResistance = 350;
    s.Channels(1,3).NominalBridgeResistance = 350;
    s.Channels(1,1).Range = [-0.025 0.025];
    s.Channels(1,2).Range = [-0.025 0.025];
    s.Channels(1,3).Range = [-0.025 0.025];
    s.Channels(1,1).ExcitationVoltage = 3.3;
    s.Channels(1,2).ExcitationVoltage = 3.3;
    s.Channels(1,3).ExcitationVoltage = 3.3;

By the way, I get the same error, if I configure at first a channel with all prperties, then the next and so on.

Is there in Matlab any overloaded function to configure a channel with 1 command (like DAQmxCreateAIPressureBridgeTwoPointLinChan in C) ?

 

Best regards,

Lutz

0 Kudos
Message 3 of 5
(4,114 Views)

Hi Lutz,

 

after reading your code and the Mathworks help ressources it seems like you did exactly what they propose you to do. Since MATLAB is a Third Party Software and I can not test your code and therefore not modify it. You can also ask the MATLAB support what they are proposing to do to interact with their toolkit.

 

In addition to that I found a discussion, but in a lack of a possibility to validate this discussion, I just list it and unfortunately you would have to try the proposals yourself:

 

WLS 9234 - how to setup IEPE channel under Matlab - Discussion Forums
http://forums.ni.com/t5/Dynamic-Signal-Acquisition/WLS-9234-how-to-setup-IEPE-channel-under-Matlab/m...

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 4 of 5
(4,106 Views)

Hi Christoph,

 

thanks for your fast answer !

Coincidentally I'm working with NI9234 too. At some previous tests with 1 channel it works fine with 1 IEPE sensor.

It seems that I have to live with the default exititation voltage of 2,5V ...

 

Best regards,

Lutz

0 Kudos
Message 5 of 5
(4,103 Views)