Conversions | LabJack
 

Conversions

25 posts / 0 new
Last post
Jim
Jrmullensjr's picture
Conversions

Im having trouble with conversions. I have a load cell on Ain2 & Ain3. The load cell is a 3000#. Signal conditioner is a 0-10v. My conversion is (value*0.000314-10.3)*300. It seems that it is not enough. I have a graph from another instrument to use for comparison. It looks to be almost exact if I multiply by 600 instead of 300. Am I doing something wrong?

LabJack Support
labjack support's picture
Can you provide a link to

Can you provide a link to details for your signal conditioner?

What is the mV/V output rating of your load cell?  Some common values are 1.5 mV/V, 2 mV/V or 3 mV/V.

What excitation voltage does the signal conditioner provide to the load cell?  10V is common.

What is the gain of your signal conditioner?

If your excitation is 10V and your load cell output is 2 mV/V, then you know your load cell gives 20 mV at rated load (3000 lb).  If the gain of your signal conditioner is x500, then 0-3000 pounds would give 0-10 volts.

Jim
Jrmullensjr's picture
My signal conditioner is a

My signal conditioner is a Precise AT-08. My load cell is 3.011 Mv/v. This conditioner provides a 10 volts excitation. My understanding is at 3000# I would be outputting a 30 mv signal. I built a signal generator which I have set at 30 mv and I set the conditioner output to 10 volts. 

As I stated before the graph is not  corresponding to the one I have from the manufacturer. This setup is a shock dyno for measuring force vs velocity. I'm using the dyno sheet from the shock manufacturer dial in everything. 

LabJack Support
labjack support's picture
If your load cell is 3.011 mV

If your load cell is 3.011 mV/V and you are giving it 10V excitation, then it will give you 30.11 mV at 3000 pounds.

The following is a good overall forum post about bridge circuits:

http://forums.labjack.com/index.php?showtopic=4376

Troubleshooting wrong values:  Put a known load on the load cell and check the bridge voltages with a DMM.  Measure from Vexc+ to Vexc- to confirm the excitation voltage.  Measure from Signal+ to Signal- to confirm the signal voltage is as expected.  For example, with 200 pounds the expected signal from the raw load cell is 30.11*200/3000 = 2.007 mV.

Further, if the gain of your signal conditioner is x500, then it should amplify the 2.007 mV to 1.004 volts.

Jim
Jrmullensjr's picture
Hello

Hello

Im still having difficulty with my conversions. I measured at the Labjack inputs and I'm getting voltage I'm supposed to have. (50# is approximately 167 mv). When I look on Daq it doesn't match my 50#. 

I used the formula ((value/65536)*20.6-10.3). I get a slight offset off about 0.02 which I deduct at the end. Then I multiply it by 300 because I have a 3000# load cell with a 0-10 volt conditioner. My final formula is (((value/65536)*20.6-10.3)+0.02)*300

Do I need to script to do a differential? I'm using Ain3 with Ain2 in notes. 

LabJack Support
labjack support's picture
If your signal conditioner is

If your signal conditioner is outputting a 0-10V signal then you can probably get away with a single-ended measurement. Then just take two calibrated weights, record the labjack's response to the those two weights and create a slope-offset calibration. That should do it.

Differential readings on HV lines are difficult because there is no way to account for error caused by common mode voltage. It is best to avoid using a differential reading on the HV lines. And if your signal conditioner is good then single-ended should work well.

Jim
Jrmullensjr's picture
I did as you said and all

I did as you said and all seems well. My problem now is how to average my readings. I need to average the y readings based on x reading. In other words I have a load cell called damping on channel 3 on y axis of graph. The reading are not exact so I get a line which is very thick. The x axis is velocity measuring in/sec. 

So at say 1 in/sec I might get readings from 50-60 lbs. I would like to average various points along the x axis but don't know how. I'm afraid that boxcar, smooth or mean would affect the entire graph resulting in a flat line instead of a sloping one. 

My other, more precise measurement, would be using the 60-2 trigger wheel. I would have the Labjack read both channels on every pulse. This would give great repeatability. I would prefer this course of action if you could direct me in how to do this. 

LabJack Support
labjack support's picture
How often are you collecting

How often are you collecting data points. The U3 can read fairly quickly. If you use Add-Go-Get you can squeeze multiple conversions into a single packet. You can probably collect and average several readings without slowing your system down.

Jim
Jrmullensjr's picture
My timing is 0.02. Im just

My timing is 0.02. Im just not sure how to do the averaging. 

LabJack Support
labjack support's picture
What programming language are

What programming language are you using? 20 ms should be enough time to average at least 16 values. A moving average may also work.

Jim
Jrmullensjr's picture
I am using daqfactory express

I am using daqfactory express. I will upgrade once I get everything working. 

LabJack Support
labjack support's picture
In DAQFactory, in the channel

In DAQFactory, in the channel settings you can enable averaging and specify the number of points (boxcar average). There is also a "mean" function where you pass it the array of values to average.

Jim
Jrmullensjr's picture
Wondering if you can help me.

Wondering if you can help me. I'm plotting a graph with force on left and velocity on bottom. The data is from a load cell being cycled about 100 rpm. I'm trying to average due to what I believe is hysteresis. I need to average data from force based on velocity. All the averaging functions seem to do consecutive data points and that won't work for me. 

Thank you

LabJack Support
labjack support's picture
I'm afraid that is beyond our

I'm afraid that is beyond our DAQFactory expertise.  I will notify AzeoTech of this topic, but suggest you go ahead and post on their forum:

http://support.azeotech.com/

AzeoTech
AzeoTech's picture
You have to use the boxcar

You have to use the boxcar functions to average arrays when you want the result to also be an array that you can graph.  Using mean() will reduce the data down to a single value which can't be graphed.  You can also use smooth() which does a running average and also returns an array that can be graphed.

Jim
Jrmullensjr's picture
Hi

Hi

Could you point me in the right direction? I followed the code examples in the manual. I'm trying to stream two channels on a Labjack U3-HV, om AIN2 and AIN3. All seems well as there are no error messages in window alert box. My question is where does the data go for storage and how do I retrieve it? I'm trying to plot an xy graph with these channels and cant get any data from my sequence.

LabJack Support
labjack support's picture
Perhaps confirm you can get

Perhaps confirm you can get the stream example running:

https://labjack.com/support/ud/df-lj-app-guide/9.2

https://labjack.com/support/software/examples/ud/daqfactory

Then starts making the modifications you want until you break it, and then post that ctl on AzeoTech's forum.

Jim
Jrmullensjr's picture
I followed the example as

I followed the example as described and get an error. Stream is not active. I've triple checked all the spelling and punctuation and same message. 

I get data on my graph but I don't think it's the streaming data. 

LabJack Support
labjack support's picture
Make sure you are only

Make sure you are only running 1 LabJack related application at a time.

I tested "StreamOneChannel_UD.ctl" and "StreamFourChannels_UD.ctl" with both a U3-HV and U3-LV and everything works fine.  I've attached 2 screenshots from my testing.

First screenshot is when I first open.  If my U3 was not connected you would see an error in the Command/Alert window since there is a startup sequence that sends a command to the device.

Second screenshot is after I push the Start button.  Still no errors and it is streaming.  I connected a jumper wire to AIN0 on my U3-HV and touched it to VS and GND to get different voltages.

Jim
Jrmullensjr's picture
I went on daqfactory samples

I went on daqfactory samples and my channels will stream on there graph. When I go back to my sequence, which is exactly as shown in the guide, I get an error: stream is inactive. 

The only difference is I'm trying to do it on an x vs y graph. Could that be the problem? Although I don't see why. 

LabJack Support
labjack support's picture
When do you get the "stream

When do you get the "stream is inactive" error?

That error suggests the DF is trying to read stream data but the stream is not going.  Perhaps you do have a button that is calling a StartStream sequence, like in our examples, but the StartStream sequence encounters an error and the stream does not actually start?  Do you have the ErrorHandler calls after every LabJackUD library call as shown in the example?  Are you viewing the Command/Alert window, like in my previous screenshots, so you can see any errors?

You might need to post your CTL on AzeoTech's forum so they can look at it.

Jim
Jrmullensjr's picture
I have copied the example

I have copied the example from daq factory/lj guide. I actually get the stream to graph as I want but it's acting funny. When I hit the start stream button I get an alert in the command/alert window but it will actually stream. I know it's streaming because I change the scanrate in my sequence and I can see it change on the graph. Just thought that was a little weird. 

LabJack Support
labjack support's picture
Did you get any feedback on

Did you get any feedback on AzeoTech's forum?

http://support.azeotech.com/

I just tested "StreamOneChannel_UD.ctl" and "StreamFourChannels_UD.ctl" with my U3-HV and both streamed without any errors.  Screenshot attached.  Do you get an error from these?

https://labjack.com/support/software/examples/ud/daqfactory

File Attachment: 
Jim
Jrmullensjr's picture
Hi

Hi

Need a little help. I just purchased a LJTDAC and its not working correctly. I followed the example code,except Im on fio6/7. The big problem is the utility wont work. I get a python error 116. Im not running puthon so is that the problem?  Do I need to load something else to get it to work?

thanks

LabJack Support
labjack support's picture
The utility is written in

The utility is written in Python, but that error sounds like it is referring to low-level error code 116, I2C_BUS_BUSY. Error 116 can happen if I2C communications (what LJTick-DAC uses) are performed on a digital line being held low. For example, connecting GND to FIO4 on application startup will cause error 116.

First make sure your LJTick-DAC has a secure connection in the U3 screw terminals. The LJTickDAC utility is a simple application where it tries to connect to FIO6/7 by default, and can be setup on FIO6/7 after the application opens. When starting the application either have your LJTick-DAC connected to FIO5/FIO6, or have no connections to FIO4/5 and setup the the LJTick-DAC on FIO6/7.