Subroutines: Micrologix 1500, RSLogix 500

Merganzer

Member
Join Date
Sep 2005
Location
St. John's
Posts
23
Hi,

Working with an AB Micrologix 1500, RSLogix 500 programming.

I'm trying to write subroutines to control a 3 floor elevator system. Main program file will direct the PLC to a particular subroutine file when a particular floor button is pressed (ie.: 3rd floor goto button sends PLC to 3rd floor subroutine).

The problem I am having is that it doesnt seem like the PLC likes to unlatch bits within a subroutine. Im setting a bit within the subroutine to start my drive at 60Hz, then unlatch that bit at a certain point and latch another bit to change the drive to 35Hz. The drive will contine to operate at 60Hz even though there has been an input to unlatch that bit.

Suggestions?
 
Merganzer said:
im kind of a noob, how do i post the code? :p

take your logix file *.rss and zip it up (winzip or something similar)

Then when you make a post, look down below the list of smilies in the typing box and click attach files
 
I'm having PC issues...but at first glance you are droping out your sub when your call your speed? I can't print the PDF...


Look at this closer

elev.gif
 
To start with you have mulitiple OTE's

O:2.0/3 referenced OTE in both rung File 4 Rung 1 and File 3 Rung 0 give one example of this.

As far as i know thats a big no no on AB with the OTE.

Do a search here on multple ote as i am sure it has come up before
 
Well, I dont exactly understand your question, but are you saying that having the load-invert for Down 60Hz at the top of LAD 2 is screwing up my subroutines?


I placed those there so that the other call/goto buttons would be inactive while the elevator is moving (because I havent set up the programming yet to store a sequence value).
 
Another Multiple OTE instance is O:2.0/1.

Looking at the code quickly i would imagine there are a few of these instances with each up down output bit ?
 
In U:3 you set your output 0;2/3, when you do this (on your next scan) U:3 will go low...one thing at a time do what Dave is talking about first, I need to work on my PC

 
Yes, the outputs for the drive are in multiple locations because the elevator must travel up for the 3rd and 2nd floor and down for the 2nd and 1st floors. Instead of having subroutines for individual floors, would it be a better idea to have subroutines for separate speeds? This would limit the OTE location to one.
 

Similar Topics

Hello, Basic question i believe: Is it possible to create functions/loops/subroutines that can be used on different data files. Example: I have...
Replies
3
Views
2,435
I have been asked to extensively modify a piece of machinery that is very mission critical to the operation, thus not allowed much downtime or...
Replies
4
Views
2,290
We have an application where we need to indicate a piece of machinery needs maintenance. I have created a routine which resets a value of "days...
Replies
12
Views
3,733
Hi all. Please see attached. Tried to google the error with absolutely no results. I did the same at payed version and real PLC so I'm almost...
Replies
7
Views
2,341
hello all is there a rule of thumb as to using or not using subroutines when writing a program ? i am using an Allen Bradley slc 500 thank you...
Replies
5
Views
1,738
Back
Top Bottom