EasyManua.ls Logo

Curtis 1239E - SETUP_MAILBOX_MASK(); SETUP_MAILBOX_EXTENDED_MASK()

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...
Return to TOC Curtis 1239E-1269E Manual, os 37.0 RevA – May 2021
10 — VEHICLE CONTROL LANGUAGE (VCL)
pg. 131
MAP_TWO_POINTS( )
is function interpolates values between two points, Y1 and Y2; based upon an X input parameter.
Interpolating based on X1 and X2.
Typical Usage:
1. Calculate a value framed between two X-axis points projected across two Y points, where the
functions’ output is the value of the Y-axis intersection.
2. Extend the 7 pair limitation of the Setup_Map function by the use of multiple If, If Else statements
on segments of an XY array.
Syntax:
Map_Two_Points(X,X1,X2,Y1,Y2)
Parameters:
X
Input.
X1
Input point X1.
X2
Input point X2.
Y1
Output point Y1.
Y2
Output point Y2.
Returns:
n Mapped value.
Error Codes: None.
Example: Convert a controller value, such as Steer_Angle, to a voltage.
The input (X) is the Steer_Angle variable, where X1-X2 is an
angle between 0 and 90 Degrees. The output is the interpolated
value across Y-axis points in Volts.
Enable the expansion of the Setup_Map(16) function beyond the
seven (7) point-pair by the use of multiple If, If Else statements
on segments of a two point XY array. For Example:
If(X < 1)
{
Y = Map_2_Points(X, X1, X2, Y1, Y2)
}
Else If(0<= X <= 1)
{
Y = Map_two_Points(X, X1, X2, Y1, Y2)
}
Else If(1< X <= 2)
{
Y = Map_Two_Points(X, X1, X2, Y1, Y2)
}
Else If(2< X <= 3)
{
Y = Map_Two_Points(X, X1, X2, Y1, Y2)
Etc.

Table of Contents

Related product manuals