3/23/2010 8:58 AM | |
Joined: 10/3/2008 Last visit: 9/8/2025 Posts: 996 Rating:
|
Yes, it's possible: SCL: DB3.DBW[variable]:= 2; AWL: AUF DB3 L 2 T DBW[#variable] Wüstenräuber |
3/23/2010 9:08 AM | |
Posts: 33 Rating:
|
Thanks, |
3/23/2010 9:27 AM | |
Posts: 33 Rating:
|
THANK YOU VERY MUCH, YOU ARE THE BEST |
3/23/2010 9:36 AM | |
Joined: 5/28/2008 Last visit: 9/3/2025 Posts: 4522 Rating:
|
Hello, Yes you can. You have to access the AR "Address Registers" using STL language. and load in the address register the value you want. So, In this case you can change the address register as you want For more info, please have a look on the following manual and specially in chaper 9 Statement List (STL) for S7-300 and S7-400 Programming Hope this helps, |
Ayman Elotaify |
|
12/9/2011 7:09 AM | |
Posts: 197 Rating:
|
@ eeegokhan: "I want to db number static but adress will bevariable ....." Below is my small effort for DB5 static, DBW dynamic (from DBW0 to DBW20) ........ Somewhat similar to the post of ACDC24, but using the LOOP command. OPN DB5 L AR1 P#0.0 L10 RPT : T MW50 L500 T DBW [AR1 , P#0.0] + AR1 P #0.2 L MW50 LOOP RPT BE This will put 500 in DB5.DBW0 through DB5.DBW20. However,I encountered stoppage in the PLC when it executes the codes given by ACDC24....... Is it because the program keeps looping around for a "long" time ..... or perhaps I understood / did something wrong there...... need to check back again later in the evening. Regards |
12/9/2011 7:23 AM | |
Posts: 197 Rating:
|
Correction in incrementing AR1 :- OPN DB5 L AR1 P#0.0 L10 RPT : T MW50 L500 T DBW [AR1 , P#0.0] + AR1 P #2.0 L MW50 LOOP RPT BE |
Follow us on