Shift and rotate instruction of Siemens Tia portal-12

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024
  • Shift and Rotate Operation
    This section contains information on the following topics:
    Data Type: EN, ENO: BOOL
    IN, OUT: Bit strings, integers
    Memory area: I, Q, M, D, L
    SHR: Shift right
    Shift right instruction to shift the content of the operand at the input IN bit-by-bit to the right and query the result at the OUT output. You use the N parameter to specify the number of bit positions by which the specified value is to be shifted.
    SHL: Shift left
    Shift left instruction to shift the content of the operand at the input IN bit-by-bit to the left and query the result at the OUT output. You use the N parameter to specify the number of bit positions by which the specified value is to be shifted.
    ROR: Rotate right
    Rotate right instruction to rotate the content of the operand at the input IN bit-by-bit to the right and query the result at the OUT output. You use the N parameter to specify the number of bit positions by which the specified value is to be rotated. The bit positions freed by rotating are filled with the bit positions that are pushed out.
    ROL: Rotate left
    Rotate left instruction to rotate the content of the operand at the input IN bit-by-bit to the left and query the result at the OUT output. You use the N parameter to specify the number of bit positions by which the specified value is to be rotated. The bit positions freed by rotating are filled with the bit positions that are pushed out.
    Program Control Operation
    This section contains information on the following topics:
    -( JMP ): Jump if RLO =1
    -( JMPN ): Jump if RLO = 0
    LABEL: Jump label
    The “Jump if RLO = 1” and “Jump if RLO = 0” instruction to interrupt the linear execution of the program and resume it in another network. The destination network must be identified by a jump label (LABEL) and it should be specified within the block. The jump direction can be towards higher or lower network numbers.
    In “Jump if RLO = 1”, the result of logic operation (RLO) at the input of the instruction is “1”, the jump to the network identified by the specified jump label is executed.
    In “Jump if RLO = 0”, the result of logic operation (RLO) at the input of the instruction is “0”, the jump to the network identified by the specified jump label is executed.
    If the condition at the input of the instruction is not fulfilled execution of the program continues in the next network.
    JMP_LIST: Define jump list
    The define jump list instruction is used to define several conditional jumps (up to 32 jumps) and continue the program execution in a specific network depending on the value of the K parameter.
    SWITCH: Jump distributor
    The “Jump distributor” instruction to define multiple program jumps to be executed depending on the result of one or more comparison instructions.
    The jump condition is depends on the compare result of input value and the K parameter.

Комментарии •