Arrays and Buffers

Scale a Sensor Bank

medium

Converts eight raw sensor readings into engineering units on request.

What it teaches

Extend Configurable Scaling to a whole bank of sensors owned by the program using this one. Preserve the raw measurements and write a separate result array. Validate the configuration before changing any results.

Parameters

TagDirectionTypeDefaultDescription
In_ScaleInputBOOL0Request a conversion
Cfg_RawMinInputREAL4Raw lower endpoint
Cfg_RawMaxInputREAL20Raw upper endpoint
Cfg_EUMinInputREAL0Engineering lower endpoint
Cfg_EUMaxInputREAL100Engineering upper endpoint
Sts_ValidOutputBOOL0Validity of the latest requested conversion
Ref_RawInOutREAL[8]Read-only raw values
Ref_ScaledInOutREAL[8]Engineering values written on a valid request

Required behavior