statement list STEP 7

roussey

Member
Join Date
Jul 2011
Location
Brazil
Posts
13
Hello,

I am new on STL programming and there is a syntax that I don't understand, exemple:

A #F_P_OUT_OF_RANGE
NOT
A L 0.2
JCN A7ec

I understood that L 0.2 is an aux variable. But it is not defined anywhere, why?

Thank you

 
The L is the temp data area allocated to blocks each time they are run. The data area can be allocated named variables (bools, ints etc.) or the area can be accessed using the absolute address as in your example.
 
The code in question was most likely produced by the SCL compiler (the labels point that way)

e.g. the following SCL code

Code:
FUNCTION_BLOCK fb909
VAR
    C:INT;
    F_P_OUT_OF_RANGE:BOOL;
END_VAR
VAR_TEMP
    wData:BYTE;
    bData AT wdata:ARRAY[1..8] OF BOOL;
    end_var
    IF NOT F_P_OUT_OF_RANGE AND bData[3] THEN 
    c:=1;
    END_IF;    
END_FUNCTION_BLOCK

generates the STL as follows:

Code:
      SET   
      SAVE  
      =     L      1.1
[COLOR=Red]      A     #F_P_OUT_OF_RANGE
      NOT   
      A     L      0.2
      JCN   A7d0[/COLOR]
      L     1
      T     #C
A7d0: CLR   
      A     L      1.1
      SAVE  
      BE
 

Similar Topics

Hi All, I have a task to decipher a calculation done by one of our S7 PLC's onsite. The problem being that its in statement list, and this...
Replies
4
Views
1,854
Attached is a portion of a program I am trying to decipher. The original program was in Italian and I converted it to English. I have limited...
Replies
6
Views
2,550
Kindly assist with the meaning of the following functions calls: CALL FC 122 IN0 :=P#DB121.DBX 336.0 IN30 :=DB121 IN31...
Replies
9
Views
3,288
How do I? "LVA_SW1_SPD_REMOTE" "LVB_SW1_SPD_REMOTE" JC If first line is =1 or second line =1 Jump _003: \used to stl
Replies
3
Views
1,368
Hi, New to forum and desperate to find the answer to my problem ,I can't work out how to do this been on this all night and I'm getting very...
Replies
3
Views
2,138
Back
Top Bottom