LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading load cells and strain gauges (with offset nulling) using PXIe 4331

Solved!
Go to solution

I am using PXIe 4331 to read load cells and strain gages. The first two channels are the loadcell channels and the next three channels are the strain gages. I wired them as shown in the code diagram. The problem is when I null the strain gages with the Perform Bridge Offset Nulling subVI my load cells are nulled to zero too. I do not want to null my load cells.

 

I was wondering what is the best way to connect the load cells and the strain gages (and I want to null strain gages at the start of the program). I suspect having the strain gage channels before the load cell channels would help but I will not be using all the three strain gages all the time; sometimes three and sometimes one. So I think it is necessary to have it this way.

 

codsnippet.png

 

 

0 Kudos
Message 1 of 9
(5,673 Views)

Hello, Sharmaa!

 

If you take a look at context help (ctrl+h in LabVIEW) for the Perform Bridge Offset Nulling function, you'll see that it performs the nulling operation on all channels in the task. As your code sits now, it uses the same task for all of your measurements, so they will all be nulled. You'll need to create a seperate task for only your strain guages - leaving your bridges in their own, seperate, task. 

 

Once the measurement types are in seperate tasks, you'll only sire the strain guage task into the Perform Bridge Offset Nulling function, and only the strain guages will be nulled.

 

If you have questions on how to go about this - please let us know!

 

Will Hilzinger | Switch Product Support Engineer | National Instruments
0 Kudos
Message 2 of 9
(5,658 Views)

Hi Will,

 

Thank you for your response. I had previously, setup the code in the way you suggested, two separate tasks, one for the two load cells and one for the four strain gages which required two DAQmx Start Task.vi to starts those two tasks and two separate DAQmx Read.vi to read data. But that arrangement gave me the error: 

Error -50103 occurred at DAQmx Create Channel (AI-Strain-Strain Gage).vi:1

Possible reason(s):

NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.

Task Name: TaskStrain

 

In the error the Task Name was sometimes TaskStrain, the task for the strain gages and sometimes TaskLoad, the task for the load cells.

 

 So I changed it to the one shown above and everything worked except  the nulling problem. I was under the impression that two separate tasks could not be started in the same Daq card.

 

I think, I do need help one this.

 

Thanks you.

0 Kudos
Message 3 of 9
(5,649 Views)

Hello, sharmaa!

 

Silly me - in my haste to fix your issue, I overlooked a simple solution. The Perform Bridge Offset Nulling subVI actuall has an input that allows you to select specifc physical channels that you want to perform your nulling on (see below). Simply input the channels with your strain gauges, and you should be all set!

 

DAQmx Help - DAQmx Perform Bridge Offset Nulling Calibration.png

Will Hilzinger | Switch Product Support Engineer | National Instruments
0 Kudos
Message 4 of 9
(5,637 Views)

Hi Will,

 

Sorry, I was busy with something else. I tried what you said but I have a problem. When I try to wire a  contant to the "channels" I am presented with a dropdown menu which shows channels created MAX. I also tried to make an array of DAQmx Physical Channels and feed it to the "channels" input but that does not work. How do I select specific physcial channels?

 

Thanks

0 Kudos
Message 5 of 9
(5,623 Views)

sharmaa,

 

Create the task and add only the channels you wish to null.  Perform the null, then add the rest of the channels.

 

Just remembered that you can use a string for the Channel Name on the null function.  Looks like you already named the channels when you created them.

0 Kudos
Message 6 of 9
(5,621 Views)
Solution
Accepted by topic author sharmaa

Hello, Sharmaa!

 

Wayne is correct, you can use a string for the channel name.

 

First, create a constant (or control, your choice) by right-clicking the channel node of the Perform Bridge Offset Nulling function, and going to Create>>constant.

 

In the box that appears, enter the desired channels.If your single channel name is "PXI1Slot2_2/ai0" and you want to null calibrate your strain gauges on channels 0, 1, and 2, you'll enter "PXI1Slot2_2/ai0:2" instead.

 

Note ai0:2 instead of ai0

 

Let us know if this does the trick!

 

Will Hilzinger | Switch Product Support Engineer | National Instruments
Message 7 of 9
(5,604 Views)

Thanks a lot that worked.

0 Kudos
Message 8 of 9
(5,569 Views)

I understand that if the strain gauge has no stress, the initial reading will be zero if nulling will be performed. But, is the null and shunt calibration necessary for a load cell using the NI 4331 card?

0 Kudos
Message 9 of 9
(4,970 Views)