Changes between Initial Version and Version 1 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/DLCRepeatMultiIncludeCellWts


Ignore:
Timestamp:
03/16/20 15:01:45 (5 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/DLCRepeatMultiIncludeCellWts

    v1 v1  
     1= DLCRepeatMultiIncludeCellWts =
     2Enable/Disable repeat multi when used with DLC to include provide individual cell weights to app
     3
     4{{{
     5int 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
     24AllocateRepeatMultiCellWtMemory(GetNumScales());
     25
     26if(DLCRepeatMultiIncludeCellWts(1, true) != OK)
     27{
     28   DEBUG_MSG("Error set multi repeat cell wts\r\n");
     29}
     30
     31MnBdSetEvent(MNBD_REQ_REP_MULTI, MnBdEventMultiRcv);
     32
     33if(StartRepeatMulti(100) == OK)
     34    DisplayText(0, 0, "Wt and I/O 10 times per second");
     35
     36
     37...
     38
     39MNBD_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
     58The above example will output cell weights such as:
     59
     60{{{
     61Cell wts for scale 1    3665   1335   7289  12839
     62Cell wts for scale 2   14250  11641     -0      0
     63Cell wts for scale 3       0      0     -0     -0
     64Cell wts for scale 1    3665   1335   7288  12838
     65Cell wts for scale 2   14250  11641      0      0
     66Cell wts for scale 3       0      0     -0     -0
     67Cell wts for scale 1    3665   1336   7288  12838
     68Cell wts for scale 2   14249  11641     -0      0
     69Cell wts for scale 3       0      0     -0     -0
     70Cell wts for scale 1    3665   1336   7288  12838
     71Cell wts for scale 2   14250  11642      0      0
     72Cell wts for scale 3      -0      0     -0     -0
     73}}}
     74
     75
     76
     77
     78== See Also ==
     79
     80 * [wiki:StartRepeatMulti StartRepeatMulti]