DEC
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
IN |
ANY |
|
|
|
Numerical variable (increased after call). See FFLD Data In / Data Out for more information. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Q |
ANY |
|
|
Decreased value. |
Remarks
- When the function is called, the variable connected to the IN input is decreased and copied to Q.
- All data types are supported except BOOL and STRING.
- For these types, the output is the copy of IN.
- All data types are supported except BOOL and STRING.
- For real values, a variable is decreased by 1.0.
- For time values, a variable is decreased by 1ms.
- The IN input must be directly connected to a variable.
- It cannot be a constant or complex expression.
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
- This function is particularly designed for the ST Language.
- It allows simplified writing.
- Assigning the result of the function is not mandatory.
IN := 2;
Q := DEC (IN);
(* now: IN = 1 ; Q = 1 *)
DEC (IN); (* simplified call *)