Scale

Block Group: Math Operations
Icon: Scale block icon

The Scale block returns the result of re-scaling a number from one defined set of lower and upper limits to another.

Evaluation of the result is according to the following formula:

(input – inputMin) * ((outputMax – outputMin) / (inputMax – inputMin)) = output


Input/Output Properties

The following properties of the Scale block can take input and give output.

input specifies the number to re-scale.

inputMin specifies the minimum of the original scale.

inputMax specifies the maximum of the original scale.

outputMin specifies the minimum of the new scale.

outputMax specifies the maximum of the new scale.

inputOutOfRange returns TRUE if the input is outside the range, FALSE otherwise.


Output Property

The following property of the Scale block can give output but cannot take input.


Examples

The following image shows four examples of the Scale block.

Scale block examples