S7-300 multilevel Loop

pboll

Member
Join Date
Nov 2005
Location
Beijing
Posts
16
Can S7-300 do multi-level loop?

I don't know where is wrong, I cannot do that. Is there somebody used that fuctions before?

Thanks in advance.
 
Sorry I don't know what's the official name of that kind of loops, it looks like:

===============
L 10
NEXT: T Loop01
...
...
L 20
NXT1: T Loop02
...
...
L Loop02
Loop NXT1

...
...
L Loop01
Loop NEXT
===============


I tested out successful in simulation, but when I download into 315, it faulted.

Any explaination?

Thanks.
 
What fault was indicated in the diagnostic buffer ? This will almost always lead to to your coding error (cycle time, address does not exist, db does not exist etc.)
 
Stop caused by time error (OB not loaded, or not possible, or no FRB)

When I disable the inside loop or disable the outside loop, or set any loop number to 1, it's OK.

I guess I have to change one of the loops or change a PLC. I guess it only supported by highend such as 400, I can run it in simulation, not any problem.
 
Problem solved

I changed the outside loop code from

LOOP LP01

to


L loop01
L 1
-I
T loop01

A(
L loop01
L 0
>I
)
JNB LP01



Stupid 315!
 
I don’t know anything about Siemens but I think it is a timeout for controlling a kind of end less loop. The time it takes to execute you code is to long?
 
pboll said:
Stop caused by time error (OB not loaded, or not possible, or no FRB)

The scan time is exceeding the maximum scan time set in the hardware setup due to the loops, the simulator probably ignores this.

If you are sure that the PLC can exit the loops, the loops are required and your process is not scan time dependant then you can up the maximum scan time allowed in the setup.

Paul
 
PLucas said:
The scan time is exceeding the maximum scan time set in the hardware setup due to the loops, the simulator probably ignores this.
Paul

The default scan time is set to 20secs when running in the simulator. If you click on the Execute option in the simulator you can change it to your own preference (or indeed disable it if you want to)
 
Is not a problem of scan time.

I changed 315 to maximum scantime setting which is 6000ms. I'm sure it's enough, but it's still faulted.

BTW, my regular scantime of the program is 80ms.
 
pboll said:
Is not a problem of scan time.

Are you sure?

pboll said:
Stop caused by time error

That says it's a scan time fault.

pboll said:
I changed 315 to maximum scantime setting which is 6000ms. I'm sure it's enough

I wouldn't be so sure, Simon has stated that the default scan time for the simulator is 20 seconds, you have set the scan time on the 315 to 6 seconds, that still leaves a 14 second difference between the simulator and the 315.

Disable your loops then enable them one by one, checking the scan time each time until the PLC goes into stop, you will probably see that it is your loops taking the scan time over the maximum.

Paul
 
The simulator runs an awful lot faster than a 315 so setting the same scan time in each will be like comparing chalk with cheese. Can you post the code segment with the nested loop (not in symbolic form) so we can have a look ?
 

Similar Topics

Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
112
So basically i have 2 queries : 1. I have a program file of S7-300 PLC which i want to migrate in RSLogix500.In short i want to convert my simatic...
Replies
15
Views
257
Hi i using Kinetik 300 2097 driver control by EIP with using move absolute and incremental for motion , but i want to add same driver and motor as...
Replies
0
Views
64
Hey all, first time poster here. I am wondering if anyone has tried using a Keyence SR-X300 barcode scanner to a Micrologix 1400. Keyence sent...
Replies
0
Views
63
Hi Siemens guys! I am experiencing SF fault on our S7-300 (6ES7 315-2AH14-0AB0) CPU from time to time. I've checked the diagnostic buffer and...
Replies
13
Views
195
Back
Top Bottom