How to use Different MOV BLOCK in Siemens TIA Portal – Part 1

In this article, we will see different Move Blocks used in the Siemens TIA Portal. The Siemens TIA Portal Move blocks are:

S. NOTYPES OF FUNCTIONSFUNCTION
1MOVEMove the data from the input address direct or indirect to the output address direct or indirect
2MOVE_BLKThe “Move block” instruction transfers data from one memory area (source range) to another (target range). The input COUNT specifies how many elements need to be moved to the target range.
3UMOVE_BLKThe “Move block” instruction transfers data from one memory area (source range) to another (target range) without any interruption. The input COUNT specifies how many elements need to be moved to the target range.
4FILL_BLKStarting with the address given at the OUT output, the target range is filled. The COUNT parameter specifies the number of repeated copy operations.
5UFILL_BLKStarting with the address given at the OUT output, the target range is filled without any interruption. The COUNT parameter specifies the number of repeated copy operations.
6SWAPThe “Swap” command modifies the byte order at input IN and queries the output OUT result.

MOVE

How to use Different MOV BLOCK in Siemens TIA Portal 1

MOVE_BLK

How to use Different MOV BLOCK in Siemens TIA Portal 2

UMOVE_BLK

How to use Different MOV BLOCK in Siemens TIA Portal 3

FILL_BLK

How to use Different MOV BLOCK in Siemens TIA Portal 4

UFILL_BLK

How to use Different MOV BLOCK in Siemens TIA Portal 5

SWAP

How to use Different MOV BLOCK in Siemens TIA Portal 6
S. NoOperationInput/Output AddressInput AddressData type
1MOVEInput%M0.6Please refer to the below explanation for the data type of each block
2MOVE_BLKInput%M0.1
3UMOVE_BLKInput%M0.2
4FILL_BLKInput%M0.3
5UFILL_BLKInput%M0.4
6SWAPInput%M0.5

Siemens TIA Portal V16 software is used to develop the PLC program. As stated above, the following Sections explain the various PLC Move blocks.

  1. The MOVEInstruction is used to move the data from one address to another address directly or indirectly.
  2. The data type for input and output address can be declared based on the user requirement.
  3. The MOVE instruction has EN, IN, ENO, and OUT signals.
S. NoInstructionMeaning
1ENThis signal enables the MOVE instruction.
2IN IN stands for Input signal for assigning the input data. The data type for IN is shown in the below table.
3ENOIt enables the other instruction connected to MOVE instruction
4OUTOUT stands for transferred data from IN. The data type for IN is shown in the below table.
ENOConditionResult
1No errorAll COUNT elements were successfully copied.
0The memory area that is available is either exceeded by the source (IN) range or the destination (OUT) range.Elements that fit are copied. No partial elements are copied.
  1. Once the %M0.2 input switch is ON the data from IN is transferred to the OUT.
  2. The OUT can increase up to n elements.
  3. The data type for declaring the IN and OUT is shown below
ParameterData typeDescription
INDWord, Char, Array, Struct, DTL, Time, Real, LReal, SInt, Int, DInt, USInt, UInt, UDInt, and ByteSource address
OUTDWord, Char, Array, Struct, DTL, Time, Real, LReal, SInt, Int, DInt, USInt, UInt, UDInt, and ByteDestination address
  1. The MOVE_BLK Instruction is used to move the data from one block(array) to another block(array).
  2. The data type for input and output data type can be declared based on the user’s requirement.
  3. The MOVE_BLK instruction has EN, IN, ENO, and OUT signals.
S. NoInstructionMeaning
1ENThis signal enables the MOVE instruction.
2IN IN stands for Input signal for assigning the input data. The data type for IN is shown in the below table.
3ENOIt enables the other instruction connected to MOVE instruction
4OUTOUT stands for transferred data from IN. The data type for IN is shown in the below table.
5COUNTThe number of elements or an arraycan be moved
  1. Once the %M0.0 input switch is ON the array of data from IN is transferred to the OUT array.
  2. The COUNT signal declares the number of elementsthat can be moved from IN to OUT.
  3. The data type for declaring the IN and OUT is shown below
ParameterData typeDescription
INReal, LReal Byte, USInt, UInt, UDInt, SInt, Int, DInt,Source start address
Word, DWord
COUNTUIntNumber of data elements to copy
OUTReal, LReal, Byte, USInt, UInt, UDInt, SInt, Int, DInt,Destination start address
Word, DWord

(The umove_blk is similar to move_blk Instruction)

The difference between mov_blk and umov_blk is, the umove is uninterruptible instruction. Interrupt handling is different for the MOVE_BLK and UMOVE_BLK instructions.

MOVE_BLKUMOVE_BLK
During MOVE_BLK execution, interrupt events are queued and handled. If the destination data is not required to be consistent or if it is utilized within an interrupt OB subprogram, utilize the MOVE_BLK instruction. A completed and consistent data element has been moved to the destination address if a MOVE_BLK operation is interrupted. After the interrupt OB execution, the MOVE_BLK operation is started again.Until UMOVE_BLK execution is finished, interrupt events are queued but not processed. Before the execution of an interrupt OB subprogram, use the UMOVE_BLK instruction when the move operation needs to be finished and the destination data consistent.
  1. The FILL_BLK Instruction is used to move the data from one block(array) to another block(array).
  2. The data type for input and output data type can be declared based on the user’s requirement.
  3. The FILL_BLK instruction Fill the single data to multiple elements or array
  4. The FILL_BLK instruction has similar signals like MOVE_BLKEN, IN, ENO, and OUT signals. (Here IN is single data and OUT is array data)
  5. Once the %M0.3 input switch is ON the data from IN is transferred to the OUT array.
  6. The COUNT signal declares the number of elements that can be moved from IN to OUT.
  7. The data type for declaring the IN and OUT is shown below
ParameterData typeDescription
INDWord, Word, Byte, Real, LReal, USInt, UInt, UDInt, and SInt, Int, DIntTData source address
COUNTUSInt, UIntNumber of data elements to copy
OUTByte, Word, DWord, Real, LReal, USInt, UInt, UDInt, and SInt, Int, DIntTData destination address

The difference between fill_blk and ufill_blk is, the ufill is uninterruptible instruction. Interrupt handling is different for the FILL_BLK and UFILL_BLK instructions.

  1. The SWAPInstruction is used to swap the input bits from left to right to right to left at the output.
  2. the “Swap” command to query the result at output OUT and alter the order of the bytes at input IN.
  3. The SWAP instruction has similar signals like MOVE_BLKEN, IN, ENO, and OUT signals. (Here IN is either single data (Word or DWord) and OUT(Word or DWord) is similarly single or array data)
  4. Once the %M0.5 input switch is ON the data from IN is SWAPED to the OUT.
  5. The data type for declaring the IN and OUT is shown below
ParameterData typeDescription
INWord, DWordOrdered data bytes IN
OUTWord, DWordReverse-ordered data bytes OUT

The following is a list of the procedures you can follow to program ladder logic on the SIEMENS TIA portal. (Simulation).

How to use Siemens TIA Portal to create PLC Ladder Logic for three phase motor Forward and Reverse

Note: Please refer to the previously mentioned article for a comprehensive explanation of how to program ladder logic using the Siemens TIA Portal.

MOVE 

The simulation result of the MOVE block is shown below

When the input switch is ON the data stored in the input is transferred to the output

How to use Different MOV BLOCK in Siemens TIA Portal 7

The input data is stored in the Data block. The input and output address of the MOVE Instruction can be declared here. The data declared to each instruction is either single data or an array of data. Since the MOVE Instruction is single data instruction. The data is declared as shown below (The values can be declared during run time using SIM TABLE)

How to use Different MOV BLOCK in Siemens TIA Portal 8

Clicking over the Data_block1 the data can be entered to the corresponding input.The figure given below shows how to enter the value and configure other data.

How to use Different MOV BLOCK in Siemens TIA Portal 9

The data entered in the data block should be in “run” mode.

The results are obtained in Data_Output as mentioned earlier.

How to use Different MOV BLOCK in Siemens TIA Portal 11

In the MOVE block same data will be reflected. This way the MOVE instruction can be executed and the result can be viewed.  The MOVE block after the final execution is shown below.

How to use Different MOV BLOCK in Siem ens TIA Portal 12

MOVE_BLK

The simulation result of the MOVE_BLK block is shown below

When the input switch is ON the data stored in the input is transferred to the output

How to use Different MOV BLOCK in Siemens TIA Portal 13

The input data is stored in the Data block. The input and output address of the MOVE_BLK Instruction can be declared here. The data declared to each instruction is an array of data. Since the MOVE_BLK Instruction is an array data instruction. The data is declared as shown below (The values can be declared during run time using SIM TABLE.

How to use Different MOV BLOCK in Siemens TIA Portal 14

Clicking over the Data_block1 the data can be entered to the corresponding input.The figure given below shows how to enter the value and configure other data

How to use Different MOV BLOCK in Siemens TIA Portal 15

The data entered in the data block should be in “run” mode.

The results are obtained in Input(variable name) as mentioned earlier.

In the MOVE_BLK block same data will be reflected. This way the MOVE_BLK instruction can be executed and the result can be viewed.  The MOVE_BLK block after the final execution is shown below

(In MOVE_BLK the array of data can be moved to a specified output address, but in MOVE only single data is transferred)

How to use Different MOV BLOCK in Siemens TIA Portal 16

UMOVE_BLK

The simulation result of the UMOVE_BLK block is shown below

When the input switch is ON the data stored in the input is transferred to the output

How to use Different MOV BLOCK in Siemens TIA Portal 17

The input data is stored in the Data block. The input and output address of the UMOVE_BLK Instruction can be declared here. The data declared to each instruction is an array of data. Since the MOVE_BLK Instruction is an array data instruction. The data is declared as shown below (The values can be declared during run time using SIM TABLE

How to use Different MOV BLOCK in Siemens TIA Portal 18

Clicking over the Data_block1 the data can be entered to the corresponding input. The figure given below shows how to enter the value and configure other data.

How to use Different MOV BLOCK in Siemens TIA Portal 19

The data entered in the data block should be in “run” mode.

The results are obtained in Output (variable name) as mentioned earlier.

How to use Different MOV BLOCK in Siemens TIA Portal 20

In the UMOVE_BLK block same data will be reflected. This way the MOVE_BLK instruction can be executed and the result can be viewed.  The MOVE_BLK block after the final execution is shown below.

(In MOVE_BLK the array of data can be moved to a specified output address, but in MOVE only single data is transferred)

How to use Different MOV BLOCK in Siemens TIA Portal 21

FILL_BLK

The simulation result of the FILL_BLK block is shown below.

When the input switch is ON the data stored in the input is transferred to the output

How to use Different MOV BLOCK in Siemens TIA Portal 22

The input data is stored in the Data block. The input and output address of the FILL_BLK Instruction can be declared here. The data declared on the input side is single data and the output is array data. The data is declared as shown below (The values can be declared during run time using SIM TABLE)

How to use Different MOV BLOCK in Siemens TIA Portal 23

Clicking over the Data_block1 the data can be entered to the corresponding input.The figure given below shows how to enter the value and configure other data.

How to use Different MOV BLOCK in Siemens TIA Portal 24

The data entered in the data block should be in “run” mode.

The results are obtained in Input (variable name) as mentioned earlier.

How to use Different MOV BLOCK in Siemens TIA Portal 26

In the FILL_BLK block same data will be reflected. This way the FILL_BLK instruction can be executed and the result can be viewed.  The MOVE_BLK block after the final execution is shown below.

(In FILL_BLK the single data can be moved to a specified array)

How to use Different MOV BLOCK in Siemens TIA Portal 27

UFILL_BLK

The simulation result of the UFILL_BLK block is shown below.

When the input switch is ON the data stored in the input is transferred to the output

How to use Different MOV BLOCK in Siemens TIA Portal 28

The input data is stored in the Data block. The input and output address of the UFILL_BLK Instruction can be declared here. The data declared on the input side is single data and the output is array data. The data is declared as shown below (The values can be declared during run time using SIM TABLE)

Clicking over the Data_block1 the data can be entered to the corresponding input. The figure given below shows how to enter the value and configure other data.

 29

The data entered in the data block should be in “run” mode.

The results are obtained in Input (variable name) as mentioned earlier.

How to use Different MOV BLOCK in Siemens TIA Portal 30

In the FILL_BLK block same data will be reflected. This way the FILL_BLK instruction can be executed and the result can be viewed.  The MOVE_BLK block after the final execution is shown below.

(In FILL_BLK the single data can be moved to a specified array)

How to use Different MOV BLOCK in Siemens TIA Portal 31

SWAP

The simulation result of the SWAP block is shown below.

When the input switch is ON the data stored in the input is SWAPED to the output

How to use Different MOV BLOCK in Siemens TIA Portal 32

The input data is stored in the Data block. The input and output address of the SWAP Instruction can be declared here. The data declared on the input side is single data and the output is single data. The data is declared as shown below (The values can be declared during run time using SIM TABLE)

Clicking over the Data_block1 the data can be entered to the corresponding input. The figure given below shows how to enter the value and configure other data.

How to use Different MOV BLOCK in Siemens TIA Portal 33

The data entered in the data block should be in “run” mode.

The results are obtained in Input (variable name) as mentioned earlier.

How to use Different MOV BLOCK in Siemens TIA Portal 34

In the SWAP block Mirrored data will be reflected. This way the SWAP instruction can be executed and the result can be viewed.  The SWAP block after the final execution is shown below.

How to use Different MOV BLOCK in Siemens TIA Portal 34

By doing the above exercise one can understand how different MOVE blocks are working.

About The Author

Scroll to Top