Siemens STEP 7 BLKMOVE: Configuring DB Word Transfers

David Krause2 min read
Other TopicSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Use the classic Siemens STEP 7 BLKMOVEThe evidence confirms this approach but does not define whether positions 100 through 110 are WORD indexes or byte offsets, so resolve that addressing ambiguity before configuring the copy ranges.

Define Each Transfer Range

Document every copy as a source start, transfer length, and destination start. The required fragment lengths are 8, 16, and 20 WORDs. Do not interpret “position 100 to position 110” as a complete specification until you establish whether the endpoints are inclusive and whether the positions represent WORDs or bytes.

Transfer field Required decision
Source DB1 and the exact starting address
Length 8, 16, or 20 WORDs
Destination Target DB and exact starting address
Address units Confirm WORD indexes versus byte offsets
Range convention Confirm whether both stated endpoints are included

Configure BLKMOVE

Configure one BLKMOVE operation for each contiguous fragment. The source variables do not need to be declared as an array for this approach, but the selected source and destination regions must represent the intended contiguous memory ranges.

  1. Identify the first source address in DB1.
  2. Select a transfer length of 8, 16, or 20 WORDs.
  3. Identify the corresponding starting address in the destination DB.
  4. Configure the classic STEP 7 BLKMOVE block with those source and destination regions.
  5. Repeat for every fragment that must be routed to another DB.

Prevent Addressing Errors

The phrase “from position 100 to position 110” is ambiguous. If it describes inclusive WORD positions, the range contains 11 WORDs; if it describes a start position and an exclusive end position, it contains 10 WORDs. If the numbers are byte offsets, they cannot be treated directly as WORD indexes. Resolve the intended interpretation from the DB layout rather than deriving the transfer length from the position labels alone.

After executing each move, compare every destination WORD against its mapped source WORD. Also inspect the WORD immediately before and after the destination range to confirm that the operation did not overwrite adjacent data.

FAQ

How do I copy several WORDs between Siemens STEP 7 data blocks?

Configure the classic STEP 7 BLKMOVEblock with the required contiguous source and destination regions.

Can BLKMOVE copy DB data that is not declared as an array?

Yes. The reported solution used BLKMOVE even though the DB1 data was not organized as arrays; define the intended contiguous memory region explicitly.

Does DB position 100 to 110 mean 10 or 11 WORDs?

It is 11 positions if both WORD indexes are inclusive and 10 if 110 is an exclusive endpoint. Confirm whether the numbers are WORD indexes or byte offsets before configuring the move.

Back to blog