Linear Converter

Function

Converts an input value within definable limits to an output value


Formula

Out = Y1 + (Y2 – Y1) / (X2 – X1) * (In – X1)

Special conditions

The linear converter output will be limited as shown in the next pictures:

for X1 < X2 see the next picture on the left side

X1 <= X2) AND (In <= x1): Out = Y1

X1 <= X2) AND (In >= x2): Out = Y2

for X1 > X2 see the next picture on the right side

(X1 > X2) AND (x >= x1): Out = Y1

(X1 > X2) AND (x <= x2): Out = Y2



Fig. 43.   Wire-sheet Icon

Fig. 44.   Property Sheet

Fig. 45.   Slot Sheet


Inputs and Outputs

Table 31.   Inputs

Inputs

Type

Functional description

In

numeric

Analog input value to be converted

In X2 Maximum Value

numeric

Analog input X2 maximum value

In X1 Minimum Value

numeric

Analog input X2 minimum value

In Y2 Maximum Result

numeric

Analog input Y2 maximum result

In Y1 Minimum Result

numeric

Analog input Y1 minimum result

In Enabled

boolean

If the input “In Enabled” is set to false disabled in the slot sheet, the output “Out” will be disabled and is set to the value “0”.


Table 32.   Outputs

Outputs

Type

Functional description

Out

numeric

One analog output = converted value


Parameter List

No parameters.