Student Project Question

It would NEVER have worked the way Amm had it originally, with Subroutine 7 being called on EVERY scan. Sub 7 turned off all the outputs to the water pump, soap dispenser, and so on, keeping all of them from ever being turned on by any of the other subroutines.

Keith, as you pointed out, the danger of using Outputs twice is when you create an error condition without realizing it. That expecially applies to students and beginners. I still say this is a method to be avoided.
 
Last edited:
Actually, ProWorx won't let you use an output coil more than once. Its best to structure your program so that no output coil, internal or external is used more than once; its easier to read and the folks that have to maintain it will not have to deal with the unusual problems it can create.
 
Originally posted by Lancie1:

I still say this is a method to be avoided.

I would also agree with this. But to say it CAN'T be done is not true. You may see this as a semantic point but amm obviously didn't. He correctly pointed out that what really was needed given his original design intent was to condition the call to Subroutine 7.

In an effort to get our points across we all tend to simplify and speak in absolutes. On a forum like this it is often the easiest, most direct way to get a point across. The absolutes we tend to use are often not absolute. Every once in a while someone is paying attention and notices this.

Should this methodology be discouraged? Most likely yes. Is it impossible to implement? No.

Keith
 
kamenges said:
You are correct, it can work. But that doesn't necessarily mean you should do it. If I were your instructor I wouldn't dock you anything for using the same output in selectively called subroutines. I would, however, grab you after class and strongly suggest you don't do it.

And just because you can doesn't mean it will work as you expect it to, either.

If you're going to do it, you have to be extremely careful and intentional with all of your programming. You have to know exactly what's being scanned and what isn't. Otherwise, you'll get wrong results.

And it's a @#*&$@*&# to troubleshoot, too...

And alot of the old processors wouldn't even let you do it... the software wouldn't compile... That's how some of us old pharts who have been doing this for more than a couple of years learned this lesson.

There's a reason why it's just bad practice to have multiple writes to the same output!!
 
Because we said so

Re; the use of multiple coils

I've read through all these replies. If you notice, the underlying message from all these veterans is the same; DON"T DO IT. I can tell you as a 20+ year veteran in this business the advice these folks give comes from years of lessons hard learned. Your responsibilty as a student in our field is very clear; study hard, think clearly, & listen carefully to the advice of veterans in the field. They will alsways tell you straight. I won't say "good luck in your career" because if you do these things you will develop the skills necessary to be sucessful in all your projects.....Learn it right....Do it right
 
Wow I spend a couple days working on my PIC programmer project(everything comes due at once in school) and I get plenty of really good help thanks so much.

I was actually told by my instructor at least a few times that a coil should only get used once, not to mention the text brings it up too.

Thanks so much Lancie I see from the first pdf were I think your going but I think I should try again myself before I open those files up. My school is a bit nuts for academic integrity and I tend to agree in order to learn I gots to do.

But I will open it up this weekend and compare what I come up with to yours.

Thanks again to all of you for your comments and help.
:geek:

And not that it makes any difference but I am a woman the am stands for Anne-Marie.
 
I am only too pleased to be of help, Anne-Marie. Yes, definitley try it on your own. If you get stuck, then take a peak at what I did. I tested it with LogixPro based on what you have said was needed, and it seemed to work.

Big Hot Tip: Use the Timer DN bits to stop the Outputs when the cycles end, but make sure the subroutine Outputs (water, soap, blower, and so on) are off before you exit the subroutine.

Because your timers are inside subroutines (I understand you did this because the project requires the use of subroutines) then you should set your Comparision instructions to end 0.1 seconds before the timer Preset values are reached (and DN bit goes on). You can move the comparison instruction time back 0.1 seconds (what I did), OR you can move the timer Preset value up by 0.1 seconds. Maybe it is technically better to move the Presets up by 0.1, to keep your cycle times exactly as specified by your instructor, instead of being 0.1 seconds less. In the real world, nobody would care if the times are 0.1 second short for a car wash (might even save the owner money over a long time period), but in the ideal unreal world of the classroom, objections might be raised. Anyway, do one or the other. If you let the timer DN bit stop the subroutine calls, and the Outputs in the subroutine are still on, then the outputs will be stuck on and there will be no easy efficient way to turn them off. For the above reason, I also changed the last Greater Than rung in each subroutine to a Limit instruction, so that the Outputs go off BEFORE the timer DN bit goes on.

Much more could be done with the coin detector/changer. You could write routines to give change for dollars, quarters, dimes, and so on. There was a guy on here last year, who wrote a program for a vending machine, so we have that as a guide. I know this is above the project requirements, but some instructors give extra credit for extra work. Only you can decide whether it is worth some extra effort.
 
Last edited:
Scott,
She is using LogixPro, an RSLogix Simulator program (TheLearningPit.com). Although the instructions are very similar, LogixPro will not read the RSLogix format.

Anne-Marie,
Now that you have a good chance of getting it to work, here is a question that should be asked: Does your car wash project have to account for a queue, a line of cars waiting their turn? If a car is in the wash, and another pulls in and deposits coins, what must your program do? If you are required to handle a queue, then adding more counters is a good way to go.

Off Topic on the school project, but related to car washes: What is the main ingredient of the soap used in car washes? I did some work for a company that provides equipment and supplies for automated car washes. I found out that the main ingredient of car wash soap...is not soap or detergent, but foaming agent. It seems that Americans are psychologically conditioned by their mothers and many years of soap advertisments to believe that things can't get clean unless they are coated with gobs of foaming suds. So that is what you get in a car wash. I didn't believe it either, so the owner of the company gave me a challenge to prove it. He said place two cars side by side. Wash one with lots of soap, and the other with plain clean water, cleaner and purer is better. The technique is to use a long-handled soft brush, spray on the water, rub with the brush, repeat until done. Park the cars in a sunny place with no dust. After drying, compare the results.

I was amazed to see that the car washed in plain water was much brighter and cleaner than the one washed with soap, which appeared to have a dull layer of scum.
 
Last edited:
How to account for a second car entering the line up to be washed, when first vehicle is being washed: Add counter C5:1, start it when vehicle sensor is on and coin is detected. At the end of 1st vehicle wash, move C5:1.ACC to C5:0.ACC, and you are good to go.
 
Last edited:
Anne-Marie,

The weekend is drawing to a close, and did you get the car wash program in good working order?
 
My Microprocessor project was a bit moe than I thought it would be, I realy hate assembly.
Better late that never I did manage to get my car wash project together.
Thanks so much for your insights and advice, not to mention a working version of the project.
I just wish I had come on here earlier in the semester.
Great Site.
 
Does your car wash project have to account for a queue, a line of cars waiting their turn?
If a car is in the wash, and another pulls in and deposits coins, what must your program do?

No it doesn't account for a waiting car, not very real world.
The teacher just asked that any coins placed into the machine during a running cycle be ignored until the car leaves the bay.
 
My Microprocessor project was a bit more than I thought it would be, I realy hate assembly. Better late that never
If it was easy (you could do it already) then you would not be learning anything new. Learning is not without pain, but find a field or niche that you enjoy and it will be less painful, maybe even enjoyable.
 

Similar Topics

hello I am currently enrolled in an electrical program in which i am learning about PLC's. I have been given several projects that require me to...
Replies
2
Views
1,938
i am presently doing my final year undergraduate course, i need few tips to start my project in plc
Replies
16
Views
4,330
dear friend I studing electronic engineering and my final project is related to Wincc(under 50 tags)I download wincc(without authorisation)and...
Replies
2
Views
2,733
Hi guys and gals have a question: I'm currently a student and just started taking a class on PLCs. So this is my first time doing Ladder Logic...
Replies
3
Views
8,065
K
please, I need a process controlled using plc.
Replies
5
Views
3,538
Back
Top Bottom