Axis System Initialization

Overview

Axis system specific initialization functions This groups defines all functions to setup and initialize labCAN axis systems properly.

+ Collaboration diagram for Axis System Initialization:

Functions

long LCA_ClearAxisFault (dev_hdl hAxis)
 Clear fault condition. More...
 
long LCA_Disable (dev_hdl hAxisSystem)
 Set all axis of an axis system into disabled state. More...
 
long LCA_DisableAxis (dev_hdl hAxis)
 Set a certain axis of an axis system into disabled state. More...
 
long LCA_Enable (dev_hdl hAxisSystem)
 Set all axis of an axis system into enabled (operational) state. More...
 
long LCA_EnableAxis (dev_hdl hAxis)
 Set single axis into enabled state. More...
 
long LCA_FindHome (dev_hdl hAxisSystem)
 Move all axis into its home position The axis system should manage the order of the movement and should know how to move all axis into a home state. More...
 
long LCA_FindHomeOfAxis (dev_hdl hAxis)
 Move single axis into its home position. More...
 
long LCA_GetAxisPosCnt (dev_hdl hAxis, long *pPosCntValue)
 Query the value of the internal axis position counter. More...
 
long LCA_RestoreAxisPosCnt (dev_hdl hAxis, long PosCntValue)
 Restore internal hardware position counter value. More...
 
long LCA_SetAxisHomingOffset (dev_hdl hAxis, double fOffset)
 Set the home offset used for homing moves. More...
 
long LCA_SetAxisHomingSwitchSpeed (dev_hdl hAxis, double fSpeed)
 Set speed for move to homing or limit switch. More...
 

Function Documentation

long LCA_ClearAxisFault ( dev_hdl  hAxis)

Clear fault condition.

This is some kind of error acknowledge that clears the last fault and sets the device in an error free state

Parameters
[in]hAxisValid axis handle
Returns
Error code - ERR_NOERR indicates success
long LCA_Disable ( dev_hdl  hAxisSystem)

Set all axis of an axis system into disabled state.

You have to be carefull if you set axis system into disabled state. If an axis is set disabled, the voltage is switched of so there is no force on an axis and if it is a vertical axis the axis may move because of gravity.

Parameters
[in]hAxisSystemValid axis system object handle
Returns
Error code - ERR_NOERR indicates success
Examples:
capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
long LCA_DisableAxis ( dev_hdl  hAxis)

Set a certain axis of an axis system into disabled state.

You have to be careful if you set axis system into disabled state. If an axis is set disabled, the voltage is switched of so there is no force on an axis and if it is a vertical axis the axis may move because of gravity.

Parameters
[in]hAxisValid axis handle
Returns
Error code - ERR_NOERR indicates success
long LCA_Enable ( dev_hdl  hAxisSystem)

Set all axis of an axis system into enabled (operational) state.

Parameters
[in]hAxisSystemValid axis system object handle
Returns
Error code - ERR_NOERR indicates success
Examples:
AxisSystem_CAPI_Init.cpp, capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
long LCA_EnableAxis ( dev_hdl  hAxis)

Set single axis into enabled state.

Parameters
[in]hAxisValid axis handle
Returns
Error code - ERR_NOERR indicates success
long LCA_FindHome ( dev_hdl  hAxisSystem)

Move all axis into its home position The axis system should manage the order of the movement and should know how to move all axis into a home state.

Parameters
[in]hAxisSystemValid axis system handle
Returns
Error code - ERR_NOERR indicates success
Note
The function returns a soon as the homing move started. A successfull return does not indicate, that the homing procedure was successfull.
Examples:
AxisSystem_CAPI_Init.cpp, capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
long LCA_FindHomeOfAxis ( dev_hdl  hAxis)

Move single axis into its home position.

Parameters
[in]hAxisValid axis handle
Returns
Error code - ERR_NOERR indicates success
long LCA_GetAxisPosCnt ( dev_hdl  hAxis,
long *  pPosCntValue 
)

Query the value of the internal axis position counter.

See also
LCA_RestoreAxisPosCnt()
Parameters
[in]hAxisValid axis handle
[out]pPosCntValueReturns the actual value of the position counter
Returns
Error code - ERR_NOERR indicates success
long LCA_RestoreAxisPosCnt ( dev_hdl  hAxis,
long  PosCntValue 
)

Restore internal hardware position counter value.

The function restores the internal position counter value saved with LCA_GetAxisPosCnt().

Note
In many axis systems the actual position value is countet 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 positon counter value after power on, an application can query the internal position counter value (LCA_GetAxisPosCnt()), store it persistenly into a configuration file and restore it later by calling this function.
See also
LCA_GetAxisPosCnt()
Parameters
[in]hAxisValid axis handle
[in]PosCntValueThe position counter value to restore
Returns
Error code - ERR_NOERR indicates success
long LCA_SetAxisHomingOffset ( dev_hdl  hAxis,
double  fOffset 
)

Set the home offset used for homing moves.

The home offset is a moving distance in homing procedure. It is useful to move away from a detected position e.g. mechanical border or limit switch at the end of the homing sequence. This move could prevent the axis from a border damage resp. limit switch error.

Parameters
[in]hAxisValid axis handle
[in]fOffsetThe home offset value in position units
Returns
Error code - ERR_NOERR indicates success
long LCA_SetAxisHomingSwitchSpeed ( dev_hdl  hAxis,
double  fSpeed 
)

Set speed for move to homing or limit switch.

The function LCA_FindHome() or LCA_FindHomeOfAxis() execute homing moves for a certain axis or a number axes. This function configures the speed to use during this homing move if when axis searches for the homing or limit switch.

Parameters
[in]hAxisValid axis handle
[in]fSpeedSpeed value for search for homing or limit switch
Returns
Error code - ERR_NOERR indicates success