Compiled by SCL compiler to STL in Siemens!

You can refer to local data by it's absolute address but imagine what will happen if a new temp variable is added in front of the area you are referring to......

The solution is to use indirect addressing and AR1 to point to the named local variable. If a new temp is added no other code change is required.

Code:
      L     #Alarm_Active
      T     #Alarm_Active_T
      LAR1  P##Alarm_Active_T
      A      [AR1,P#0.0]
      =     #b00
      A      [AR1,P#0.1]
      =     #b01
//..
//... etc
//..

That is great! Thanks LD.:geek: :geek:. I will use that idea and i see why you have BOLD on can and but.
 
Last edited:

Similar Topics

Hi, I have on my plant uploaded program from from s7 315 but judging on many jumps with labels mxxx i think that is stl compiled scl. I do not...
Replies
9
Views
3,202
hi guys ! i m new to siemens SCL. Actually we have a PLC program given by our supplier who has done some programming in SCL. But he has not...
Replies
9
Views
10,314
T
Hi, I have an ABB AC500 PM-582 PLC, The question is... is it possible to get the compiled code out of the CPU, i need to have this as a backup...
Replies
7
Views
1,476
Hi. Question goes to the guys who works with ABB AC500 PLC's. Is it possible to upload the compiled code from a AC500 CPU ?. My case is that i...
Replies
1
Views
2,608
So after hours searching google and looking through everything I could find here, I have an issue that has stumped me for quite some time and was...
Replies
20
Views
10,625
Back
Top Bottom