Stop program help.

cartierusm

Member
Join Date
Oct 2016
Location
San Francisco
Posts
25
I'm very new to programming. I'm using a Click PLC and have successfully wrote a program for my new bottling line. I've also setup a C-More HMI and got it to work correctly.

I want to add buttons on the Click/HMI to disable the photo-eyes so the bottling line won't continue so physical adjustment can be made to the machine without triggering the program.

So I think I'll need to disable or pause the functions for the input of the photo-eye.

How would i do that in the Click Programming, then what would i do to re-enable the functions?

Thanks.
 
Since I can see your code, I'm going to speak in general terms.

You could add a latching button on the HMI to mute the eyes, then use an XIO that is addressed to your HMI buton in front of the bit for the photo eyes. For example:


PE MUTE........PE.......Action
---|/|----------| |-------( )


This way the first press of the HMI button would mute the eyes, and the second would un-mute them. You would also want to include something on the screen to indicate rather the eyes are active or not.



Will.
 
Last edited:
Thanks. I'm not completely sure how to program that.

Right now this is what I have:

x004--------(CT1)

CT1---------(Y103)

I take it PE Mute would be just a NC contact at whatever address I asign? So:

l/l (C1)-------X004------------(CT1)

Or since it's latching would it be:

l/l (C1)-------X004------------(CT1)
l
l
l lC2------

I'm going to use two buttons to start and stop. I'm really not sure of what you mean, you'll have to dumb it down for me. Thanks.
 
Ahhh I got it. Sorry, using a NC contact and then using a toggle switch in the HMI, got it.

Thanks. COol. Unless you had a different idea then I'd still like to learn. Thanks.
 
Be careful, as this sounds like a potential safety issue. If machine movement can cause any damage to the machine or injure whoever is making the "physical adjustment" then you may need to do a bit more than just disable the photoeyes.
 
I'll take a look gclshortt.

Thanks bjh, I know exactly what you mean. I always address that issue first. i'm a fabricator and machinist so the physical is not a problem.

i decided to put the l/l C5 (toggle switch) in front of every rung that is used during normal operation.
 
What you are proposing IS a safety violation.
You are not allowed to disable inputs and allow the plc program to run this way. someone could be working inside the plc panel and accidently cause an input to turn on and start a part of the machine !!

What I would do is to program the machine using start and stop buttons and a key switch.
a keyed switch would be used by the operator to turn on a contactor to power the plc outputs and as an input to the plc saying outputs are powered.

program in a hardwired start pb to start the line.
program in a hardwired stop pb to stop the line.

when you press the stop pb, you seal in a stop request.
when the machine finishes the auto cycle, it will see the stop request and stop the line.
Maintenance turns the key switch off and takes the key, adjusts the machine, and then replaces the key and turns it on.

This is in simple terms, but a risk assessment must be done to make sure it complies with regulations. other things may have to be done.
get safety, engineering, maintenance, operators, and supervisors to agree on the course of action.


regards,
james
 
@gclshortt, I kind of get it. What I don't get is in the subroutine is the call and unconditional return.

What i mean is I want, let's say, a toggle switch on the HMI to trigger C5 NC and then the program would divert to the subroutine. So I don't get the 'call' part of it. Also it says you need an unconditional return. I would want when C5 was open NO to return to the normal part of the program. Can it be done that way?

@James Mcquade, i like your thinking, but I'm so new to this and haven't found a way to start/stop a program. Is there an example you make. I mean I could use a keyed physical switch on the system and put a l/l X008 in front of every rung. Or is there an easier or correct way to do this?
 
I like this guys enthusiasm.

But your in over your head a little bit. Listen to what James is saying. Safety is a BIG issue. And your fixin to violate alot of rules.

Take a step back, and come at this from a safety aspect first, then figure out the programming.

Trust me you don't want any injuries on your conscience.
 
this is a quick thing, I have an appointment shortly.

rung 1 - power on bit and machine at home inputs turn on an at home bit.

rung 2 - program in a sealing bit for the stop command.

rung 3 - machine at home bit and not the machine stop bit and run auto cycle bit - run permissive bit.

rung 4 - rung 1 and 3 bits and start pb - seal in the auto run relay

rung 5 - power on bit and auto cycle run relay.


when you hit the stop pb, rung 2 will stop the next auto cycle.

you will have to set up toggle logic between the start and stop logic, but this is close.

james
 
Ok so i did a subroutine the way i wanted it done. Used bit C14 Closed to trigger the subroutine and C14 Open to return to the main program, but it said I also needed an unconditional return, which is fine.

So that works, kind of. It works, but it doesn't disable the rest of the main program. I need the main program disabled so I can use just the subroutine and then return to the main program.
 
John, I completely agree. I've been building machinery my whole life. This is my first foray into programming. I have no problems with the physical world, electrical and mechanical. The machine is not built yet that's why I'm working on the programming. It will be completely safe by the time I'm done.
 
Setting aside the safety concerns for now...

Conditional subroutines are usually a bad idea in a PLC.

All the stuff that happens inside the routine remains "frozen" in its last state. If you left a "coil" energized, it will stay that way.

I have seen this done successfully by having another routine that is called on the falling edge transition of the conditions that call the first routine. Now you have a routine that goes through and does whatever need to be done when the routine is not being called. So while it can be done, it ends up being a pain to follow, troubleshoot and modify.

Having another "Auto_Mode" contact on every single rung of the program (if necessary) is much better style in my opinion.

What your logic needs is an overall mode control. Then use that mode as a condition for the sequence of operations.
 

Similar Topics

Basically I know that I need a GSV but I still Don't know how to set the time to stop the pump. The pump has to stop certain day at certain hours...
Replies
10
Views
2,733
Hello All, we have one machine which having Modicon quantum PLC with CPU 140 CPU 651 50. I have plan to modify small changes in PLC program. Is...
Replies
3
Views
2,131
As soon as an FC block (written by me in an SCL source file, inserted in a LAD project) gets signal, the program stops. If it's in a network, but...
Replies
2
Views
1,356
Isn't there a button that should be placed somewhere in a display to stop the execution of the program? I can't think of what it's even called...
Replies
9
Views
2,158
hello I am new with the gml program. I have a 1394 IMC s class drive that i need to replace. I have the original program and i am trying to...
Replies
1
Views
2,947
Back
Top Bottom