NEG -
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
IN |
ANY |
|
|
|
Numeric value. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Q |
ANY |
|
|
Negation of the input. |
Truth Table
IN |
Q |
---|---|
0 |
0 |
1 |
-1 |
-123 |
123 |
Remarks
- In FBD "Function block diagram" A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks and FFLD language, the block NEG can be used.
FBD Language
FFLD Language
- In the FFLD language, the conversion is executed only if the input rung (EN) is TRUE.
- The output rung (ENO) keeps the same value as the input rung.
- The negation is executed only if EN is TRUE.
- ENO keeps the same value as EN.
IL Language
Not available.
ST Language
- In the ST "Structured text"
A high-level language that is block structured and syntactically resembles Pascal language, "-" can
be followed by a complex Boolean expression between parentheses.
- The output data type must be the same as the input data type.
Q := -IN;
Q := - (IN1 + IN2);