RS logix program Allen Bradley

GIVITSUM

Member
Join Date
Apr 2004
Posts
3
HI Everyone!.

I'm very new to porgramming PLC's. I'm busy writting my first 'real' program on RS logix for an AB SLC500.

Anyway my program runs throught a set of tasks then illuminates an output (light), Then does another sequence of tasks then illuminates another light when the program is complete.

My question is how can i program a stop command, so if its pressed less than half way through (first light) the program resets to initial conditions. If more than half complete the program continues to complete the current cycle then halts.

Also how do i make a Start / Stop button?

I know you clever people out there will find this very easy to answer.

Many Thanks
 
1.What you mean start stop button?
first push start second stop?
Search this forum you will find lot of samples.
If you talking 2 push buttons one for start and one for stop you really new.

Regarding your question to stop the cycel in certain point and to stop in the end it matter of conditions.
After the stage you want to continue the cycle to the end block the
stop button and end the cycle.
See the above picture if you press stop before stage 5 it will stop immediately if not when it come to the last stage and stop pressed
b/15 will go on.and stop the cycle.

slc1.jpg
 
When you say:
my program runs throught a set of tasks then illuminates an output (light), Then does another sequence of tasks then illuminates another light when the program is complete.

Do you mean that a process controlled by the PLC goes through a set of tasks, or that the PLC interally is performing some functions, then lighting a light?

If this is internal, remember that your scan time could be under 50 milleseconds, and during this time the inputs are not checked for status, only an "image" of what the inputs were before that scan.

If it is an external process that runs through many scans of the PLC, then ArikBY's setting an interrupt bit is the way to go.
 
so if its pressed less than half way through (first light) the program resets to initial conditions

Greg's first question is the heart of the answer to your post.

The big question is how should your system reset to initial conditions? Has anything moved - if so, how does it return? Does this "reset" put your "real world" process into (or through) an unsafe condition? Describe it in words before you try and program it. Depending on your answer, this can be very easy or very complex.

As Arik and Greg suggested, setting a "stop" flag is a good approach. If the "Stop flag" is set, and you are less than half-way through your sequence, then run your reset routine. Otherwise, if the "stop flag" is set, then after completion of the last step run your stop routine.

Good luck,

Marc
 
RS Logic programming.

Thanks to all that have replied.

To answer some of the questions:-

Stop/Start Button 1 push start 2nd push stop.

The sequences the plc runs through controls pneumatic rams (external).

Thanks:)
 
Maybe...

Maybe you use this button with a counter or timer up to 2 and then use the accumulator value 1 for start and the other for stop which resets the insruction. I think I tried to acomplish this task without complicating it trying to check the state of the output, But I dont think i was able to make it work.

I am new to programing to and I am sure there is a better way out there.
 
GIVITSUM said:
Stop/Start Button 1 push start 2nd push stop.

Search the site for "flip-flop". You will find lots of examples of how to get that functionality from your one button.

Since you are controlling real-world devices with your code, be very careful how you write your reset routine!

Marc
 
Start/Stop with 1 button

The simplest way to do a Start/Stop with 1 button is to have
the Start/Stop bit (through a one-shot, this depends on PLC manufacturer) enable an add instruction. Each time you push the button add 1 to a register. The value in the register will toggle between even and odd numbers. When the number of even, the LSB in the register will be 0, when it's odd the LSB will be 1.

If you want to avoid using a one shot instruction, use a counter instruction instead of the Add. This is more costly in some PLCs
(in A-B PLC's it uses up 1 counter structure, ie. 3 words of memory)
and less costly in others (Modicon Counter instruction takes up 2 words of program memory vs. 3 words for the add instruction).

Either way, this approach is simple. No latches and memory bits and it's easy to manipulate the register (ie. set it to 0 or 1 with move instructions).

Good luck,

(8{)} ( .)
 
Hi Arik,

thanks for your posts. Can you please explain this two rung program.

I dont know how diff up works.
 
Thanks ArikBY!

I'm still trying to understand one shot instructions!.
I think I've got the hang of it, now I can combine it with your stop sequence program.

(8{)} ( .)

I got the stop / Start working with counters and am now trying to get one shots right.

Thanks

Eric

The LEARN PLCS SECTION makes it very easy to understand.

Ta V.much
 
Last edited:
Look on that as 2 separeted things.
The way to end cycle after stop.In most cases you will have to end the cycle after the stop PB pressed.Not immediatly.
The one shot and start stop with one PB are very common and useful when you came program PLC, spend time for that it will help you in future.
If you still haveing problem with one shot come and ask.

All the best
 
A warning about using a single pushbutton to toggle start/ stop.

This is a quote from BSEN 60204 -1 :1997

Also IEC 60204-1:1997

"Safety of Machinery - Electrical equipment of machines - General requirements"

"9.2.6 Combined start and stop controls

Push-buttons and similar control devices that, when operated, alternately initiate and stop motion shall only be used for functions which cannot result in a hazardous condition"

This is the european standard for electrical control of machines and any machine in the EU should meet this standard.
Or any machine supplied to the EU, i.e. CE marked.

The recommended standard is seperate start and stop buttons , suitably marked.
 
John

You right.
I never use this method for start and stop the machine.
In most cases I use it for man operation from HMI and stop button can stop the operation or if you change from man to auto.
That why I never use the alternate option for switch in HMIs.It might stay on in the wrong moment.
 

Similar Topics

I just read this article at MrPLC.com http://www.mrplc.com/kb/index.php?page=index_v2&id=25&c=11 I guess I must be one of the old-timers that...
Replies
6
Views
6,243
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
141
Hi. I came into a problem that was buried in my memory. I had a list of modifications to do on 2 RSLogix programs. So I tapped in the IP...
Replies
7
Views
1,014
I have a client with a program he's trying to load into an older FlexLogix controller (1794-L34/B). He has the program, but I'm thinking the...
Replies
2
Views
525
Hello, any help would be appreciated. My question is, if I upload a Controllogix program to my laptop while the program is running, will it stop...
Replies
2
Views
995
Back
Top Bottom