Table of Contents

SCALE Box Function

Scale (Linear Interpolation)

Category: Arithmetic Box Functions

Behavior

Linearly maps an integer from an input range to an integer output range. Values outside the input range are limited to the nearest boundary; equal IN_MIN and IN_MAX stores OUT_MIN.

Syntax and Arguments

Syntax: SCALE D0 0 1023 R0 0 100

Behavior Example

Run condition Before Command entered Expected result
Left condition ON D0=1023 SCALE D0 0 1023 R0 0 100 R0=100.0

Inputs and results for Arithmetic Box Functions

Cautions

Box Functions in the Same Category