| 1 | = DLCRepeatMultiIncludeCellWts = |
| 2 | Enable/Disable repeat multi when used with DLC to include provide individual cell weights to app |
| 3 | |
| 4 | {{{ |
| 5 | int DLCRepeatMultiIncludeCellWts(int dlcCard, bool enable); |
| 6 | }}} |
| 7 | |
| 8 | == Parameters == |
| 9 | |
| 10 | * dlcCard - card number of DLC card |
| 11 | * enable - true to set app to receive cell weights, false for no cell weights |
| 12 | |
| 13 | == Return Value == |
| 14 | |
| 15 | * Returns the result - OK success |
| 16 | |
| 17 | == Remarks == |
| 18 | |
| 19 | |
| 20 | == Examples == |
| 21 | |
| 22 | {{{ |
| 23 | |
| 24 | AllocateRepeatMultiCellWtMemory(GetNumScales()); |
| 25 | |
| 26 | if(DLCRepeatMultiIncludeCellWts(1, true) != OK) |
| 27 | { |
| 28 | DEBUG_MSG("Error set multi repeat cell wts\r\n"); |
| 29 | } |
| 30 | |
| 31 | MnBdSetEvent(MNBD_REQ_REP_MULTI, MnBdEventMultiRcv); |
| 32 | |
| 33 | if(StartRepeatMulti(100) == OK) |
| 34 | DisplayText(0, 0, "Wt and I/O 10 times per second"); |
| 35 | |
| 36 | |
| 37 | ... |
| 38 | |
| 39 | MNBD_EVENT(MultiRcv) |
| 40 | { |
| 41 | if(repeat_multi_record == 0) // Scale weights and I/O status |
| 42 | { |
| 43 | ... |
| 44 | } |
| 45 | else if(repeat_multi_record > 0x30 && repeat_multi_record < 0x34) // Cells weights for scale |
| 46 | { |
| 47 | int n = repeat_multi_record - 0x31; |
| 48 | DEBUG_MSG("Cell wts for scale %d %6.0f %6.0f %6.0f %6.0f\r\n", n + 1, |
| 49 | REPEAT_MULTI_CELL_WT(n, 0), REPEAT_MULTI_CELL_WT(n, 1), REPEAT_MULTI_CELL_WT(n, 2), REPEAT_MULTI_CELL_WT(n, 3)); |
| 50 | |
| 51 | } |
| 52 | |
| 53 | return 0; |
| 54 | } |
| 55 | |
| 56 | }}} |
| 57 | |
| 58 | The above example will output cell weights such as: |
| 59 | |
| 60 | {{{ |
| 61 | Cell wts for scale 1 3665 1335 7289 12839 |
| 62 | Cell wts for scale 2 14250 11641 -0 0 |
| 63 | Cell wts for scale 3 0 0 -0 -0 |
| 64 | Cell wts for scale 1 3665 1335 7288 12838 |
| 65 | Cell wts for scale 2 14250 11641 0 0 |
| 66 | Cell wts for scale 3 0 0 -0 -0 |
| 67 | Cell wts for scale 1 3665 1336 7288 12838 |
| 68 | Cell wts for scale 2 14249 11641 -0 0 |
| 69 | Cell wts for scale 3 0 0 -0 -0 |
| 70 | Cell wts for scale 1 3665 1336 7288 12838 |
| 71 | Cell wts for scale 2 14250 11642 0 0 |
| 72 | Cell wts for scale 3 -0 0 -0 -0 |
| 73 | }}} |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | == See Also == |
| 79 | |
| 80 | * [wiki:StartRepeatMulti StartRepeatMulti] |