Position marker functionality.
This group defines all functions to configure and read the position marker. A position marker is a captured position value. Some motion control devices support capturing of internal position values on change of a digital input. This function group supports the setup, configuration and use of a position marker. If a device does not support the position marker interface then the following functions will return -ERR_NOSUPP. Normally a position marker consists of a digital input that triggers position capturing, a position capture history and a certain Position capture configuration. The position capture history is a kind of an array that stores the captured positions. The newest position is always at array index position 0 and the older positions are following on higher array indices.
◆ LCA_ClearCapturedPositions()
LCA_Func long LCA_CALL LCA_ClearCapturedPositions |
( |
dev_hdl |
hAxis | ) |
|
Clear captured positions.
This functions clears the list of captured positions and resets the position counter to 0.
- Parameters
-
[in] | hAxis | Valid axis handle |
- Returns
- Error code - ERR_NOERR indicates success
- Examples:
- PositionMarker_CAPI.cpp.
◆ LCA_GetPositionHistorySize()
LCA_Func long LCA_CALL LCA_GetPositionHistorySize |
( |
dev_hdl |
hAxis | ) |
|
Query size of position history.
The size of the position history indicates how many positions can be captured before the first position will be overwritten by a new position value. The positions should be read before this happens.
- Parameters
-
[in] | hAxis | Valid axis handle |
- Return values
-
<0 | Error |
>0 | Position history size |
- Examples:
- PositionMarker_CAPI.cpp.
◆ LCA_IsPosMarkerSupported()
LCA_Func long LCA_CALL LCA_IsPosMarkerSupported |
( |
dev_hdl |
hAxis | ) |
|
Check if a certain axis supports position marker functionality.
- Parameters
-
[in] | hAxis | Valid axis handle |
- Return values
-
<0 | Error code |
0 | Position marker functionality not supported |
1 | Position marker functionality supported |
◆ LCA_ReadCapturedPosition()
LCA_Func long LCA_CALL LCA_ReadCapturedPosition |
( |
dev_hdl |
hAxis, |
|
|
unsigned short |
PosHistoryIndex, |
|
|
double * |
pfCapturedPosition |
|
) |
| |
Read captured position from device.
The position marker function holds a history of captured positions in an array. The newest position is always at array index 0. If more then one position is captured in "multiple capture mode" or "continuous capture
mode" the older captured positions will be shifted to the next array index.
- Note
- If the number of captured positions is more than the size of the position array in "continuous capture mode" the oldest marker positions are lost.
- Parameters
-
[in] | hAxis | Valid axis handle |
[in] | PosHistoryIndex | Index into list of captured positions |
[out] | pfCapturedPosition | The captured position read from list |
- Returns
- Error code - ERR_NOERR indicates success
- Examples:
- PositionMarker_CAPI.cpp.
◆ LCA_ReadPosMarkerCounter()
LCA_Func long LCA_CALL LCA_ReadPosMarkerCounter |
( |
dev_hdl |
hAxis, |
|
|
unsigned short * |
pPosCounter |
|
) |
| |
Reads the number of detected edges from device.
The position counter counts the number of detected edges / the number of captured positions. This function returns the number of captured positions.
- Parameters
-
[in] | hAxis | Valid axis handle |
[out] | pPosCounter | The position counter value read from device |
- Returns
- Error code - ERR_NOERR
- Examples:
- PositionMarker_CAPI.cpp.
◆ LCA_ReadPosMarkerEdgeType()
LCA_Func long LCA_CALL LCA_ReadPosMarkerEdgeType |
( |
dev_hdl |
hAxis, |
|
|
unsigned short * |
pEdgeType |
|
) |
| |
Reads the edge type for position capturing from device.
- Parameters
-
[in] | hAxis | Valid axis handle |
[out] | pEdgeType | Edge type |
- Returns
- Error code - ERR_NOERR indicates success
- See also
- Position Marker Edge Type
◆ LCA_ReadPosMarkerMode()
LCA_Func long LCA_CALL LCA_ReadPosMarkerMode |
( |
dev_hdl |
hAxis, |
|
|
unsigned short * |
pMode |
|
) |
| |
Reads the capturing mode from device.
- Parameters
-
[in] | hAxis | Valid axis handle |
[out] | pMode | Stores the capturing mode |
- Returns
- Error code - ERR_NOERR indicates success
- See also
- Position Marker Mode
◆ LCA_WritePosMarkerEdgeType()
LCA_Func long LCA_CALL LCA_WritePosMarkerEdgeType |
( |
dev_hdl |
hAxis, |
|
|
unsigned short |
EdgeType |
|
) |
| |
◆ LCA_WritePosMarkerMode()
LCA_Func long LCA_CALL LCA_WritePosMarkerMode |
( |
dev_hdl |
hAxis, |
|
|
unsigned short |
Mode |
|
) |
| |