Overview

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.

+ Collaboration diagram for Position Marker:

Functions

long LCA_ClearCapturedPositions (dev_hdl hAxis)
 Clear captured positions. More...
 
long LCA_GetPositionHistorySize (dev_hdl hAxis)
 Query size of position history. More...
 
long LCA_IsPosMarkerSupported (dev_hdl hAxis)
 Check if a certain axis supports position marker functionality. More...
 
long LCA_ReadCapturedPosition (dev_hdl hAxis, unsigned short PosHistoryIndex, double *pfCapturedPosition)
 Read captured position from device. More...
 
long LCA_ReadPosMarkerCounter (dev_hdl hAxis, unsigned short *pPosCounter)
 Reads the number of detected edges from device. More...
 
long LCA_ReadPosMarkerEdgeType (dev_hdl hAxis, unsigned short *pEdgeType)
 Reads the edge type for position capturing from device. More...
 
long LCA_ReadPosMarkerMode (dev_hdl hAxis, unsigned short *pMode)
 Reads the capturing mode from device. More...
 
long LCA_WritePosMarkerEdgeType (dev_hdl hAxis, unsigned short EdgeType)
 Configure the edge type for position capturing. More...
 
long LCA_WritePosMarkerMode (dev_hdl hAxis, unsigned short Mode)
 Configures the capturing mode. More...
 

Function Documentation

long 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]hAxisValid axis handle
Returns
Error code - ERR_NOERR indicates success
Examples:
PositionMarker_CAPI.cpp.
long 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]hAxisValid axis handle
Return values
<0Error
>0Position history size
Examples:
PositionMarker_CAPI.cpp.
long LCA_IsPosMarkerSupported ( dev_hdl  hAxis)

Check if a certain axis supports position marker functionality.

Parameters
[in]hAxisValid axis handle
Return values
<0Error code
0Position marker functionality not supported
1Position marker functionality supported
long 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]hAxisValid axis handle
[in]PosHistoryIndexIndex into list of captured positions
[out]pfCapturedPositionThe captured position read from list
Returns
Error code - ERR_NOERR indicates success
Examples:
PositionMarker_CAPI.cpp.
long 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]hAxisValid axis handle
[out]pPosCounterThe position counter value read from device
Returns
Error code - ERR_NOERR
Examples:
PositionMarker_CAPI.cpp.
long LCA_ReadPosMarkerEdgeType ( dev_hdl  hAxis,
unsigned short *  pEdgeType 
)

Reads the edge type for position capturing from device.

Parameters
[in]hAxisValid axis handle
[out]pEdgeTypeEdge type
Returns
Error code - ERR_NOERR indicates success
See also
Position Marker Edge Type
long LCA_ReadPosMarkerMode ( dev_hdl  hAxis,
unsigned short *  pMode 
)

Reads the capturing mode from device.

Parameters
[in]hAxisValid axis handle
[out]pModeStores the capturing mode
Returns
Error code - ERR_NOERR indicates success
See also
Position Marker Mode
long LCA_WritePosMarkerEdgeType ( dev_hdl  hAxis,
unsigned short  EdgeType 
)

Configure the edge type for position capturing.

Parameters
[in]hAxisValid axis handle
[in]EdgeTypeEdge type
Returns
Error code - ERR_NOERR indicates success
See also
Position Marker Edge Type
Examples:
PositionMarker_CAPI.cpp.
long LCA_WritePosMarkerMode ( dev_hdl  hAxis,
unsigned short  Mode 
)

Configures the capturing mode.

Parameters
[in]hAxisValid axis handle
[in]ModeThe capturing mode to use
Returns
Error code - ERR_NOERR indicates success
See also
Position Marker Mode
Examples:
PositionMarker_CAPI.cpp.