5/16/2012 6:10 AM | |
Posts: 1064 Rating:
|
Read dcharters response it will bea double word ,the problem is with L B [MD4] is invalid because the b is incorrect Take a look at this http://support.automation.siemens.com/WW/view/en/24519683 |
This contribution was helpful to
1 thankful Users |
5/16/2012 8:26 PM | |
Posts: 559 Rating:
|
Dear AmirAlwaled, Also you need to note down that if you are using any Double Int as indirect addressing then it must be multiple of eight with the actual address you want. So if you want to load value at address MD 400 then you mast use below instruction: L MB [MD 4] Where value inside the MD 4 must be 400* 8. So it would be 1600. |
This contribution was helpful to
2 thankful Users |
5/16/2012 10:06 PM | |
Posts: 1064 Rating:
|
It can't be B[md4} it if you want to use a memory merker you need to use mb{md4} not the b by itself |
5/16/2012 10:20 PM | |
Posts: 148 Rating:
|
I have already done what you say [code]S M [MD 4][/code] |
Last edited by: AmirAlwaled at: 5/16/2012 10:22 PM |
|
This contribution was helpful to
1 thankful Users |
5/16/2012 10:54 PM | |
Posts: 148 Rating:
|
the problem is that the " area tybe " of the word that we need to load are calculated at runtime so I don't know it's location at Marker memory or input memory or output memory or even in datablock. So I need to edit the " area tybe " and then use it in code |
5/17/2012 12:24 AM | |
Posts: 2348 Rating:
|
Amir, i've done several times what you're trying to implement - in my case it works. L P#M0.0 // ACCU will contain 16#83000000 - i.e. memory area + address T MD4 L B[MD4] // it would be implemented as L MB0 is fine. Although i would replace MD4 for AR1 (T MD4 is replaced to LAR1 in that case). This will ensure nothing will overwrite your address. |
This contribution was helpful to
3 thankful Users |
Follow us on