PDA

View Full Version : Magic Logic disapearrance act!


Pierre
March 1st, 2006, 07:43 AM
Having been called for a rush intervention on a system, there in-house programmer emited his opinion that some rungs must have disapeared from the PLC.

"Say what?"

He told me that a few times it happened on some of his system (Mitsu - AB - Siemens).

Being full of wisdom myself (sure) and since he was paying me a great deal to be there I went on to tell him that "In the field of electronic everything can happen." but IMHO he was full of $xxxt.

Checksum between sections of the boards inside the PLC cannot permit it.

Heve you ever seen anything like this?

randylud
March 1st, 2006, 07:59 AM
I am with you Pierre, not gonna happen! Makes a good excuse for something that did happen that no one knows about yet, like someone fiddling with things on the sly!

Steve Bailey
March 1st, 2006, 08:07 AM
Quite possible on older PLCs, but highly unlikely on newer models.

Under IEC regulation 61131-401, every PLC manufactured after 3/31/2000 must be equipped with Code Recirculation Technology that prevents code that leaks out of the CPU from being emitted into the environment.

When the regulation went into effect, it also mandated that systems with I/O counts greater than 256 must be retrofitted with CRT devices. Systems with smaller I/O counts were not required to be retrofitted, although if they were 'substantially modified', they were to be retrofitted with CRT.

Unfortunately, the directive failed to define what was meant by 'substantially modified'. In an extreme case, a group calling itself the Nerds Organized to Reverse Memory Leak (NORML) sought an injunction to prevent a manufacturer from changing a timer preset in a small PLC until they applied a CRT device.

Rube
March 1st, 2006, 08:19 AM
Actually it can happen--I found some of this guy's code on the loading dock of my plant this morning.http://www.plctalk.net/qanda/images/icons/icon12.gif

Tom Jenkins
March 1st, 2006, 08:30 AM
Actually, I have had two instances of logic in a DL-250 PLC that simply didn't behave as it should. We deleted the lines, re-entered tham exactly as they were before, and everything worked as expected.

I guess the moral is never say never, since power glitches and such can cause wierd results. However, think this guy's claims of disapearing logic is most likely an example of poor file management technique.

dale1627
March 1st, 2006, 08:36 AM
Tell him to look around in some of the other PLC's in the plant. The missing code may have migrated to one of them. Kind of like how my brand new wire strippers migrated from my tool box to another guys box without anyones knowledge. Makes sense that if a pair of Klein strippers can suddenly gain the ability of self-locomotion then so could a few rungs of logic. Maybe one rung left and the others followed.

Dale

mgvol
March 1st, 2006, 08:38 AM
Is the guy burning changes onto the EEPROM's after he makes online changes? If he is using EEPROM and makes on online change w/o burning the EEPROM, the next time the code loads from the EEPROM, his code would "disappear". If he isn't using any type of back-up memory, then it is very strange.

rdrast
March 1st, 2006, 08:54 AM
I've actually seen this happen once, but not with the running program, only rungs in the process of being edited. In that case, it was a true original series PLC5/10.

In every single other case where I've seen program corruption, it has caused the CPU to fault out and shut down.

RSL
March 1st, 2006, 09:46 AM
I actually learned that EPROM lesson the hard way. I did it to myself.

It had me baffled until I realized what I had done, errr not done.

It indeed seemed that some of my code had just disappeared.

RSL

Goody
March 1st, 2006, 12:04 PM
And of course using older versions of the program could do it.

If he is NOT using online edit and not verifying the program but editing version 23 of the program on his laptop and version 27 is in the PLC then downloading V23 with his edit - updates v24 to v27 have disapeared

Seen this done before with the same complaint that code has dissapeared.

Fred Raud
March 1st, 2006, 12:48 PM
Actually it can happen--I found some of this guy's code on the loading dock of my plant this morning.http://www.plctalk.net/qanda/images/icons/icon12.gif
thats my code,,,give it back!

Fred Raud

Fred Raud
March 1st, 2006, 12:56 PM
it makes no sense to me how a run would disappear,,ive worked a bit with assembly language and ive seen information get corrupt,,from reading and writing to it or in individual cell get burnt(very rare),,but to have just one set of instructions disappear just doesnt make sense,,

i have yet to disassemble a plc's micro into assembly,,but i can imagine how it would look for a simple loop



442b ldx #$19
442d clra
442e eor 019c,x
4431 decx
4432 bne SUBRTX


no just for that one small bit of code to 'disappear' makes no sense,,

sounds more like it was never written in the first place

Fred Raud

Pierre
March 1st, 2006, 02:39 PM
I've had a hard day but you guys can really put a smile back on my ugly face. :thumb:

The situation was that when they called I first told them:
-"Don't touch anything 'till I'm there."

When in front of the system there was this EE and his boss and the Plant manager and everybody but the receptionnist.

He had in hand a disk and wanted to download the backup in the PLC. In my to many years of this $hit I have learned that when called to fix a mess, taking control of the place is the one most important thing to do at first.

When younger I would have listen to there suggestions and would possibly still be there woundering why they think I such a loser for having not found the bug yet.

I did find a bug in the program and hacked it to work correctly again with the means to "reset" the faulty section in the event that it happened again.

A 10 000 rungs without comment, full of Set/Reset is hard for anybody to find.

What he told me first was "Lets download the backup cause some rung could have dispeared"

"Say what?"

PS: Steve are you a proud member of NORML (http://www.norml.com)? :beerchug:

plchacker
March 1st, 2006, 02:50 PM
Free roaming code? Gee I thought free electrons were bad. :D

icky812
March 1st, 2006, 02:55 PM
I've been in the electronics field in one form or the other for a while and I've never seen an EEPROM or Flash memory loose a portion of the data. I have seen them loose all of the memory due to overvoltage, but never just a portion. It would take a multitude of events happening "just" right in order for it to occur. Probably a 1 in near infinite chance in it ever happening. Too much timing involved, plus depending on how the plc memory is interpreted, the program would not look the same once you tried to download it.

Fred is right, I have seen memory "burnt" where it wouldn't hold new values, but usually it holds the last value that was written to it and can't change it. EEPROMs are easy to kill, they are good for usually about 100k writes or so depending on model. Flash is hardier and can usually take several million write cycles before dieing.

Look around the plant, I bet the escaped code is hanging out in a corner having a nap...

TConnolly
March 1st, 2006, 03:37 PM
It is entirley possible for a rung to disappear. But it happens because someone screwed up when he went online to the PLC.

See this post from our distinguished resident guru, Ron Beaufort.
http://forums.mrplc.com/index.php?showtopic=6785&st=0&p=27943&#entry27943


Guys, get in the habit of looking in the top left corner the second you go online with a PLC and see if edits exist. If you don't, I promise you, one day sooner or later you will be sorry.

newbie
March 1st, 2006, 03:38 PM
Must've been that "Not Me" guy from Family Circus.

jstolaruk
March 1st, 2006, 04:30 PM
Sounds like a convenient excuse to offer his unknowing management to explain his sloppiness or incompetence.

ChuckM
March 1st, 2006, 07:45 PM
I've had my share of strange things happen to my programs. However I usually recognize that I goofed it up myself.

We once had a system being put in (non PLC) that relied on a Microsoft Access database. One of the guys the system supplier left there munged the database by copying over it with an older copy. We didn't even own the system yet but one of my superiors and myself spent 7 hours manually re-entering records from a hard copy report we were able to generate from where our AS400 system syncronized with the vendor's database. Long story short... This guy blamed it on coruption. I blamed it on too much whiskey in his coffee.