ReadAxisSecondEncoder
Reads the current position from an axis using the secondary encoder.
Syntax
KsError ReadAxisSecondEncoder(
int Index,
int* Value
);
Parameters
Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Value: pointer to the value to receive the current internal position of the axis.
Return value
If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.
Remarks
Used in the cyclic callback to check the internal position of an axis.
NOTE: The internal position is available only if EnableSecondEncoder is enabled.
Usable EtherCAT states
ecatOP
Example
Copy
int secondEncoderRead = 0;
nRet = ReadAxisSecondEncoder(0, &secondEncoderRead);
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.0 | 4.0 |
| Header | ksapi.h | ksapi.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also