| 1 | = MnBdSetWIM = |
| 2 | Initiate mainboard for high speed buffered weight reading |
| 3 | |
| 4 | {{{ |
| 5 | int MnBdSetWIM(uint16 onDivisions, uint16 offDivisions, uint8 onCount, uint8 offCount, uint16 flag) |
| 6 | }}} |
| 7 | |
| 8 | == Parameters == |
| 9 | |
| 10 | * onDivisions - weight division value to starting recording when weight is above this value for at least onCount |
| 11 | * offDivisions - weight division value to stop recording when weight is below this value for at least offCount |
| 12 | * onCount - number of consecutive weight values that must be above onDivisions to start weight recording |
| 13 | * offCount - number of consecutive weight values that must be below offDivisions to stop weight recording |
| 14 | * flag - special settings bitfield |
| 15 | |
| 16 | == Return Value == |
| 17 | |
| 18 | OK - Mainboard responded successfully. |
| 19 | |
| 20 | == Remarks == |
| 21 | This function instructs the main board to prepare for buffered weight recording. When the gross weight division value exceeds the on threshold for consecutive on count the buffering begins. Gross weights are recorded into the buffer. When the gross weight drops below the off threshold for consecutive off count the buffering stops. This allows the application to process high speed. |
| 22 | |
| 23 | == Example == |
| 24 | |
| 25 | {{{ |
| 26 | |
| 27 | float onWtThres = 1500.0; |
| 28 | uint16 onThres = (int)(onWtThres / g_cal_param_n[1].interval); |
| 29 | |
| 30 | uint8 onCount = 3; |
| 31 | |
| 32 | float offWtThres = 1000.0; |
| 33 | uint16 offThres = (uint16)(offWtThres / g_cal_param_n[1].interval); |
| 34 | |
| 35 | uint8 offCount = 3; |
| 36 | |
| 37 | uint16 flags = 0; |
| 38 | |
| 39 | if(MnBdSetWIM(onThres, offThres, onCount, offCount, flags) != OK) |
| 40 | { |
| 41 | DrawErrorBox("Cannot start MNBD WIM", 15); |
| 42 | } |
| 43 | |
| 44 | }}} |
| 45 | |
| 46 | |
| 47 | == See Also == |
| 48 | |
| 49 | * [wiki:CheckWIM CheckWIM] |
| 50 | |