Sign assignment

This function block can be used to assign different signs to the input value X according to the value at the input I. IF I>=0.0, the value X is multiplied with 1.0, otherwise X is multiplied with -1.0.

Operation

Y = X * 1.0 or Y = X * -1.0

Signals

Name I/O Type(s) Function
X I FLOAT Input value
I I FLOAT Indicator for the sign
Y O FLOAT Output value

Comments

This function block can be used to detect the sign of a changeable value and in that way work like a sign function. If the input X has a fixed value and the changeable signal is connected to I, output Y will alternate between +X and –X.