Micro-logix 1200 Program files

fishenguy

Member
Join Date
Nov 2007
Location
WESTERN PA
Posts
125
Could someone answer a pretty simple question for me.
Can you have more than 1 ladder in the program files for a micrologix 1200 program?

I wrote a program with 4 ladders in the pojects file tree.
The program verified and downloaded to the processor.
But now the pocessor won't scan anything but the Main Ladder (#2).

There are true rungs in the other files but the outputs aren't coming tue.

Thanks, Dave
 
Yes. You need to make sure you call (JSR) the other ladders from Ladder 2 and then make sure you have a Return (RET) at the end of each other ladder.
 
JD Micky posted a JSR pic on his other post for the same question. RET is only needed if you are doing funky things. If logic reaches the end it will return without the command.

Gotta act fast here.
 
Interesting. I guess I've been doing it wrong for a long time. I always thought you needed the return.

Its not a blanket statement ( not needed) there are reason to return before the end of a subroutine.You just don't need it at the end of a subroutine. Programmers choice.
And in the PLC5/?? world there are other reasons ( like passing parameters)
 
Last edited:
RET [Return from Subroutine]

Without a RET instruction, the END statement (always present in the subroutine) automatically returns program execution to the JSR instruction in your calling ladder program.
For RSLogix500, I don't think it is a case where the RET is not needed, but a case of there being another instruction (END) that will fill in if the RET is missing.

For other languages, the RET or End-of-Routine is necessary. I once left it off of an old Unimate Robot program. Those programs were always recorded on top of older programs. If you left off the End-of-Program instruction, the the robot would just go to the next line of the previous obsolete program and keep on going - with bad results.

In my case, the arm oscillated rapidly out, up, and down, tore out a countertop, threw pieces of 2x4 and plywood all over, scattered process containers, caused two men to dive off stepladders, and upset the entire shop. No one was hurt, and I never forgot to include the END after that.

If you always put in the RET, you won't go wrong.
 
Last edited:
And in the case of Fishenguy, it's not that you have 4 programs, it's that you have one program with 4 sections. It may be that the logic to call those routines is mutually exclusive (only call one of them) to make it effectively 4 separate programs (depending on circumstances) but it's one project. The inputs are probably connected to the same thing and the outputs connected to the same thing, unless you got really wild and switched those also when switching which routines are called. Hmm, I never even though of trying that before and I think I'm going to permanently banish it from my brain.

In any case, know your processor and what is needed to process programs.
 

Similar Topics

I lost the manual for this machine built in 2003 and need to put it back together. I have the Micrologix 1200 and PanelView 300 Micro programs...
Replies
4
Views
1,789
What type of internal memory does the MicroLogix 1200 Ver.C have? In the documentation, there is only an internal non-removable battery for the...
Replies
1
Views
1,599
I have several Micro Logix 1200's that are bad. Looks like fine metal dust has gotten between the lower board and the plastic outer shell. There...
Replies
6
Views
3,272
Need help a source code to make timer display into hour:min descending from a time of delay 1 sec base timer. Thanks
Replies
22
Views
5,954
Hi, I'm using RsLogix 500 micro starter edition with a micrologix 1200 plc. I want to use a counter where I can change the preset via variable. I...
Replies
3
Views
3,695
Back
Top Bottom