You are on page 1of 2

How do you copy data into STEP 7 (TIA Portal) between two array variables and two DBs

in S7-
1200?
Entry ID:49717873 Date:2014-07-31
STEP 7 (TIA Portal) -- Creating S7 programs -- Addressing variables and data structures
S7-1200 CPU 12xx -- Creating S7 programs -- Addressing variables and data structures
How do you copy data into STEP 7 (TIA Portal) between two array variables and two DBs in S7-1200?
Description
In the example below data is transferred from a global data block with an array variable of 4
components to a second global data block with a longer array variable of 40 components. The
"MOVE_BLK" operation (copy area) selects the four Int elements from the "Array_1[0 .. 3]" variable
and copies its contents to the first four Int elements of the output variable "Array_2[0 .. 39]". The
"COUNT" parameter defines a number of four elements that are copied from the source area into the
target area.

Fig. 01
If you want to store data of different data types (for example, Bool, Byte, Word, Dint or Real) in a data
block and copy the contents of this data block to other data blocks, you must structure the data block
so that if possible all the data types of the same kind are stored one after the other. All variables with
the same data type (byte, for example) must then be grouped in an array variable. Then you can use
the "MOVE_BLK" command to copy all the data of one array variable to another data block.
http://support.automation.siemens.com/WW/view/en/49717873
Page 1 of 2 9/5/2014 2:16:06 PM

Fig. 02
Note
In addition to the "MOVE_BLK" function there is also the "UMOVE_BLK" function. "UMOVE_BLK"
enables you to make uninterruptable copies of up to 16 Kbyte of data.
Creation environment
The screens in this FAQ were created with STEP 7 (TIA Portal) V11.
Additional Keywords
Data structure, Symbol assignment
Entry ID:49717873 Date:2014-07-31
Siemens AG 2014 - Corporate Information - Privacy Policy - Terms of Use
http://support.automation.siemens.com/WW/view/en/49717873
Page 2 of 2 9/5/2014 2:16:06 PM

You might also like