siemens 1200 Block Move

suboliu

Member
Join Date
Oct 2010
Location
windsor
Posts
265
Hello everyone.
I have question on using Siemens PLC 1200 for Data Block move.
The question is: I have 30 words, like MW20---MW29
MW30---MW39
MW40---MW49
I would like to move these Words Block to MW100--MW109
when condition=1, move MW20---MW29 to MW100--MW109
when condition=2, move MW30---MW39 to MW100--MW109
when condition=3, move MW40---MW49 to MW100--MW109
because 1200 doesn't like 200 that it have BLKMOVE_W instruction,
1200 has MOVE_BLK instruction, but it only moves in global DB move, if so, how can I move MW20---MW29 to global DB? and then How can move global DB to MW100--MW109?

Thanks!
 
I have used the block move extensively, but its always from DB to DB. Your system may not allow this, but my basic suggestion would be to try and use DB's for the majority data storage if you can.

When I was intro'd to the 1200 series the Siemens rep. basically told us that if we're using MW's we were programming the "old way", and the newer systems are better suited to deal with DB's. :confused: This could totally be BS, but I just adapted.
 
I have used the block move extensively, but its always from DB to DB. Your system may not allow this, but my basic suggestion would be to try and use DB's for the majority data storage if you can.

When I was intro'd to the 1200 series the Siemens rep. basically told us that if we're using MW's we were programming the "old way", and the newer systems are better suited to deal with DB's. :confused: This could totally be BS, but I just adapted.

Dwoodlock has it on the nose. Everything I've seen implies the 1200 pretty much only has the M memory/Global Memory for legacy purposes. It has many many disadvantages compared to DBs, and not much in the way of advantages. You really should be trying to use DBs if you can, or else you'll be missing some capabilities, like complex data types (arrays for Move_Blk).
 
No, there is no easy way to do a for loop in ladder.

You could look at STL and indirect addressing tho. But the above example is the absolute easiest.

Al the code you need is right there :)
 
POKE_BLK means you don't need the loop. The attached lets you POKE between various areas, DBs must be non-optimised.

Thank you very much!
I have another question,
If I create a global DB, like DB1, Can I use tag DB1.DBX0.0, DB1.DBB0, DB1.DBW0,etc. because I need change words value through HMI, if I use above tags to change DB1 value?

if can't, then I only MW10, MW20 ..... absolute address, but if there is too many words and need move global DB, How can I do for these?
 
Thank you very much!
I have another question,
If I create a global DB, like DB1, Can I use tag DB1.DBX0.0, DB1.DBB0, DB1.DBW0,etc. because I need change words value through HMI, if I use above tags to change DB1 value?

if can't, then I only MW10, MW20 ..... absolute address, but if there is too many words and need move global DB, How can I do for these?

I don't think I quite understood what you're looking to do.

If you are looking to access a bit out of a WORD length tag in the PLC, look at slice based addressing: (eg TagName.x0).

Are you trying to do indirect addressing in the HMI? Are you trying to declare HMI tags for overlapping bits, bytes, and words? I think you can do what you need to do if you set the DB for standard access (turn off Optimized access in the properties of the DB).

If your question is simply "can I access tags in the DB from the HMI" then the answer is "yes". If it is a Siemens HMI, then you can probably use Optimized or Standard. If it is a third party HMI, then you probably need Standard access.
 
Last edited:
Thank you mk42 for saying what I avoided to say.

suboliu, show us what you're doing. Describe as detail as possible, use screen shots and specify the equipment and software you're dealing with.
With regard to absolute addressing and non-optimized blocks, I personally avoid them and only recall using poke only once. The way of the future with Siemens is symbolic addressing and though sometimes it feels like going around in circles to achieve something very simple I got used to it and it pays when creating reusable code.
 
Thank you mk42 for saying what I avoided to say.

suboliu, show us what you're doing. Describe as detail as possible, use screen shots and specify the equipment and software you're dealing with.
With regard to absolute addressing and non-optimized blocks, I personally avoid them and only recall using poke only once. The way of the future with Siemens is symbolic addressing and though sometimes it feels like going around in circles to achieve something very simple I got used to it and it pays when creating reusable code.
Thank you very much, I didn't describe clearly, see attach for my questions

a.jpg
 

Similar Topics

Hello all, PLC-programming noob here. I have multiple clients accessing some data on my Siemens S7 1211C PLC; some OPC clients and some direct...
Replies
30
Views
8,192
Hello everyone, I'm new in using plc software. I want to set a parameter for my centrifugal pump using an i/p from PID block so that the range of...
Replies
0
Views
1,271
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
95
Hi Experts, I would like to make firmware upgrade from v3.0 to v4.5 (S7-1200 CPU 1215C). Can I do it from v3.0 to v4.5? Do I need to take some...
Replies
6
Views
179
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
39
Views
2,055
Back
Top Bottom