STL_LOOP for Pointing DB values-Siemens

Join Date
Mar 2014
Location
india
Posts
1
Dear all,

I have prepared a logic for moving DBvalues first in first out.

There is a problem in execution could you guys help me out.


L 0
T #index
T #index_temp
T #out
L 1
T #incr


L P#DBX 2.0
LAR1
T #count

// When Triggerd

A #activate
JCN M003


OPN #Source //Open Source DB
L P#DBX 0.0 //point pointer
LAR1 //load pointer into register +AR1
L DBW [AR1,P#0.0]
T #out // transfer first in to first out
JC l2
l2: L #count
+AR1
L DBW [AR1,P#0.0]
T DBW [AR2,P#0.0]
L #count
+AR2
L #noofelem

L #incr
+ 1
T #incr
L 20
<I
LOOP l2
NOP 0
 

Similar Topics

Good day. I have a device on profibus that I am reading data from using SFC14. This data is written into an array within a DB. The array is 128...
Replies
6
Views
3,743
If you take a look example in FBD on a picture, it seems to me perfect for loop call. I got 12 fields. I think it is not possible to do LOOPing in...
Replies
7
Views
2,420
Hi, I’m a beginner and try lo learn stl.. I have written the following program. I want to put a timer in a loop and I use it here to set all the...
Replies
4
Views
2,933
Hi all! I'm testing a routine that I've just written under STL and I would appreciate some help from someone else more experienced than me with...
Replies
5
Views
18,256
Hello, I am using a FB in witch I want to wait for a reply. For example: a bit is set (e.g. M0.0 - request) and after 10 seconds (or sooner) if...
Replies
12
Views
4,717
Back
Top Bottom