[AWL] assign instruction = and index adressing

rbrt95

Member
Join Date
May 2023
Location
Italy
Posts
2
Hi everybody.
I got some problems about how to perform this task

Now, I got an FB where I have this code snippet that looks like:

L P##DBD_134
LAR 1
A [AR1, P#0.7]
= DIX 59.0

//where DBD_134 is a FB's STAT variable with absolute value 62.0

So basically it takes the 62.7 bit's value and store it in 59.0, which is a bit of the double word 56.

As you can imagine, this solution is not optimal because absolute adresses would change if I modify my FB's variables, and the instruction DIX59.0 would not be effective anymore.

How can I modify my code using pointer in order to the first bit of the third byte of the doubleword 56 (59.0)??
 
Can you post the FB code in a cut down library?


I would create a function that returns the absolute address of the STAT variables by passing it as an any pointer, if you change the offset within the instance DB the compiled code will point to the correct address.


How did the address 62.0 get into DBD_134?
 
Last edited:

Similar Topics

Please can anyone convert the attached .mwp file to .awl for me, i dont have micro win Will Really appreciate Thanks and Best Regards
Replies
12
Views
9,448
Can anyone provide me with mwp to awl converter, or older version of microwin, i have been trying to download it from siemens website but it hang...
Replies
3
Views
3,197
Can any one please provide me with mwp to awl file converter, or please provide me the microWin program I have been trying to download it from...
Replies
0
Views
1,553
Hi awanna use this function RtoI_Dec.AWL Source File: Convert Real to Int and move decimal place...
Replies
2
Views
2,562
Hi everybody!! Can anybody specify the difference between S7 STL and AWL with technical reasons. Or they are one and the same thing.
Replies
2
Views
8,015
Back
Top Bottom