stl question siemens s7-400

risbo213

Member
Join Date
Dec 2014
Location
skopje
Posts
1
Hallo
Can you help me with understanding of the code below:

M001: NOP 0

L #PUNTATORE
L 16
*D
LAR1

OPN "ISTROGRAMMA"

L DBW [AR1,P#0.0]
T DBW [AR1,P#2.0]

L DBW [AR1,P#100.0]
T DBW [AR1,P#102.0]

L #PUNTATORE
L 1
-D
T #PUNTATORE
L 0
>=D
JC M001
Regards
Riste
 
It's a loop.
Code:
      M001: NOP   0

      L     #PUNTATORE 
      L     16
      *D    
      LAR1  //calculate address offset

      OPN   "ISTROGRAMMA"

      L     DBW [AR1,P#0.0] //load word from block ISTROGRAMMA with previuosly calculated offset
      T     DBW [AR1,P#2.0]

      L     DBW [AR1,P#100.0]// same as above just add 100.0 offset to calculated
      T     DBW [AR1,P#102.0]

      L     #PUNTATORE
      L     1
      -D    
      T     #PUNTATORE //subtract 1 from var PUNTATORE  
      L     0
      >=D   
      JC    M001 //jump to M001 if PUNATORE > or = 0
 

Similar Topics

I'm having trouble trying to convert this code to ladder, anyone able to help me? A M4.0 A M4.1 A M117.0 AN M17.7 A ( A I38.6 AN I3.7 O ( A M4.5...
Replies
8
Views
1,207
I have an FB that had about 30 rungs of LAD code. I switched views (ctrl+2) to add some additional networks and create some STL code. Now, when...
Replies
6
Views
3,521
program : L #measurement + -1 SLD 4 LAR1 AUF "DB72" L DBW [ar1,P#4.0] question1 : measurment =5 5-1=4 0000 0000 0000 1000 SLD 4 gives 0000 0000...
Replies
3
Views
14,369
Hi all, I'm new to Siemens (I feel like a lot of threads start like this) and I'm trying to write a bit of code in STL. Currently we have a...
Replies
1
Views
1,277
O m0.0 O m0.1 A m0.2 = m0.3 Is the m0.2 "and'd" only with the m0.1 or is it "and'd" with m0.1 and m0.2 (which are or'd)? -{}-----|--()...
Replies
3
Views
1,704
Back
Top Bottom