Reverse Speed Reference
easy
Passes a signed speed reference through, or flips its sign when the reverse command is on.
What it teaches
Negate flips the sign of a value (0 − source), turning +500 into −500. Distinct from absolute value, which only ever drops the sign. A Reverse command toggles the direction of a bidirectional speed reference.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Ref | REAL | 500 | Speed reference from the operator |
| In_Reverse | BOOL | — | Reverse direction command |
| Out_Ref | REAL | — | Signed speed reference to the drive |
Required behavior
- Out_Ref equals In_Ref when In_Reverse is 0.
- Out_Ref equals In_Ref with its sign flipped when In_Reverse is 1.
- Flipping is negation, not absolute value: a negative In_Ref becomes positive when In_Reverse is 1.