How to Stack Data Transfer in Simatic.

swapnil.naik

Member
Join Date
Mar 2013
Location
Thane
Posts
45
Hello All,

I want to know how to transfer a stack of data like :

From DB0.DBW0 to DB0.DBW50

to

PQW 0 to PQW 50

without writing 50 move blocks.

Thanks in Advance.🍻
 
what L D asked you was why do you want ot write directly to peripheral output (PQ) instead of writing to process image (Q)

EDIT:
i don't think you can actually write to that low addressed PQW, because low bytes are generally reserved for process image
 
Last edited:
Actually We can, i used such kind of programming while communicating with Siemens Drives and it worked fine..I can do same here, but i just want to avoid writing many move blocks. In Schneider PLC we had a block just like move, where we can define source start adressa nd destination dtart address and define length of move stack... so if MW 0 --> DBWXX : Length 10, them MW0-MW9 will get move to defined DB address...
 
Hi Swapnil,

As was alluded to earlier you need SFC20 (it's in the Siemens catalogue). Just create a couple of 'any' pointers and then pass them into SFC20 and then it will do what you're after.

;-)
 
I found this solution

here's an example:

CALL "BLKMOV"
SRCBLK :=P#DB0.DBX0.0 BYTE 32
RET_VAL:=#rubbish
DSTBLK :=P#Q 10.0 BYTE 32
NOP 0
I just found it...hope this is how it works !!
 
Yep, that's how it works.

That will copy 32 bytes from DB0.DBX0.0 over to another address starting at Q10.0

You can also make the 'Any' pointers by passing the necessary addresses into a function if you need them to change realtime.

;-)
 
Mr.LD ...i am not expert in siemens as most you you guys are.

I am also not much familiar with difference in Q & PW.

I used to think when using single bit its Qx.x and when sending words on profibus its PQW or PIW .

Please explain on this topic, since you people have helped me till here.
 
there is certain memory available for process image (depends on CPU). process image works faster cause PLC do read/write operation at the beginning/end of a scan cycle.
But if you are outside from that range from whatever reason, or you explicitly wants to access the input/output you use peripheral input/output (PIW, PQW).
generally it is recomended to use process image whenever possible cause times of execution are 10-100 times quicker
 

Similar Topics

Hi, need some help for display PLC data from CPU data tag onto an excel form, Data tag from Contrologic 5000 CPU hot linked to excel with Rslink...
Replies
1
Views
3,123
What is Local data stack ( L stack) of S7? And How to use? Please explain more it will be good if have an example. :site: Thank you in...
Replies
1
Views
1,953
Hi, every one, I Used Rslinx DDE/OPC function copied a data table value (N7: XX) and paste it as a link to a cell of Excel sheet. The pasted...
Replies
6
Views
5,885
Hello: I am experiencing the following error: [ERROR] C0297: Stack overflow detected in DecodeOID. Maximal Stack Size: 64512. Calculated...
Replies
8
Views
1,212
Does anyone know of a stack light that can have a scrolling message on it not just a light?
Replies
12
Views
2,604
Back
Top Bottom