Get_Encoder_Count(1)
This function retrieves the current position (count) of the encoder. Note that this function is not
required to get the current count as it is continuously updated in the ENC#_Count variable
Data Values
ENC#_Count Variable that is updated with the value of the encoder count
# can be 1 or 2
Parameters
ENC# Identifies which Encoder channel is to be read
• can be ENC1 or ENC2
Returns
N – Encoder count (0 - 32767)
Error Codes
Bad_ID = an incorrect ENC ID was used.
Examples
User1 = Get_Encoder_Count(ENC1)
or
User1 = ENC1_Count
Get_Encoder_Vel(1)
This function retrieves the current velocity (PRM) of the encoder. The output is the speed in
revolutions Per Minute as scaled by the Setup_Encoder() function Note that this function is not
required to get the current velocity as it is continuously updated in the ENC#_VEL variable.
Data Values
ENC#_Vel Variable that is updated with the encoder velocity in RPM
# can be 1 or 2
Parameters
ENC# Identifies which Encoder channel is to be read
• can be ENC1 or ENC2
Returns
N – Encoder velocity (0 - 32767)
Error Codes
Bad_ID = an incorrect ENC ID was used.
Examples
User1 = Get_Encoder_Vel(ENC1)
or
User1 = ENC1_Vel
1310 Vehicle Control System Users Manual Release Rev B Page 35 of 51