API specific initialization functions.
This groups defines all functions to setup and initialize the labbCAN axis system API properly.
◆ LCA_AxisCount()
LCA_Func long LCA_CALL LCA_AxisCount |
( |
| ) |
|
Returns the number of available axes registered in the labbCAN environment.
- Return values
-
>=0 | Number of available axes |
<0 | Error code |
◆ LCA_GetAxisHandle()
LCA_Func long LCA_CALL 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] | hAxisSystem | A valid axis system handle |
[in] | AxisId | Identifier of a single axis of the axis system |
[out] | AxisHandle | Handle to axis device or 0 if the given index is out of range (>= LCA_GetAxisSystemAxisNumber()) |
- Return values
-
- Examples:
- capi_nemaxys_test.cpp, capi_rotaxys_test.cpp, and PositionMarker_CAPI.cpp.
◆ LCA_GetAxisSystemAxisNumber()
LCA_Func long LCA_CALL LCA_GetAxisSystemAxisNumber |
( |
dev_hdl |
hAxisSystem | ) |
|
Returns the number of axes of a certain axis system.
- Parameters
-
[in] | hAxisSystem | Valid axis system handle |
- Return values
-
0 | No axis system with this index or invalid parameter |
>0 | Number of axes |
- Examples:
- capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
◆ LCA_GetAxisSystemHandle()
LCA_Func long LCA_CALL LCA_GetAxisSystemHandle |
( |
unsigned char |
Index, |
|
|
dev_hdl * |
AxisSystemHandle |
|
) |
| |
Get an axis system handle by its index.
- Parameters
-
[in] | Index | Index into list of available axis systems |
[out] | AxisSystemHandle | Handle to axis system device or 0 if the given index is out of range (>= LCA_GetNoOfAxisSystems()) |
- Return values
-
-ERR_PARAM_RANGE | If the given device index is out of range |
ERR_NOERR | indicates success |
- Examples:
- capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
◆ LCA_GetNoOfAxisSystems()
LCA_Func long LCA_CALL 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.
◆ LCA_LookupAxisByName()
LCA_Func long LCA_CALL 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] | pAxisName | Zero terminated axis name string |
[out] | AxisHandle | Handle to axis device or 0 if no axis with given name exists |
- Return values
-
-ERR_NODEV | No device with the given name found |
ERR_NOERR | indicates success |
- Examples:
- capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.
◆ LCA_LookupAxisSystemByName()
LCA_Func long LCA_CALL 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] | AxisSystemName | Zero terminated axis name string |
[out] | AxisSystemHandle | Handle to axis system device or 0 if no axis system with given name exists |
- Return values
-
-ERR_NODEV | No device with the given name found |
ERR_NOERR | indicates success |
- Examples:
- AxisSystem_CAPI_Init.cpp, capi_nemaxys_test.cpp, and capi_rotaxys_test.cpp.