2/25/2014 8:08 AM | |
Posts: 8946 Rating: (999) |
The Step5 instruction set limits the address for DW accesses from 0 to 255 - that's why you have to use OB180 For the S5-135U / CPU 928A/B you can use windowing commands with OB180, when you have opened a DB then it is possible to lay a window over the DB and easily add a number. Have a look here: /tf/WW/en/Posts/2305 |
2/26/2014 3:13 AM | |
Joined: 10/7/2005 Last visit: 10/4/2024 Posts: 3024 Rating: (1054)
|
Hello jameel
yes, you can skip the OB180 call, but NO, you can NOT implement as you suggested. Put simply, here's what OB180 does (see also chapter 6.16 of the S5-135U CPU 928B Programming Guide for more on this, the same also applies for a 948 CPU). The value that you have in accu1-L "offsets" the start address of the DB, for example: L KB 200 // DB start address offset value C DB132 // open DB JU OB180 // change DB 132 start address by offset value in accu1-L L DW 0 // DW 200 is loaded L DW 255 // DW 455 is loaded In your case, the offset is calculated based on DB5/DW8 and FW250 value whose value is then updated, which suggests that this is a dynamic indirect addressing related access. Either way, you'll need to evalue your logic a bit more (stuff that happens to DB5/DW8 and FW250 outside of the logic you posted here) and then come up with a way to reprogram this in S7. I hope this help |
Cheers |
|
Follow us on