Tag
Deprecated. Do not use in new code.
(Engine-Level Function)
| Description: | Returns a Tag value, which works like (and in place of) a Normalize value. |
| Returns: | Tag |
Usage: ![]() |
Steady State only. |
| Function Groups: | Graphics, Generic Math, Variable |
| Related to: | Normalize | Rotate | Scale | Trajectory |
Format: ![]() |
Tag(Value, LowInput, HighInput, LowScale, HighScale, Mode, Freq) |
| Parameters: |
| Value |
| Required. Any numeric expression to be normalized. |
| LowInput |
| Required. Any numeric expression, which represents the lowest normal input value of Value. This is not a limit. |
| HighInput |
| Required. Any numeric expression, which represents the highest normal input value of Value. This is not a limit. |
| LowScale |
| Required. Any numeric expression, which represents the lowest normal scaled value of Value. This is not a limit. |
| HighScale |
| Required. Any numeric expression, which represents the highest normal scaled value of Value. This is not a limit. |
| Mode |
|
Required. Any numeric expression. Deprecated, but must be present and valid. |
| Freq |
|
Required. Any numeric expression. Deprecated, but must be present and valid. |
| Comments: |
This function scales an expression from the low and high input range to between low and high values. The return value is a Normalize value. This function does calculations with double-precision floating point values and does not support 64-bit integers computations. |
Example:
pumpFlow = Tag(rawPumpFlow, 0, 4095, 0, 150);
This sets the variable pumpFlow to a Tag value. The variable rawPumpFlow is scaled from between 0 to 4095, to between 0 and 150. This Tag value might be used to scale a rectangle (to show a bar graph of the pump flow), as shown:
GUIRectangle(0, 100, 100, 0 { Rectangle bounding box },
1, 1, 1, pumpFlow, 1 { Scale top of bar only },
0, 0 { No trajectory, rotation },
1, 0 { Visible; reserved },
0, 0, 0 { No focus, selection },
12, 15 { Lt red, white outline });
The variable pumpFlow could also be reused in other expressions, graphics functions, rotations, or trajectories.
