SLC5/05 just stopped executing code

snyderej

Member
Join Date
Jan 2005
Posts
7
The L553 I have just stopped, no timers are timing even though it's in run mode and the timer rungs are true, I can see inputs change in the input data file if I flag a P/E but it's like it's just on a break...

It says File 2 rung 20 which is a service communication instruction in S:21 and 20. There is a 0h in S:6.

So i'm wondering has anyone run across this issue? It's been power cycled, switched from run to program and back and the green light is steady aand the enet comm light is flickering and I'm online. I just can't make it do anything.
 
Only Program File 2 runs automatically; every other program file has to be called by an active JSR instruction or by an interrupt.

Every time I've fielded a "the logic is not executing in RUN mode" call, subroutine execution was the problem.

But it's a big world. Do any other function appear to not work ?
 
Nothing appears to be executing. many of the times in file 2 have true rungs so the timer should be executing but it's neither timing nor does the TT bit come on etc. I've re-seated the processor and all cards. I don't have a magor fault, it's just like it stopped at rung 20 in file 2 and is sitting there. I AFI's that rung, rebooted, powered down and up and nothing. It still says the same rung in S:20 and 21. There are JSR's in front of this rung and after, I have several dispersed in the JSR's to address slow comms (typical) and it's been in service for 2 years.... No issues I know of.
 
I’m taking a big “stab in the dark” here but is it possible that the logic is stuck in a sub routine? Try saving the logic (in RSLogix) with a different name (so you don’t lose your work) and delete all of the sub routines or just create a new very simple program where it’s only file 2 and see if it work (create a timer that runs when you set a bit). I ran into this once (a long time ago) and I think I remember it to be that I had the program jump to a sub routine but not return so when I’d look at the main logic (file 2) nothing was running. Again, that was a long time ago and I don’t clearly remember what I did wrong (I might have just started over). I also think that you can’t have the same item running in two routines (the same timer, T4:0, for example). If you do that I think it won’t run at all in either routine.
With all of that said, when I’d get into trouble I’d just call up Ken so he may look at this post and say I’m way off which is a possibility. :)
 
In the end I just replaced the processor

I couldn't afford the downtime so I saved the running copy of the software and dumped it in another L553 and it came right up working. I'll keep an eye on it and report back to the group if I run into anything again. I've got a few test racks so I'll try and download the code to it or maybe some test code on it and see if maybe I just had a anomaly.

Thanks all for your suggestions....
 
I’m taking a big “stab in the dark” here but is it possible that the logic is stuck in a sub routine? Try saving the logic (in RSLogix) with a different name (so you don’t lose your work) and delete all of the sub routines or just create a new very simple program where it’s only file 2 and see if it work (create a timer that runs when you set a bit). I ran into this once (a long time ago) and I think I remember it to be that I had the program jump to a sub routine but not return so when I’d look at the main logic (file 2) nothing was running. Again, that was a long time ago and I don’t clearly remember what I did wrong (I might have just started over). I also think that you can’t have the same item running in two routines (the same timer, T4:0, for example). If you do that I think it won’t run at all in either routine.
With all of that said, when I’d get into trouble I’d just call up Ken so he may look at this post and say I’m way off which is a possibility. :)

That explanation cannot be the case....

The controller has a "watchdog" time setting that guards against the logic "getting stuck".

In your context, "Getting Stuck" means that the scan of the program doesn't finish within the allotted watchdog time. Reaching the end of program file 2 resets the watchdog, since all of the user code has been scanned.

Nothing stops the user code getting scanned, there are no instructions that the controller will wait for completion. Anything that takes a time (e.g. a MSG (Message) instruction), will have control bits that the controller will look at on each scan to decide how to proceed.

Having said that, there are Program Control Instructions that can prevent the scan getting completed, such as a JMP to a LBL in front of the JMP. If that JMP is enabled too long, program file 2 will not complete within the watchdog time, and the controller will major-fault.

snyderej, assuming your original controller isn't just "faulty" and the fault is bypassing all of its internal integrity checks, a very rare situation!!, then look for any one of the following causes of the symptoms you have described, all have been written on the basis that you said that timers in file 2 are "frozen" .....

1. MCR Zone - MCR (Master Control Reset) Instructions are used in pairs, you will have a conditional MCR to "start" an MCR Zone, and an un-conditional MCR to "end" the zone. If the rung containing the conditional MCR instruction is false, then the following logic is scanned with all rungs starting as false (the programming software still shows a highlighted green power-rail). Because the rungs start as false, all non-retentive outputs within the MCR Zone will be turned off, and timers will not run, etc.

2. JMP / LBL - a JMP instruction will instruct the controller to continue program scan at the rung containing the corresponding LBL instruction. The logic that is "jumped" is not scanned at all, so nothing will happen, outputs won't turn on and off, and timers will not get enabled.

3. TND - a "Temporary End" instruction will terminate the scan of the current program file, so any following logic doesn't get scanned, and can appear to be "frozen".

4. Duplicate references to the same timers somewhere else in the program (eg another program file). If the same timers are "used again", then the rungs with the duplicates on may be false, thus resetting the timers so they don't appear to be running.

If you could post your (zipped) RSS file, there are many people on here who could tell you straight-off if you have a logic (code) problem.
 
Now that you've got it up and running in a new processor take the old processor, unplug the battery, and on the back side of the board near where the battery plugged in find the pins labeled VBB and GND. Short them together with a paper clip or short piece of wire for several seconds. The processor should reset to factory defaults. Now you can try and resurrect that processor.
 
Doing that will only clear the user program and data, it will not do anything to the firmware.

OP changed the controller, and downloaded to it, and (so far) all is well... Perhaps a fresh download to the original controller would have cleared the issue ? It's possible there's been mods to the running code ???
 
What I meant by “getting stuck” was just what you went to. Was there a flaw in the logic that once it jumped to a certain routine, there wasn’t anything to get it to go back to the main routine? In other words, in the main logic under a certain condition the program jumps to subroutine 3 but in subroutine 3 there isn’t anything sending it back to the main routine or if there is it wasn’t getting triggered. I wasn’t implying that the logic itself would stop scanning. Kinda moot given that he put the same program into a different controller and it’s now running.
 
What I meant by “getting stuck” was just what you went to. Was there a flaw in the logic that once it jumped to a certain routine, there wasn’t anything to get it to go back to the main routine? In other words, in the main logic under a certain condition the program jumps to subroutine 3 but in subroutine 3 there isn’t anything sending it back to the main routine or if there is it wasn’t getting triggered. I wasn’t implying that the logic itself would stop scanning. Kinda moot given that he put the same program into a different controller and it’s now running.
For that to happen there would have to be jump in the subroutine calling itself repeatedly - and the processor should fault out on a scan time error & halt with a fault LED.
 
It sounds like the problem is still potentially there in the code to happen again with the new processor.

It's running now, but I suspect the controller itself was never the problem. Would have liked to have seen the code so we could've taken a look at the actual cause.

The S:20 address is simply where the controller was in the logic when it either faulted or powered down. Since you are not having a fault, then S:20 is probably irrelevant as is S:6.

OG
 
question: did the MACHINERY quit running? ...

I've seen cases with RSLogix5000 - but never with RSLogix500 - where the SOFTWARE freezes and won't update numbers, etc. in the ladder listing and/or data tables - but the PROCESSOR was actually still chugging right along doing "business as usual" ...

It says File 2 rung 20 which is a service communication instruction in S:21 and 20.

sheer speculation of course - but the fact that a "service communication" rung MIGHT somehow have been involved points to the POSSIBILITY that MAYBE the screen just wouldn't update ...

here's a previous post as a sample of the sort of thing I'm talking about ... once again - I have seen several instances of the data shown on the screen "freezing up" when using RSLogix5000 - but not with RSLogix500 ... usually we just shut down the offending window - then reopen it - and everything gets back on track again ...

http://www.plctalk.net/qanda/showthread.php?p=451485&postcount=13

so since we're just guessing here - I'm guessing that maybe the processor didn't hang up - it was just the display on the screen ... so no bet - not even pocket change - but that's my GUESS until/unless more information comes along ...
 
Last edited:
<Aabeck> I agree. However I’ve seen some pretty messed up programming and I think it’s possible that there was/is something in the logic where a subroutine is being called for and that condition doesn’t go away. If I create a simple program where I close an input and it calls for subroutine 3 (for example) and I leave that input closed the program stays in subroutine 3. If a subroutine is being called for when a bit is latched but there isn’t anything to unlatch the bit or the condition that latched the bit doesn’t change then it would stay in that subroutine. If that was the case then “re-downloading” the program (which is effectively what he did when he loaded it into another controller) would appear to fix the problem assuming that the bit is not set at start up and the condition has/does not appear again.
 

Similar Topics

I have wasted a week trying to figure out how to connect an SLC5/03 with my laptop. I do not have and can not Buy the 1747 UIC and PC3 cables. I...
Replies
14
Views
2,575
I am trying to connect to SLC5/03 using an FTDI usb to rs232 with female to female converter at 1 end... however I can not connect to it ... the...
Replies
8
Views
1,287
Good evening. I am in serious need of help. I am trying to connect a Panelview Plus 7 Standard to a SLC5/03(1741-L531) using a Moxa MGate...
Replies
3
Views
650
Hi. I am having trouble establishing comms between an slc5/04 and panel view plus 7 via a PLX51-net-eni. The set up is: 5/04 Channel 0 DF1...
Replies
8
Views
937
Hi All, I have programmed some MSG instruction in SLC5/05 64k CPU series D FW 13 brand new cpu. 2 of the MSG instructions are direct IP to other...
Replies
3
Views
989
Back
Top Bottom