Search the web
Sign In
New User? Sign Up
ultimaserial_group · UltimaSerial Users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Setting Full Scale   Message List  
Reply | Forward Message #714 of 794 |
Re: Setting Full Scale

If the conversion from your sensor to voltage is linear, you can do
the following

Find out the reading of your sensor corresponding to 10V (or the
positive maximum), for example, it is 200lbs

Find out the reading of your sensor at 0V, say 0lb

The reading will become:

Weight= 200 * (ADReading >>4)/2048



--- In ultimaserial_group@yahoogroups.com, "Mike Stephans"
<mike015@...> wrote:
>
> I have a DI158 and have put together some functional code, But I have
> not quite figured out how to adjust for full scale. The following
> comes from
>
http://www.ultimaserial.com/standard.html#To%20convert%20the%20AD%20Readings
>
> For DI-158 :
>
> Voltage = (FullScale/Gain) * (ADReading >>4)/2048
>
> where >>4 means to shift the data to the right for 4 bits. In VB,
> you can use INT (ADReading/16)
>
> I don't follow how to put this into practice.
> This is what I currently have which came from one of the examples.
>
> For i = 0 To Count - 1 Step UltimaSerial.ChannelCount
> For j = 0 To UltimaSerial.ChannelCount - 1
> ActiveSheet.Cells(CellIndex, j + 1) = Format$(buffer(i+ j) /
> 3276.8, "0.00")
> Next j
> CellIndex = CellIndex + 1 'next row
> Next i
>
> I am not looking to use volts as my units I am planning to use a
> custom scale.
> the 0to10v has a corresponding -6to14inches scale. and a gain of 1
> I expect the adjustment to be in the "Format$(buffer..." area.
>
> Thanks for any input.
> Mike
>





Tue Dec 30, 2008 4:34 pm

ultimaserial
Offline Offline

Forward
Message #714 of 794 |
Expand Messages Author Sort by Date

I have a DI158 and have put together some functional code, But I have not quite figured out how to adjust for full scale. The following comes from ...
Mike Stephans
mike015s
Offline Send Email
Dec 30, 2008
4:30 pm

If the conversion from your sensor to voltage is linear, you can do the following Find out the reading of your sensor corresponding to 10V (or the positive...
ultimaserial
Offline
Dec 30, 2008
4:34 pm

The code is integer division, AU = DI158 \ 16. I use it in my code. The $ converts values to string, which are not computable. Do all the computations and...
David Heiser
daheisercalif
Offline Send Email
Dec 30, 2008
10:24 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help