8.21
EnDat 2.1: Resetting the Encoder
The EnDat reset command is sent to the encoder. This function may only be performed in Polling mode. The axis must be
configured for EnDat01, EnDat21 or EnDat22 encoders. An EnDat 2.1 reset is always sent, even if the axis is configured for
EnDat 2.2. The encoder performs a reset and is unavailable for a certain time. Additional information can be found in the data
sheet for the encoder.
Function
EIB7_ERR EIB7EnDat21ResetEncoder
Parameter
axis
Return code
The return code delivers a status for the function call. In addition to the standard return codes, the following error messages
can occur.
EIB7_InvInterface
EIB7_NotInitialized
EIB7_EncPwrSuppErr
EIB7_EnDatErrII
EIB7_EnDatIfBusy
EIB7_EnDatXmitErr
8.22
EnDat 2.1: Reading the Test Value
A test value is read from the EnDat encoder. The test value is 40 bits long and is returned via two parameters. The contents
of the parameters are listed in the table below. This function may only be performed in Polling mode. The axis must be
configured for EnDat01, EnDat21 or EnDat22 encoders. An EnDat 2.1 command is always sent, even if the axis is configured
for EnDat 2.2.
Parameter
low
high
Figure 1: Data bit test value
Function
EIB7_ERR EIB7EnDat21ReadTestValue
Parameters
axis
high
low
Return code
The return code delivers a status for the function call. In addition to the standard return codes, the following error messages
can occur.
EIB7_InvInterface
EIB7_NotInitialized
EIB7_EncPwrSuppErr
EIB7_EnDatErrII
EIB7_EnDatIfBusy
EIB7_EnDatXmitErr
74
AXIS handle
Axis is not configured for EnDat encoders
Axis is not initialized
Error in the encoder power supply (encoder is not ready for operation)
Type II EnDat error occurred
EnDat master not ready for operation
Error during data transmission (encoder might not be connected)
Data bit parameter
D0 to D31
D0 to D7
D8 to D31
AXIS handle
[return code] Pointer to the variable for the test value (most significant part)
[return code] Pointer to the variable for the test value (least significant part)
Axis is not configured for EnDat encoders
Axis is not initialized
Error in the encoder power supply (encoder is not ready for operation)
Type II EnDat error occurred
EnDat master not ready for operation
Error during data transmission (encoder might not be connected)
( EIB7_AXIS
)
Data bit test value
D0 to D31
D32 to D39
Reserved
( EIB7_AXIS
unsigned long*
unsigned long*
)
axis
axis,
high,
low
Need help?
Do you have a question about the EIB 741 and is the answer not in the manual?