neMESYS SDK  20150729
Device State

Query device state. More...

Functions

NCS_Func long __stdcall NCS_ClearFault (ncs_hdl hDevice, unsigned char DosingUnit)
 Clears fault state of single dosing unit. More...
 
NCS_Func long __stdcall NCS_IsInFaultState (ncs_hdl hDevice, unsigned char DosingUnit)
 Check if dosing unit is in fault state. More...
 
NCS_Func long __stdcall NCS_IsOperational (ncs_hdl hDevice, unsigned char DosingUnit)
 Check if dosing unit is operational. More...
 
NCS_Func long __stdcall NCS_SetDisabled (ncs_hdl hDevice, unsigned char DosingUnit)
 Sets dosing unit into an disabled state. More...
 
NCS_Func long __stdcall NCS_SetOperational (ncs_hdl hDevice, unsigned char DosingUnit)
 Sets dosing unit into an operational state and apply voltage to pump drive. More...
 

Detailed Description

Query device state.

This group defines all required functions for reading and writing device state specific parameters. Each neMESYS pump maintains an internal state machine. The devic states are

A pump can execute dosing command only in device state operational. If a device error occures, i.e. if the device reaches a limit sensor, then the device goes from operational state into fault state. To check if the device is in fault state you can call the function NCS_IsInFaultState(). To leave the fault state, you can call the function NCS_ClearFault().

Note
If NCS_ClearFault() does not clear the fault state, then there might be a serious failure in device control electronics and you should call the technical support.

After the NCS_ClearFault() call, the pump should be in state disabled. That means, the error condition was resolved properly but the device is still not ready to process dosing commands. To set the device operational again, you should call NCS_SetOperational(). You can the call the function NCS_IsOperational() to check if the device is no in operational state.

Function Documentation

NCS_Func long __stdcall NCS_ClearFault ( ncs_hdl  hDevice,
unsigned char  DosingUnit 
)

Clears fault state of single dosing unit.

If a device error occures you need to call this function to set the dosing unit into an error free state. If a serious error occured then the device will be still in fault state after a call to this function.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
Returns
Error code - ERR_NOERR indicates success
NCS_Func long __stdcall NCS_IsInFaultState ( ncs_hdl  hDevice,
unsigned char  DosingUnit 
)

Check if dosing unit is in fault state.

If dosing unit is in fault state then you can try to clear the fault state by calling NCS_ClearFault()

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
Return values
0Dosing is not in fault state
1Dosing unit is in fault state
<0Error code
NCS_Func long __stdcall NCS_IsOperational ( ncs_hdl  hDevice,
unsigned char  DosingUnit 
)

Check if dosing unit is operational.

If a dosing unit is not in fault state but it is not operational then you should call the function NCS_SetOperational() to set the unit into an operational state.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
Return values
0Dosing unit is not operational
1Dosing unit is operational
<0Error code
NCS_Func long __stdcall NCS_SetDisabled ( ncs_hdl  hDevice,
unsigned char  DosingUnit 
)

Sets dosing unit into an disabled state.

Disable dosing unit and turn voltage of drive unit off. No dosing is possible in this state.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
Returns
Error code - ERR_NOERR indicates success
NCS_Func long __stdcall NCS_SetOperational ( ncs_hdl  hDevice,
unsigned char  DosingUnit 
)

Sets dosing unit into an operational state and apply voltage to pump drive.

Dosing is possible only in operational state. If a device error occured you first need to call NCS_ClearFault() and then you need to call this function to set a single dosing unit into an operational state.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
Returns
Error code - ERR_NOERR indicates success