S7 Crash - local data problems

Stevie_S

Member
Join Date
Aug 2002
Location
Watford
Posts
24
Hi

I've just been analysing a crash on an S7-414, which was caused by the error "Error when allocating local data"

Looking at the Stack information on the Module Information window, the PLC reports that 355 bytes are being used in OB1 (The muppets that programmed this included a 254 byte string in the temp variables of OB1....so I've moved this declaration and associated code to a separate FC called from OB1 which I'm hoping will solve this problem)

I've gone through the rest of the FCs in the stack and have calculated 710 local bytes being used up to the point of the Stop.

Question 1: Is OB1 assigned to priority class 1? This would match up as the local data assigned to class 1 is 758 bytes.

Question 2: The total allocation of local memory in the Temp declarations in OB1 comes to 322 bytes - why does the PLC give me 355 bytes of information in the Stacks window? There are no references to LD / LW / LB in the rest of OB1.

Thanks for any help anybody can give me on this.

SS
 
Re "Question 2: The total allocation of local memory in the Temp declarations in OB1 comes to 322 bytes - why does the PLC give me 355 bytes of information in the Stacks window? There are no references to LD / LW / LB in the rest of OB1."
I guess you have swithed to view as STL, and then checked not only LD/LW/LB, but also Lx.y ?
 
Good point but no, there are no bit references to local data either. The whole program is in STL so I don't think these references can be hidden in any way.

Thanks
 
Can you give some background to the crash ?

For example, was the plc previously running ok and now crashes with no program changes ?
 
To find out how much Local data each block requires, use the block properties as below - is this how you checked the size of the local data (correct method) or did you do it by opening the block and looking at the named Local data variables (incorrect method)

ob1l009.jpg
 
Ah yes, I see now - I was just inspecting the amount of memory used by the temp variables. The properties of OB1 show that it has 355 bytes of local data which matches up with what the L stack report shows after the crash.

BTW, reason for the crash was that I had added an extra 12 bytes of temp variables in an FC called from OB1. It ran fine 99% of the time but then on certain occassions (when a further 4 FCs were added to the nest of calls off OB1) the local stack exceeded the 758 bytes allocated for priority class 1. My fix of taking the ridiculous 254 byte string out of OB1 has worked.

Thanks very much
SS
 

Similar Topics

Within the last week or so, PME has crashed whenever I try to open a configure IO screen. I am running V8.0 Build 6215. Offline configuration of...
Replies
3
Views
391
When i try to open the properties of a 753 drive, i get a fatal error and logix crashes. However, I can open the same AOP on V31 and it works...
Replies
6
Views
788
Curious if there is a windows update that was released that causes LogixDesigner v34 to crash when adding a new module or opening an existing...
Replies
7
Views
10,909
Rockwell finally posted version 33 of Studio5000 Maybe a few hundred of us downloading it today might crash their site?????
Replies
24
Views
9,608
Studio 5000 Crash Dump Hi all, Just wondering if any of you ever had this situation and possible cure. It was driving me a bit crazy as...
Replies
3
Views
4,746
Back
Top Bottom