Overview

This group defines all required functions for query of different dosing parameters and device states.

+ Collaboration diagram for Dosing Info:

Functions

long NemGetFlowRate (TNemesys *Nemesys, int32_t *pdwFlowRate)
 Query actual flow rate of dosing unit. More...
 
long NemGetSyringeLevel (TNemesys *Nemesys, int32_t *pSyringeLevel)
 Query actual syringe fill level. More...
 
long NemIsCalibrationFinished (TNemesys *Nemesys)
 Checks if a dosing unit finished the calibration move. More...
 
long NemIsDosingFinished (TNemesys *Nemesys)
 Checks if a dosing unit finished the last dosing task. More...
 

Function Documentation

long NemGetFlowRate ( TNemesys Nemesys,
int32_t *  pdwFlowRate 
)

Query actual flow rate of dosing unit.

Parameters
[in]NemesysDevice to query
[out]pdwFlowRateStores flow rate (speed in mrpm - millirevolutions per minute)
Returns
Error code - ERR_NOERR indicates success
1154 {
1155  int32_t Result;
1156 
1157  *pFlowRate = 0;
1158  Result = NemIsDosingFinished(Nemesys);
1159  if (Result < 0)
1160  {
1161  return Result;
1162  }
1163 
1164  //
1165  // If dosing is finished, then the flow rate is 0
1166  //
1167  if (Result)
1168  {
1169  Nemesys->LastVelocity = 0;
1170  }
1171 
1172  *pFlowRate = Nemesys->LastVelocity;
1173  return Result;
1174 }
int32_t LastVelocity
last flowrate value
Definition: nem_rs232_api.h:46
long NemIsDosingFinished(TNemesys *Nemesys)
Checks if a dosing unit finished the last dosing task.
Definition: nem_rs232_api.c:853

+ Here is the call graph for this function:

long NemGetSyringeLevel ( TNemesys Nemesys,
int32_t *  pSyringeLevel 
)

Query actual syringe fill level.

Parameters
[in]NemesysDevice to query
[out]pSyringeLevelStores the syringe level in increments 0 = empty syringe > 0 = filled syringe < 0 = invalid, axis needs recalibration
Returns
Error code - ERR_NOERR indicates success
1072 {
1073  return Nem_GetPosIs(Nemesys, pSyringeLevel);
1074 }
static long Nem_GetPosIs(TNemesys *Nemesys, int32_t *pdwPosIs)
Query actual device position value.
Definition: nem_rs232_api.c:765

+ Here is the call graph for this function:

long NemIsCalibrationFinished ( TNemesys Nemesys)

Checks if a dosing unit finished the calibration move.

During calibration the dosing unit moves the pusher to the lower limit switch and then to the zero position. Calibration is finished if the zero position is reached. (position counter is reset to zero)

Parameters
[in]NemesysDevice to query
Return values
1finished - drive stopped and calibrated
0calibration is active - drive is moving
<0Error code - ERR_NOERR indicates success
878 {
879  long Result;
880  uint8_t IsFinished;
881 
882  Result = Nem_IsState(Nemesys, SWBIT_HOMING_ATTAINED, SWBIT_HOMING_ATTAINED, &IsFinished);
883 
884  //
885  // If function call was successful then return the state of dosing move
886  // if function returns error code then return the error to user
887  //
888  if (Result != ERR_NOERR)
889  {
890  return Result;
891  }
892  else
893  {
894  return IsFinished;
895  }
896 }
#define SWBIT_HOMING_ATTAINED
homing position attained
Definition: nem_rs232_api.c:66
#define ERR_NOERR
No error.
Definition: err_codes.h:102
static long Nem_IsState(TNemesys *Nemesys, uint16_t wMask, uint16_t wState, uint8_t *pResult)
Test the status word for a certain bit pattern.
Definition: nem_rs232_api.c:780

+ Here is the call graph for this function:

long NemIsDosingFinished ( TNemesys Nemesys)

Checks if a dosing unit finished the last dosing task.

The last dosing task is finished if device reached the target volume or device reached its minimum or maximum limits. That means dosing is finished if device is stopped - it does not indicate, that dosing was successful (that the requested volume was completely transfered)

Parameters
[in]NemesysDevice to query
Return values
1finished - drive stopped and calibrated
0calibration is active - drive is moving
<0Error code - ERR_NOERR indicates success

Referenced by NemGetFlowRate().

854 {
855  long Result;
856  uint8_t IsFinished;
857 
858  Result = Nem_IsState(Nemesys, SWBIT_TARG_REACHED, SWBIT_TARG_REACHED, &IsFinished);
859 
860  //
861  // If function call was successful then return the state of dosing move
862  // if function returns error code then return the error to user
863  //
864  if (Result != ERR_NOERR)
865  {
866  return Result;
867  }
868  else
869  {
870  return IsFinished;
871  }
872 }
#define SWBIT_TARG_REACHED
target reached
Definition: nem_rs232_api.c:59
#define ERR_NOERR
No error.
Definition: err_codes.h:102
static long Nem_IsState(TNemesys *Nemesys, uint16_t wMask, uint16_t wState, uint8_t *pResult)
Test the status word for a certain bit pattern.
Definition: nem_rs232_api.c:780

+ Here is the call graph for this function: