Copy DB siemens

fagerstaplc

Member
Join Date
Jun 2007
Location
Fagersta
Posts
6
Hello first time in this forum!
I have a problem not beacause im from Sweden :)
I would like to copy a whole db in a siemens PLC s7 300 to another db. Ex db 1 dbw1-dbw60 to db2 dbw1-dbw60. Ofocourse I can use the ordinary L db1.dbw10
t db1.dbw10, but someone must know an easier whay to do this.
With Best regards Mikael Viking Augustsson
 
OK found that block. But if you have a alot of varible, dbw in the block for example dbx0.0-dbx0.7 dbb1 dbw2 dbw3 and dbd 4 is this still working? And I don´t understand how this sfc 20 should be filled in ? Maybe im stupid but I still can´t understand it :)
CALL "Copy Data Block 1"
QTYP:=MW10
QANF:=1
LAEN:=60
ZTYP:=MW20
ZANF:=1
FEHL:=MB20
NOP 0
For example in mw 10 (QTYPE) I tried to fill in... Define the source block in my application db 10. What should stand in mw10 ? 1 for db ?
ZTYP the block should be copied to db 20. WHat will I write in ZTYPE
ZANF The copy should start on dbw0 the same as the original block.

Qanf source start. DBW 0 in my case should it be a zero there.
Laen. 60 words should be transfered
I hope you understand my poor english
I hope someone could answer me.
 
Last edited:
Blocks must be same size. EG copy db1 100 bytes to db2
SFC20 input SRCBLK: P#DB1.DBX0.0 BYTE100

SFC20 output DSTBLK: P#DB2.DBX0.0 BYTE100
SFC20 output RETVAL: State variable
 
Hello fagerstaPLC;

Very strange, the CALL "Copy Data Block 1" you show has nothing to do with Step 7 SFC block SFC20 that s7xp.com is talking about. What library did you find that block in?

This is what a call for SFC20 "BLKMOV" ( from the "Standard Function Blocks" library) should look like:

SFC20_call.jpg


The Source (SRCBLK) and Destination (DSTBLK) parameters use an "ANY pointer" format; this allows you to indicate in a single format the type of data, the start address and the length. Check the online help for ANY pointers for more details.

Hope this helps,
Daniel Chartier
 

Similar Topics

This feels like a simple, elementary question, but I am a Siemens novice and know there are experts here. My S7-1500 project (TIA Portal v17) has...
Replies
10
Views
2,706
Gents, I have a DB, that is an array of a UDT. This UDT has got a combination of INT's and REAL's. When an action is completed, I want to move...
Replies
11
Views
4,235
How do I move one byte of data in an array to a UDT that is one byte in length. AB would be a slam dunk on this with a simple Copy instruction...
Replies
22
Views
5,395
I am tying to find a way to copy 10 words from my input area into a structure I have mapped out for my device. What is the best/simplest way to...
Replies
5
Views
2,156
Hello! Is it possible to copy pointer's pointing address to any variable at Siemens step7? I mean I have pointer address to db block with...
Replies
14
Views
15,536
Back
Top Bottom