Version 3 (modified by 14 years ago) ( diff ) | ,
---|
SetWIM
Setup for high speed buffered weight reading
void SetWIM(int nScale, int nOnThres, int nOffThres, int nCnt)
Parameters
- nScale - scale number
Return Value
Function does not return a result
Remarks
This function allocates memory to accommodate the specified count of weight values. When the gross weight exceeds the on threshold the buffering begins. Integer gross weights are recorded into the buffer. When the gross weight drops below the off threshold the buffering stops. This allows the application to process many gross weights in an array for high speed.
Example
extern int g_nRepWtIntv; int nOnThres = 1000; int nOffThres = 800; int nNumWtsToBuffer = 1000; SetWIM(1, nOnThres, nOffThres, nNumWtsToBuffer); SleepSeconds(1); g_nRepWtIntv = REP_INTV_SAMPLE_RATE; MnBdReqeust(1, MNBD_REQ_REP_WT, NO_WAIT_ACK); // Weights should now be coming in at the sample rate // Weights above the threshold will be recorded into the WIM buffer
See Also
Note:
See TracWiki
for help on using the wiki.