Subroutines: Micrologix 1500, RSLogix 500

OK folks, I've got it all figured out. Works great now. Thanks for all the help!

I'll post a piece of test code that I used. The motor stopped and started when I wanted it to.

This is a technical thesis that I am working on for my college program (Electrical Engineering Technology). If any of you are interested, I can post some things about our project so you can see it being built.

Thanks again.
 
Merganzer said:
If any of you are interested, I can post some things about our project so you can see it being built.

Ummm.. in that example you are using an input to latch an output, and another input to unlatch it.

That's a 2-rung solution, it still escapes me why you are using a subroutine.
 
Also, I must unlatch and latch the output bits directly otherwise they will stay in a high state indefinately. Thats what subroutines do in the Micrologix 1500.
 
Merganzer said:
Also, I must unlatch and latch the output bits directly otherwise they will stay in a high state indefinately. Thats what subroutines do in the Micrologix 1500.

i dont understand your statement ?

Why will they stay high ?

Normally an output would only remain high if the preceeding logic is true.

And what do you mean by "thats what subroutines do in an ml1500" ?
 
Dave,

Have you viewed Merganzer code?, I think it will work...He's just not done, he needs the slow speed, etc.


Thats what subroutines do in the Micrologix 1500.

I think he was refering to logix 500


But anyways finish the code, there are 100's of ways to do it...we need elevmike to help 👨🏻‍🏫


Could you use the same speed and floor logic, just look at different floors for diferent inputs?o_O never mind... keep going
 
I think it could be done with a lot less than 500 lines of code, but hey, everybody has a different way. "nothing is wrong if it works".

I was just commenting that with the on/off logic you had in that test snippet, there didn't seem to be much need for a subroutine to do that.

Dave, what he means is that whatever you set in a subroutine stays in that state until you execute the subroutine again.
 
tomalbright said:
"nothing is wrong if it works"

I agree, and the best part is... if it works and never fails then I will never have to look at it in the first place (y) , as long as that elevator stops at the correct floor.




tomalbright said:
I think it could be done with a lot less than 500 lines of code
Thats why I made the statment of o_O never mind
 
you should only reference an output one time so I believe what might be happening here is it does not change to 35% because somehow your use of 60% is in the program last and the last one wins. What you could do is use a bit to deactivate your rung using the 60 cycle anytime the 35% is being used or true
 
you should only reference an output one time so I believe what might be happening here is it does not change to 35% because somehow your use of 60% is in the program last and the last one wins. What you could do is use a bit to deactivate your rung using the 60 cycle anytime the 35% is being used or true

That sounds correct. However, I'm going out on a limb here and say that in the last ten years since this particular thread started, Merganzer has finished his school project. Or abandoned it entirely. 🍻


This is a technical thesis that I am working on for my college program (Electrical Engineering Technology). If any of you are interested, I can post some things about our project so you can see it being built.

Thanks again.
 

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,436
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