You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 8th, 2017, 10:34 AM   #1
suboliu
Member
Canada

suboliu is offline
 
Join Date: Oct 2010
Location: windsor
Posts: 247
siemens 1200 Block Move

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!
  Reply With Quote
Old December 8th, 2017, 11:23 AM   #2
dwoodlock
Member
United States

dwoodlock is offline
 
dwoodlock's Avatar
 
Join Date: Nov 2012
Location: South Carolina
Posts: 407
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. This could totally be BS, but I just adapted.
  Reply With Quote
Old December 8th, 2017, 11:49 AM   #3
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 1,874
Quote:
Originally Posted by dwoodlock View Post
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. 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).
  Reply With Quote
Old December 8th, 2017, 11:54 AM   #4
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,546
Do you have access to SCL?
  Reply With Quote
Old December 8th, 2017, 12:11 PM   #5
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,546
Example:
Attached Images
File Type: jpg move1200.jpg (45.6 KB, 86 views)
  Reply With Quote
Old December 8th, 2017, 12:58 PM   #6
suboliu
Member
Canada

suboliu is offline
 
Join Date: Oct 2010
Location: windsor
Posts: 247
Quote:
Originally Posted by L D[AR2,P#0.0] View Post
Do you have access to SCL?
I will Try!
Thanks

Last edited by suboliu; December 8th, 2017 at 01:01 PM. Reason: made fault
  Reply With Quote
Old December 8th, 2017, 02:24 PM   #7
suboliu
Member
Canada

suboliu is offline
 
Join Date: Oct 2010
Location: windsor
Posts: 247
Quote:
Originally Posted by L D[AR2,P#0.0] View Post
Example:
I am not familiar with SLC. can use LAD to do this?
  Reply With Quote
Old December 8th, 2017, 03:29 PM   #8
boneless
Lifetime Supporting Member + Moderator
United States

boneless is offline
 
Join Date: Feb 2008
Location: OKC
Posts: 1,455
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
  Reply With Quote
Old December 9th, 2017, 10:33 AM   #9
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 1,874
Quote:
Originally Posted by boneless View Post
You could look at STL
1200 doesn't support STL, thank God.
  Reply With Quote
Old December 9th, 2017, 11:01 AM   #10
boneless
Lifetime Supporting Member + Moderator
United States

boneless is offline
 
Join Date: Feb 2008
Location: OKC
Posts: 1,455
You are absolutely right!
I'm a dingus, sorry about that.
  Reply With Quote
Old December 10th, 2017, 06:22 AM   #11
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,267
POKE_BLK means you don't need the loop. The attached lets you POKE between various areas, DBs must be non-optimised.
Attached Images
File Type: jpg Poke Block.JPG (63.7 KB, 72 views)
  Reply With Quote
Old December 11th, 2017, 09:50 AM   #12
suboliu
Member
Canada

suboliu is offline
 
Join Date: Oct 2010
Location: windsor
Posts: 247
Quote:
Originally Posted by BryanG View Post
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?
  Reply With Quote
Old December 11th, 2017, 02:09 PM   #13
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 1,874
Quote:
Originally Posted by suboliu View Post
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 by mk42; December 11th, 2017 at 02:12 PM.
  Reply With Quote
Old December 11th, 2017, 02:18 PM   #14
kalabdel
Member
Canada

kalabdel is online now
 
Join Date: Feb 2015
Location: Ontario
Posts: 326
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.
  Reply With Quote
Old December 11th, 2017, 07:00 PM   #15
suboliu
Member
Canada

suboliu is offline
 
Join Date: Oct 2010
Location: windsor
Posts: 247
Quote:
Originally Posted by kalabdel View Post
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
Attached Images
File Type: jpg a.jpg (33.2 KB, 37 views)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Advice Needed - Siemens from Rockwell move cardosocea LIVE PLC Questions And Answers 7 March 23rd, 2017 10:43 AM
S7 1200 function block pauly LIVE PLC Questions And Answers 3 November 14th, 2013 03:12 PM
What is Data Block in Siemens S7? Riche Robledo LIVE PLC Questions And Answers 6 September 26th, 2011 03:36 AM
Siemens Ratio_P block in CFC ry_fern LIVE PLC Questions And Answers 6 March 26th, 2010 07:44 AM
Siemens and Initialization when Entering a Function Block Andrew Evenson LIVE PLC Questions And Answers 3 April 16th, 2005 11:55 AM


All times are GMT -5. The time now is 12:03 AM.


.