Help converting FX1N IL to LAD...

Eric Nelson

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Randolph, NJ
Posts
4,346
I uploaded a program from an FX1N today, and got the dreaded 'yellow ladder'. There are 3 rungs that exceed the 24 row maximum (by quite a bit!), so they won't convert to ladder. I'm guessing the original programmer was more comfortable programing in IL.

I can see the 'hidden' instructions if I view it in IL (in GX Developer). I did my share of programming in mnemonic code on the old Omron C/K-series back in the 80s, so I started to convert it myself. I quickly got confused with all the MRD, MPP, ORB, ANB stuff.

I found myself saying "Okay, so where exactly does THIS branch connect?" too often, so I'm sure I would make mistakes.

I am hoping one of our resident Mitsubishi gurus could help break up these 3 gigantic rungs into smaller ones that will convert to ladder.

The 'missing' lines are 167 to 243, 976 to 1042, and 1897 to 1967.

Anyone up for the challenge?... :D

🍻

-Eric
 
Eric,
I just saw this, I'm hitting the road in 5 mins so I took a quick look (I am horrible at IL) this would take some thinking even for an IL programmer. I have attached some explanations of MPS,MRD,MPP from a Mitsubishi manual. I will check back tonight and see if you have gotten any help.
 
Thanks, Bob. I looked at those exact pages yesterday in my manual to 'refresh' my IL skills. I'm just hoping someone here might be 'fresher' in IL than me. If no one steps up, I'll probably have a crack at it again this weekend.

If I type the 'hidden' instructions manually into the IL editor, it will do the conversion as long as I keep it under 24 rows. I'm just not sure exactly where it was originally intended to 'tie into' the already converted rung. From what I looked at already, it appears to attach at multiple points.

GX developer just does a hard crop at 24 rows and turns the rung yellow to let you know. I think the missing parts are going to be something odd like this:

|    |
| |
| +---] [-------]/[-------] [--------( )


^ ^ ^ ^ ^
| | | | |
| +---] [---+---] [---+ |
| | |
| +---]/[-----------------------+

🍻

-Eric
 
I feel your pain Eric. I have had to do this in the past too.

What I did was open several versions of GX-dev and copy and paste the hidden 'list' into a new program. (at least then I got the branches correct)

I printed out the whole program and the new copy and paste parts and fixed the jigsaw.

I also changed the instructions that take a lot of steps until it would convert from yellow. Like one 32 bit instruction at a time - as in DDAD to just ADD.

Hope that made some sense to you
 
Thanks for the support, Goody... :D

I will have another go at it this weekend when I can concentrate on it. If it were ladder and I had to convert to IL, it would be simple. Back when I used to enter Omron programs with a hand-held programmer, I would draw out the ladder by hand first, then convert to IL as I entered it.

The problem is I can't 'picture' the MPS, MRD, and MPP connections in my head and be SURE that I am branching in the right places. With Omron, you just used a TR bit at each branch, and continued on. There were not 3 different types of branches... :rolleyes:

The second yellow rung alone has 131 instructions in it! Branch upon branch upon branch! Sort of like a run-on sentence! It needs a period here and there to get me back to the left power rail... ;)

Once I have the ladder version of each yellow rung, no matter how huge it is, I will have no trouble chopping it up into multiple rungs.

🍻

-Eric
 
I had a quick look at the program and I converted the first yellow section just by removing D from DADD and the downward branch from M8002. (the blue arrow in the picture)

The hidden list comes from this branch which in this case is just a M8002 bus line. Copy and paste the hidden list to another instance of GX and then convert to ladder. :)

plcx.jpg


plc.jpg
 
I finally got it all converted. Let's hope I got it right... ;)

The first and third yellow rungs weren't all that difficult, but that second one was quite a chore. On the first and third, I could just remove the repetitive instructions to shorten it enough to convert, allowing me to see how it branched. By repetitive, I mean the instructions that don't affect the branching. For example, in the screenshot you posted, you can safely remove the 3 RSTs, and the branch stays put. Just have to remember to put them back when done! Oh, and you can't just remove them in ladder. It has to be in the IL editor.

The second one was just so big that I couldn't remove enough 'stuff' to allow it to convert. And if you don't get the MPS, MRD and MPPs in the right order, it makes quite a mess!... :ROFLMAO:

Like you said, Goody, the trick to figuring out how the ladder should look is to look at portions of in IL. That second one ended up being almost 50 rows in that one rung.

Thanks for the help!... :site:

🍻

-Eric
 

Similar Topics

Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
355
Hi! I am working on a project were we will be replacing an 300 CPU with a 1500 CPU and we are working on migrating / converting code. There is a...
Replies
9
Views
1,094
Hi! I need help converting an old MicroLogix 1100 project to Micro 820. Project Details I have an old MicroLogix 1100 program that has been in...
Replies
0
Views
482
Hope someone is really bored this late on Memorial day!!! I have spent the last 5 hours researching this and trying everything I could find on...
Replies
9
Views
3,296
I am needing to convert the low DWORD of a timestamp into a LREAL. The DWORD is a 32bit unsigned number. In TwinCat2, I keep getting a negative...
Replies
3
Views
1,702
Back
Top Bottom