MCA_doWrap (FUN)

FUNCTION MCA_doWrap : LREAL

This Function allows a value to be constrained to lie within specific lower and upper limits. The value being wrapped may be many multiples outside the specified wrap range. This function is useful for rotary axes or encoders that may rotate many revolutions, but whose position within a specified range is required.

InOut:

Scope

Name

Type

Comment

Return

MCA_doWrap

LREAL

Input

Value

LREAL

The value which is needed to be wrapped

LowValue

LREAL

Low limit value

HighValue

LREAL

High limit value