wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/CheckWIM

Version 10 (modified by Don Wilson, 5 years ago) ( diff )

--

CheckWIM

* DEPRECATED * New apps should use MnBdSetWIM

Checks for availability of weight data in the high speed WIM weight buffer

int CheckWIM(int nScale)

Parameters

  • nScale - scale number

Return Value

  • Returns number of weights recorded in buffer

Remarks

For high speed the buffer records gross weight values only.

Example

extern int* pwim;

// Do WIM setup first ...
CSleep slp(0, 5); // setup 5 millisecond pause
int i, x;
while(1)
{
   slp.Pause();
   x = CheckWIM(1);
   if(x > 0)
   {
      // Loop through WIM samples
      for(i = 0; i < x; i++)
      {
          printf("weight %d\r\n", pwim[i]);
      }
   }
   else if(CheckWtRcv(1))  // If below threshold
   {
   
   }
   // Check for keypress or some other action to exit loop ...
}

See Also

Note: See TracWiki for help on using the wiki.