wiki:Docs/Prog/Manual/DeviceSupport/Weighing

Weighing

The 825 OS provides access to weight data by means of the mnbd-comm device driver. This device driver provides device files: /dev/wt1 - /dev/wt10 corresponding to scale 1 - scale 10. Device file /dev/wttot is used for total weight if the totalizer feature is enabled.

Get Weight

Command prompt testing

Make sure no applications are running or the weight server. Otherwise, the application or weight server may grab the response before you are able to retrieve it from the command prompt.

From the 825 command prompt type:

echo "W" > /dev/wt1
cat /dev/wt1
WA01004456A486000000004456A4860000

The response "WA" indicates the response for the "W" weight request is acknowledged "A". The following characters are hexadecimal encoded values for the floating point gross, tare, net weights and weight status information. Because this data represents floating point math values it is difficult to interpret. You may change the weight on the scale and repeat the test to see that the values change.

Access the weight data from a program

The lib825ev library provides features to facilitate access the weight information from an application program.

Refer to StartRepeatMulti for a simple example program showing weight.

Last modified 5 years ago Last modified on 03/13/20 12:06:41
Note: See TracWiki for help on using the wiki.