Overview
Functions to control and maintain the drive that drives the pump.
Functions | |
long | LCP_ClearFault (dev_hdl hPump) |
Clear fault condition. More... | |
long | LCP_Disable (dev_hdl hPump) |
Set pump into disabled state. More... | |
long | LCP_Enable (dev_hdl hPump) |
Set axis into enabled state. More... | |
long | LCP_GetDrivePosCnt (dev_hdl hPump, long *pPosCntValue) |
Query the value of the internal drive position counter. More... | |
dev_hdl | LCP_GetPumpDriveHandle (dev_hdl hPump) |
Returns the drive handle of pump drive for the given pump. More... | |
long | LCP_IsEnabled (dev_hdl hPump) |
Query if pump drive is enabled. More... | |
long | LCP_IsInFaultState (dev_hdl hPump) |
Check if pump is in a fault state. More... | |
long | LCP_RestoreDrivePosCnt (dev_hdl hPump, long PosCntValue) |
Restore internal hardware position counter value of pump drive. More... | |
Function Documentation
long LCP_ClearFault | ( | dev_hdl | hPump | ) |
Clear fault condition.
This is some kind of error acknowledge that clears the last fault and sets the device in an error free state. If the function LCP_IsInFaultState(void) indicates that device is in fault state, then this function may clear the fault. If the device is still in fault state after this function was called then a serious failure occurred
- Parameters
-
[in] hPump A valid pump handle
- Returns
- Error code
long LCP_Disable | ( | dev_hdl | hPump | ) |
Set pump into disabled state.
Call this function to remove power from pump drive
- Parameters
-
[in] hPump A valid pump handle
- Returns
- Error code
long LCP_Enable | ( | dev_hdl | hPump | ) |
Set axis into enabled state.
If the function LCP_IsEnabled(void) indicates that the device is disabled then call this function.
- Parameters
-
[in] hPump A valid pump handle
- Returns
- Error code
long LCP_GetDrivePosCnt | ( | dev_hdl | hPump, |
long * | pPosCntValue | ||
) |
Query the value of the internal drive position counter.
- See also
- LCP_RestoreDrivePosCnt()
- Parameters
-
[in] hPump Valid pump handle [out] pPosCntValue Returns the actual value of the position counter
- Returns
- Error code - ERR_NOERR indicates success
Returns the drive handle of pump drive for the given pump.
You can pass the drive handle to the motion control library to access the drive functionality (like reading and restoring the position counter) directly.
- Parameters
-
[in] hPump A valid pump handle
- Return values
-
0 - No pump drive access possible 1 - Pump drive handle <0 - Error code - Error getting pump drive handle
- Examples:
- capi_nemesys_test.cpp.
long LCP_IsEnabled | ( | dev_hdl | hPump | ) |
Query if pump drive is enabled.
Only if the pump drive is enabled it is possible to pump fluid
- Parameters
-
[in] hPump A valid pump handle
- Return values
-
1 - Pump drive is enabled, pumping is possible 0 - Pump drive is disabled - pump head is free running <0 - Error code
- Examples:
- capi_nemesys4_test.cpp, capi_nemesys_forcemon_test.cpp, and capi_nemesys_test.cpp.
long LCP_IsInFaultState | ( | dev_hdl | hPump | ) |
Check if pump is in a fault state.
If the device is in fault state then it is necessary to call LCP_ClearFault() to clear the fault state and then LCP_Enable() to enable the pump drive
- Parameters
-
[in] hPump A valid pump handle
- Return values
-
1 - Pump is in fault state 0 - Pump is not in fault state <0 - Error code - Error reading the fault state
long LCP_RestoreDrivePosCnt | ( | dev_hdl | hPump, |
long | PosCntValue | ||
) |
Restore internal hardware position counter value of pump drive.
The function restores the internal position counter value saved with LCA_GetDrivePosCnt(). This function is not required and not supported for devices that have an absolute encoder such as the new Nemesys 4 devices Nemesys S and Nemesys M.
- Note
- In many drives the actual position value is counted by a quadrature decoder. This internal position counter value will get lost, as soon as the device is switched off. In order to restore this position counter value after power on, an application can query the internal position counter value (LCA_GetDrivePosCnt()), store it persistently into a configuration file and restore it later by calling this function.
- See also
- LCP_GetDrivePosCnt()
- Parameters
-
[in] hPump Valid pump handle [in] PosCntValue The position counter value to restore
- Return values
-
ERR_NOERR indicates success -ERR_DEVNOSUPP if the device has an absolute encoder and restoring position counter values is not required and not supported.
- Examples:
- capi_nemesys4_test.cpp, and Pump_CAPI_Init.cpp.