EasyManua.ls Logo

Curtis 1239E - Page 140

Curtis 1239E
160 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
10 — VEHICLE CONTROL LANGUAGE (VCL)
Curtis 1239E-1269E Manual, os 37.0 RevA – May 2021
Return to TOC
pg. 136
AUTOMATE_ENCODER( )
Automate_Encoder() allows processing of low bandwidth Sin/Cos signals for use in VCL. is
function runs in the 4 ms queue.
Syntax:
Automate_Encoder(ENC#, @ChannelA, @ChannelB, V_
Min_A, V_Max_A, V_Min_B, V_Max_B, Encoder_Type)
Parameters:
ENC# ENC1 or ENC2 (Holds the ID of the desired encoder block).
@ChannelA Pointer to source variable 1 (–32767 – 32767).
@ChannelB Pointer to source variable 2 (–32767 – 32767).
V_Min_A Minimum Voltage of encoder channel A (–32767 – 32767).
V_Max_A Maximum Voltage of encoder channel A (–32767 – 32767).
V_Min_B Minimum Voltage of encoder channel B (–32767 – 32767).
V_Max_B Maximum Voltage of encoder channel B (–32767 – 32767).
Encoder_Type Only Sin/Cos encoders are supported, this should be set to 0.
Returns:
0 Function did not successfully execute.
1 Function successfully executed.
Error Codes:
BAD_ID
ENC# out of Range.
PT_RANGE
Invalid source or destination parameter.
The outputs of these functions are as follows:
ENC1_rev_output – ENC1’s output in revolutions
(–32767 – 32767)
ENC1_Angle – ENC1’s output angle in degrees (0 – 4096 = 0 –
360 degrees)
ENC2_rev_output – ENC2’s output in revolutions
(–32767 – 32767)
ENC2_Angle – ENC2’s output angle in degrees (0 – 4096 = 0 –
360 degrees)
Example:
Return = Automate_Encoder(ENC#, @ChannelA, @
ChannelB, V_Min_A, V_Max_A, V_Min_B, V_Max_B,
Encoder_Type)

Table of Contents

Related product manuals