Specifications

36
Curtis 1310 Manual, Rev. B
5 — VCL
Get_Encoder_Dir(1)
This function retrieves the current direction (CW or CCW) of the encoder. Note that
this function is not required to get the current direction as it is continuously updated
in the
ENC#_Dir variable. However, if the encoder speed (ENC#_Vel ) is zero, the
direction signal is not valid.
Data Values
ENC#_Dir Variable that is updated with the value of the encoder count.
Parameters
Enc# Identifies which encoder is to be read (ENC1 or ENC2).
Returns
Encoder direction:
0 = stopped
1 = reverse
2 = forward
Error Codes Bad_ID Incorrect ENC ID was used.
Examples User1=Get_Encoder_Dir(ENC1)
or
User1=ENC1_Dir
Get_Encoder_Error(1)
This function retrieves the current error status of the encoder. Note that this func
-
tion is not required to get the current status as it is continuously updated in the
ENC#_Error variable.
Data Values
ENC#_Error Variable that is updated with the value of the encoder channel.
Parameters
Enc# Identifies which encoder is to be read (ENC1 or ENC2).
Returns
Error status:
0 = OK
1 = Channel A error
2 = Channel B error
Error Codes Bad_ID Incorrect ENC ID was used.
Examples User1=Get_Encoder_Error(ENC1)
or
User1=ENC1_Error