Name :Decrease

Symbol :DECR

Illustrate:

    You can use the Decrement command to change the value of the operand in the parameter IN/OUT to change the next smaller value, and query the results. The "decrement" command is executed only when the signal state of the signal with the input EN enabled is "1". If the value range of the selected data type is not exceeded during execution, the signal status of the output ENO is also "1".

    If one of the following conditions is met, the signal status of the output ENO is "0":

    The signal status of enabling input EN is "0".

    The value of floating-point numbers is invalid.

Image:

Parameter:

Parameter | Statement | Type | Description
--- | --- | --- | ---
EN | Input | BOOL |
    Enable input
IN | InOut | INT/SINT/DINT/UINT/USINT/UDINT/ULINT |
    The value to decrement
ENO | Output | BOOL |
    Enable output
OUT | Output | INT/SINT/DINT/UINT/USINT/UDINT/ULINT |
    Decremented value

Example:

LD:

ST:

DECR(IN1 := TagIn1);