RSLogix5000 - Stack Overflow Program Fault

AndrewY

Member
Join Date
Oct 2007
Location
Auckland
Posts
13
I keep getting a major fault occur on a CompactLogix L43 CPU which I can't get to the bottom of.

Fault details:
Major fault
Type 04 - Program fault
Code 84 - Stack overflow. Stack too small to perform operation
Always occurs on the same rung where I am calling an AOI used many times in the program.

The manual says to check for too much nesting of sub-routines etc. Total call stack for the rung in question is Task > Program > JSR > AOI. There are plenty of other places with more nesting involved.

The CPU doesn't seem to be too heavily loaded. I'm running 2 periodic tasks (10ms update with ~2-3ms execution time and 30ms update with ~12ms execution time). On the comms side I have 1x Ethernet/IP PointIO rack (20ms RPI) and 1x SCADA (1000ms update rate with ~1000tags).


Is there any way I can get a full call stack for the CPU?
Any ideas as to how I can resolve the fault?
 
can you post the entire ACD program file? ...

if not, I'd try deactivating rungs one at a time in the subroutine that you mentioned until the problem goes away ...

the error message that you've mentioned usually is caused by a JSR instruction "calling itself" so that an infinite loop develops ... after about 34 "jumps" the processor declares a "stack overflow" fault ...


 
By de-activating the rung it kept faulting on ... the same fault just occurs but in an entirely different program, calling a different AOI.
There are definitely no circular references within these AOIs, and each of the AOIs are pretty simple without any loops or anything like that.

I've mucked around with the task parameters and noted that the frequency of the fault occurring increases based on the update rates for the tasks (i.e. if call the tasks at faster rate then faults more often). I've also noted that if I inhibit the 'fast' task then I don't get the stack overflow fault occurring at all.


It'd be great to have a stack/call trace or something similar so I can see for sure if it is the interplay between the two tasks that is affecting this fault.
 
once again - can you post the entire ACD program file? ...

also (if you can't post the file) what are the priorities for your tasks? ...
 

Similar Topics

Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
123
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
428
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,124
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
871
The machine is running production. When trying to go online with the laptop the whole machine looses communication and faults out. Drives, HMI...
Replies
13
Views
1,940
Back
Top Bottom