Mitsubishi FX2N END instruction insterted at step 2000

jazd

Member
Join Date
Sep 2009
Location
Newcastle
Posts
12
Any ideas why this would be happening? This is the code I read from a EEPROM in a Mitsubishi FX2N. It was previously working and for some reason the PROG-E light started flashing, when I connected I discovered it was giving a check sum error. I then realised that a END instruction had been inserted at step 2000 (is it step 2000? I dont really know much about these).

After deleting the END instruction,the RET instruction and the abnormal instruction codes the ladder view came up fine again and I was able to write it back to the PLC.

Only problem is I dont have a copy of the original code so I'm not sure if the program is 100% correct after my edits. It could be that the insertion of the END instruction actually overwrote something.



Help appreciated. Thanks.
 
All subroutines are coded after a FEnd instruction then the end instruction is usually at the very end, but I have come across programs that when uploaded did contain code after the end instruction these are usually ignored by the plc (could be some leftovers from online changes.
However if there are some subroutine calls you have now deleted them but it would throw up an error when compiled.
You say there was a RET instruction then I assume that this software did contain some subs so it is doubtful that the code is now correct.
You really need the original code.
I have seen memory corruption before especially on AB plc's & at least twice on Mitsi's but on that platform it is rare.
 
Appologies, it seems that the forum stripped out my image. Here is a direct link.

http://img19.imageshack.us/img19/1850/plcw.png

It really does seem like the END and RET instruction were just whacked in there, I am 99% certain they are not part of the original code. See how on 1808 there is a LD M45 instruction which is then followed by the DTO and TO instructions? I'm pretty sure thats a similar structure begining at 1999.

Its really odd because I'm pretty sure the EEPROM would have had its write protect switch enabled.
 
It is quite possible to write code after the END instruction using instruction list but if you view the code then in ladder - the instructions after the END statement do not show.

They are also not scanned in the program.

The m45 repeating after the END may have been another version of the code before - just saved for later, who knows.

But the END is the end of the program.
 
Theres something not right here as thr last instruction is LD M45 with no out or function instruction so this cannot be right.
However if written in instruction list then it may be possible that the plc will run with no errors.
 
Its definitely not supposed to be there. From line 2000 to 2008 should be a TO instruction. We just realised there is a pattern in the code, the TO's are in pairs and the DTO's are in pairs and the register/memory location numbers are incrementing.

So the missing instruction is TO K1 K122 K1203 K1. What I want to know now is how the heck did it get overwritten with a END and RET?
 

Similar Topics

I've worked on one Mitsubishi PLC in the past 40 years. Now, it looks like I get to tackle another one...using GX-WORKS3-C1 software which I...
Replies
3
Views
961
I have been asked to work on a Mitsubishi Melsec FX2N-80MR PLC but have no experience with Mitsubishi at all. The hope is to get online to find...
Replies
4
Views
1,350
Hi all IÂ’ve never worked with Mitsubishi PLCÂ’s or software, but a customer at our branch has requested the PLC program for future...
Replies
0
Views
785
Hi all IÂ’ve never worked with Mitsubishi PLCÂ’s or software, but a customer at our branch has requested the PLC program for future...
Replies
8
Views
1,640
Dear all, I have a FX2N-20MR chinese semi-clon of a Mitsubishi PLC. It has only a serial DB9 port that cannot be removed or exchanged (which is...
Replies
5
Views
2,099
Back
Top Bottom