Overview

API specific initialization functions.

This groups defines all functions to setup and initialize the labbCAN axis system API properly.

+ Collaboration diagram for API Initialization:

Functions

long LCA_AxisCount ()
 Returns the number of available axes registered in the labbCAN environment. More...
 
long LCA_GetAxisHandle (dev_hdl hAxisSystem, unsigned char AxisId, dev_hdl *AxisHandle)
 Get an handle for a certain axis The functions LCB_ReadDevParam() and LCB_WriteDevParam() require a valid device handle to read and write device specific parameters. More...
 
long LCA_GetAxisSystemAxisNumber (dev_hdl hAxisSystem)
 Returns the number of axes of a certain axis system. More...
 
long LCA_GetAxisSystemHandle (unsigned char Index, dev_hdl *AxisSystemHandle)
 Get an axis system handle by its index. More...
 
long LCA_GetNoOfAxisSystems ()
 Query number of detected axis systems. More...
 
long LCA_LookupAxisByName (const char *pAxisName, dev_hdl *AxisHandle)
 Lookup an axis by its name. More...
 
long LCA_LookupAxisSystemByName (const char *AxisSystemName, dev_hdl *AxisSystemHandle)
 Lookup an axis system by its name. More...
 

Function Documentation

long LCA_AxisCount ( )

Returns the number of available axes registered in the labbCAN environment.

Return values
>=0Number of available axes
<0Error code
long LCA_GetAxisHandle ( dev_hdl  hAxisSystem,
unsigned char  AxisId,
dev_hdl AxisHandle 
)

Get an handle for a certain axis The functions LCB_ReadDevParam() and LCB_WriteDevParam() require a valid device handle to read and write device specific parameters.

An axis system normally consists of a number of single axis devices. In a CAN / CANopen environment these axis are single CAN nodes. Each single axis contains its own set of parameters. The read and write the parameters of single axis it is necessary to obtain a valid device handle first to pass this handle into the functions LCB_ReadDevParam() or LCB_WriteDevParam().

Parameters
[in]hAxisSystemA valid axis system handle
[in]AxisIdIdentifier of a single axis of the axis system
[out]AxisHandleHandle to axis device or 0 if the given index is out of range (>= LCA_GetAxisSystemAxisNumber())
Return values
-ERR_PARAM_RANGEIf the given device index is out of range (>= LCA_GetAxisSystemAxisNumber())
ERR_NOERRindicates success
Examples:
capi_nemaxys_test.cpp, capi_rotaxys_test.cpp, and PositionMarker_CAPI.cpp.
long LCA_GetAxisSystemAxisNumber ( dev_hdl  hAxisSystem)

Returns the number of axes of a certain axis system.

Parameters
[in]hAxisSystemValid axis system handle
Return values
0No axis system with this index or invalid parameter
>0Number of axes
Examples:
capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
long LCA_GetAxisSystemHandle ( unsigned char  Index,
dev_hdl AxisSystemHandle 
)

Get an axis system handle by its index.

Parameters
[in]IndexIndex into list of available axis systems
[out]AxisSystemHandleHandle to axis system device or 0 if the given index is out of range (>= LCA_GetNoOfAxisSystems())
Return values
-ERR_PARAM_RANGEIf the given device index is out of range
ERR_NOERRindicates success
Examples:
capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
long LCA_GetNoOfAxisSystems ( )

Query number of detected axis systems.

Returns the number of all available axis systems.

Return values
>=0 Number of detected axis systems
<0 Error code
Examples:
capi_rotaxys_test.cpp.
long LCA_LookupAxisByName ( const char *  pAxisName,
dev_hdl AxisHandle 
)

Lookup an axis by its name.

Each axis has an unique name. If an application knows the name of a certain axis then it can try to lookup an valid axis handle by the name of the axis. Normally you will find all axis names within the property XML file.

Parameters
[in]pAxisNameZero terminated axis name string
[out]AxisHandleHandle to axis device or 0 if no axis with given name exists
Return values
-ERR_NODEVNo device with the given name found
ERR_NOERRindicates success
Examples:
capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
long LCA_LookupAxisSystemByName ( const char *  AxisSystemName,
dev_hdl AxisSystemHandle 
)

Lookup an axis system by its name.

Each axissystem has an unique name. If an application knows the name of a certain axissystem, then it can try to lookup an valid axis handle by the of the axis system. Normally you will find all axis system names within the property XML file.

Parameters
[in]AxisSystemNameZero terminated axis name string
[out]AxisSystemHandleHandle to axis system device or 0 if no axis system with given name exists
Return values
-ERR_NODEVNo device with the given name found
ERR_NOERRindicates success
Examples:
AxisSystem_CAPI_Init.cpp, capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.