| 23 | |
| 24 | ==== Cardinal Weighing Library Functions ==== |
| 25 | |
| 26 | Header file: mnbdcomm.h |
| 27 | |
| 28 | void MnBdStartup() - Opens devices for weight and other external communications |
| 29 | Parameters - None |
| 30 | Return value - None |
| 31 | |
| 32 | int MnBdProcess() - Services devices checking for weight or other data received |
| 33 | Parameters - None |
| 34 | Return value - 0 = idle |
| 35 | mnbdProcWtRcv = weight data received |
| 36 | |
| 37 | float GetGrossWt(int scale) - Returns the gross weight |
| 38 | Parameters - scale = scale number |
| 39 | Return value - weight |
| 40 | |
| 41 | float GetTareWt(int scale) - Returns the tare weight |
| 42 | Parameters - scale = scale number |
| 43 | Return value - weight |
| 44 | |
| 45 | float GetNetWt(int scale) - Returns the net weight |
| 46 | Parameters - scale = scale number |
| 47 | Return value - weight |
| 48 | |
| 49 | byte 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 | |
| 59 | bool GetMotion(int scale) |
| 60 | Parameters - scale = scale number |
| 61 | Return value - true if specified scale is in motion, otherwise false |
| 62 | |
| 63 | bool GetOverCap(int scale) |
| 64 | Parameters - scale = scale number |
| 65 | Return value - true if specified scale is in over capacity, otherwise false |
| 66 | |
| 67 | bool GetBelowZero(int scale) |
| 68 | Parameters - scale = scale number |
| 69 | Return value - true if specified scale is below zero, otherwise false |
| 70 | |
| 71 | bool GetCenterZero(int scale) |
| 72 | Parameters - scale = scale number |
| 73 | Return value - true if specified scale is at center of zero, otherwise false |
| 74 | |
| 75 | bool GetWtError(int scale) |
| 76 | Parameters - scale = scale number |
| 77 | Return value - true if specified scale is in weight error condition, otherwise false |
| 78 | |
| 79 | bool GetKeypadTare(int scale) |
| 80 | Parameters - scale = scale number |
| 81 | Return value - true if specified scale is in weight error condition, otherwise false |
| 82 | |
| 83 | int GetWtMode(int scale) |
| 84 | Parameters - scale = scale number |
| 85 | Return value - wtmode_gross, or wtmode_net mode of the specified scale |
| 86 | |
| 87 | void ToggleWtMode(int scale) - Toggles the specified scale between gross and net modes |
| 88 | Parameters - scale = scale number |
| 89 | Return value - None |
| 90 | |
| 91 | void SetWtMode(int scale, int wtmode) |
| 92 | Parameters - scale = scale number |
| 93 | wtmode = wtmode_gross, or wtmode_net |
| 94 | Return value - None |
| 95 | |
| 96 | int GetNumScales(void) |
| 97 | Parameters - None |
| 98 | Return value - Number of scales |
| 99 | |
| 100 | char* 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 | |