← Analog and Scaling

VFD Speed Ref

medium

Clamps an operator percent setpoint to 0-100 and scales it for a VFD configured to accept a 0-32767 raw speed reference.

What it teaches

Composition: clamp, then scale. The percent arrives from an HMI and can be outside 0-100, while this drive interface is configured for 0-32767 raw counts — which is an INT at full scale, not a number someone picked. Pin the input to its valid range first, then scale it into the reference. Clamping is what keeps the result inside the type: an unclamped percent above 100 would wrap to a negative speed rather than simply overshooting.

Parameters

TagDirectionTypeDefaultDescription
In_PercentInputREAL50Operator percent speed reference from HMI
Out_SpeedRefOutputINT0Raw speed reference for a VFD, full scale at the top of the INT range

Required behavior