Changes between Version 3 and Version 4 of Docs/Prog/Manual/DeviceSupport/Weighing


Ignore:
Timestamp:
02/19/10 17:03:35 (15 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/DeviceSupport/Weighing

    v3 v4  
    2121
    2222The lib825 library provides features to facilitate access the weight information from an application program.
     23
     24==== Cardinal Weighing Library Functions ====
     25
     26Header file: mnbdcomm.h
     27
     28void MnBdStartup() - Opens devices for weight and other external communications
     29   Parameters - None
     30   Return value - None
     31
     32int MnBdProcess() - Services devices checking for weight or other data received
     33   Parameters - None
     34   Return value - 0 = idle
     35                  mnbdProcWtRcv = weight data received
     36
     37float GetGrossWt(int scale) - Returns the gross weight
     38   Parameters - scale = scale number
     39   Return value - weight
     40
     41float GetTareWt(int scale) - Returns the tare weight
     42   Parameters - scale = scale number
     43   Return value - weight
     44
     45float GetNetWt(int scale) - Returns the net weight
     46   Parameters - scale = scale number
     47   Return value - weight
     48
     49byte GetWtStatus(int scale)
     50   Parameters - scale = scale number
     51   Return value - status byte bitmapped - possible bits
     52      nStatusBitMotion
     53      nStatusBitOverCap
     54      nStatusBitBelowZero
     55      nStatusBitCenterZero
     56      nStatusBitError
     57      nStatusBitKeypadTare
     58
     59bool GetMotion(int scale)
     60   Parameters - scale = scale number
     61   Return value - true if specified scale is in motion, otherwise false
     62
     63bool GetOverCap(int scale)
     64   Parameters - scale = scale number
     65   Return value - true if specified scale is in over capacity, otherwise false
     66
     67bool GetBelowZero(int scale)
     68   Parameters - scale = scale number
     69   Return value - true if specified scale is below zero, otherwise false
     70
     71bool GetCenterZero(int scale)
     72   Parameters - scale = scale number
     73   Return value - true if specified scale is at center of zero, otherwise false
     74
     75bool GetWtError(int scale)
     76   Parameters - scale = scale number
     77   Return value - true if specified scale is in weight error condition, otherwise false
     78
     79bool GetKeypadTare(int scale)
     80   Parameters - scale = scale number
     81   Return value - true if specified scale is in weight error condition, otherwise false
     82
     83int GetWtMode(int scale)
     84   Parameters - scale = scale number
     85   Return value - wtmode_gross, or wtmode_net mode of the specified scale
     86
     87void ToggleWtMode(int scale) - Toggles the specified scale between gross and net modes
     88   Parameters - scale = scale number
     89   Return value - None
     90
     91void SetWtMode(int scale, int wtmode)
     92   Parameters - scale = scale number
     93                wtmode = wtmode_gross, or wtmode_net
     94   Return value - None
     95
     96int GetNumScales(void)
     97   Parameters - None
     98   Return value - Number of scales
     99
     100char* FormatGrossWt(int scale, char* buf)
     101   Parameters - scale = scale number
     102                buf = character array buffer for output
     103   Return value - Pointer to buffer for convenience
     104
     105
     106
     107
     108
     109
     110
     111
     112
    23113
    24114{{{