10/16/2014 12:10 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear Wolters, welcome to the SIMATIC world! MW 260 consists of MB 260 + MB 261 MW 261 consists of MB 261 + MB 262 You might alreadycatched the problem, right? MB 261 is existing in both MW's. If you use MW 260 and MW 262 (instead of MW261) there is no overlapping and MD 260 should show you the correct result. Best Regards.
|
Give us your feedback and show us your respect! |
|
This contribution was helpful to1 thankful Users |
10/16/2014 12:28 PM | |
Joined: 1/28/2009 Last visit: 10/26/2024 Posts: 6852 Rating: (1365)
|
Hello, This is matter of borders.You used wrong addresses for 2 adjacent WORDs.When you want to use WORDs, try to choos only EVEN (or ODD) addresses always with 2 bytes increment.This is a rule and if you ignore it the contents of WORDs are not valid in your program.
Check the attachment as test with normal addresses.Check where a word address with a lower address occupies 2 left-most bytes (Fig 6.2 in H.Berger STL/SCL 3rd edition) I hope this helps, Hamid Hosseini Attachmenttest.zip (463 Downloads) |
Last edited by: hdhosseini at: 10/16/2014 12:32 PM |
|
10/16/2014 12:39 PM | |
Joined: 12/1/2009 Last visit: 10/27/2024 Posts: 672 Rating: (147) |
Dear Wolters, don't get confused yet you are just starting Thenumber specifies the 1st. byte address, that's how you can see it. And B (1 x byte), W(2x bytes).. specifies the total number of bytes. Back to your example: MD 260 is basically MB 260 + MB 261 + MB 262 + MB 263 So you need to write into MW 260 + MW 262 to get your result correct. Best Regards. |
Give us your feedback and show us your respect! |
|
2/18/2024 5:50 PM | |
Joined: 3/23/2016 Last visit: 2/25/2024 Posts: 5 Rating: (0) |
2 Words to DWord in LAD |
Follow us on