Automatic_Sequence

ielkhatib

Member
Join Date
Apr 2020
Location
Egypt
Posts
34
I've been using bits and integers to organize sequences, but its only good for small sequences with no exceptions included ...

How Can you Program a large sequence with over 50 Steps, and use exceptions like alarms, pausing, Sub-Sequences, etc ?

How can you use timers to organize sequences ??
 
ielkhatib,
Never use timers to control any sequence. someone will always speed up / slow down cylinders, change timer values,modify the program and you will end up with a mess.

since you did not specify the plc, may i suggest this.
create an integer data register for the step sequence in steps of 10.
initialize the program for autocycle.
step 10 load the part and detect the part, hit the palm buttons to start the cycle
increment the step to 20.
step 20 clamp the part and wait for clamp prox confirmation, increment to step 30
step 30......
and so on.
if the program needs modification let's say after step 50, make the step 51.
51 then increments to step 60.
in regards to a cycle pause, use a cycle pause bit via a pushbutton. Not a timer. create a flip flop bit.
for alarms, use a set of bit registers and latch each fault bit. for an ab plc, do NOT use the sigh bit. use a scrolling for next loop to display each fault/alarm on the screen by using a timer to display the fault.
hope this helps.
james
 
I use a 2D 32 bit integer array, row 1 is input/conditions, row 2 outputs, row 3 timer setpoint, row 4 counter setpoint, and the rest are various integer setpoints as needed for the step. Inputs and outputs use Bit of Word. There's a basic step advance run that shifts the array column when everything is happy. IMO it's easy to follow and see what is happening. Best to setup everything outside the program in a spreadsheet.
 
ielkhatib,
Never use timers to control any sequence. someone will always speed up / slow down cylinders, change timer values,modify the program and you will end up with a mess.

since you did not specify the plc, may i suggest this.
create an integer data register for the step sequence in steps of 10.
initialize the program for autocycle.
step 10 load the part and detect the part, hit the palm buttons to start the cycle
increment the step to 20.
step 20 clamp the part and wait for clamp prox confirmation, increment to step 30
step 30......
and so on.
if the program needs modification let's say after step 50, make the step 51.
51 then increments to step 60.
in regards to a cycle pause, use a cycle pause bit via a pushbutton. Not a timer. create a flip flop bit.
for alarms, use a set of bit registers and latch each fault bit. for an ab plc, do NOT use the sigh bit. use a scrolling for next loop to display each fault/alarm on the screen by using a timer to display the fault.
hope this helps.
james

Thanks James this looks great, do you have any PDF examples for this ... any PLC Brand is fine
 
Take a look at this, it's a simple sequence that fills a drum, moves it along a conveyor into a bin lift that when it reaches the top it tips holds for a time to allow it to empty then drops it back to the conveyor, sends it back to the fill station, simple but also stops in position on alarm until the alarm is cleared.
 
Take a look at this, it's a simple sequence that fills a drum, moves it along a conveyor into a bin lift that when it reaches the top it tips holds for a time to allow it to empty then drops it back to the conveyor, sends it back to the fill station, simple but also stops in position on alarm until the alarm is cleared.
Thanks for this amazing file, but could you explain more about,
How do you split the sequence somewhere and rejoin it later using this technique, and how can I handle multiple exceptions (i.e, Home position, hold, E_Stop ..etc ) ??
 
I use a 2D 32 bit integer array, row 1 is input/conditions, row 2 outputs, row 3 timer setpoint, row 4 counter setpoint, and the rest are various integer setpoints as needed for the step. Inputs and outputs use Bit of Word. There's a basic step advance run that shifts the array column when everything is happy. IMO it's easy to follow and see what is happening. Best to setup everything outside the program in a spreadsheet.

Looks fancy but could you elaborate more, may be with some examples for better illustration ??
 
Take a look at this, it's a simple sequence that fills a drum, moves it along a conveyor into a bin lift that when it reaches the top it tips holds for a time to allow it to empty then drops it back to the conveyor, sends it back to the fill station, simple but also stops in position on alarm until the alarm is cleared.

Your sequence is good but rather than just having one state word I would recommend using and input state and an output state. Evaluate the Input state to determine state actions and then let your transitions set the output state required. At the end of the block, transfer output state to input state ready for the next process scan.

By doing it that way, each state exists for a complete process scan and you do not skip multiple states in one scan. This can make it easier for other processes to interact with the sequence.

Nick
 
Hi In Parky's example it is possible to be in different steps in the same scan

I would suggest to use a next step word and at the end of the scan use that to update the actual step

--- manglemender beat me to it in a more eloquent style
 
Your sequence is good but rather than just having one state word I would recommend using and input state and an output state. Evaluate the Input state to determine state actions and then let your transitions set the output state required. At the end of the block, transfer output state to input state ready for the next process scan.

By doing it that way, each state exists for a complete process scan and you do not skip multiple states in one scan. This can make it easier for other processes to interact with the sequence.

Nick

Hi, Could you explain more with examples ?
 
Hi In Parky's example it is possible to be in different steps in the same scan

I would suggest to use a next step word and at the end of the scan use that to update the actual step

--- manglemender beat me to it in a more eloquent style

Could you give some examples ?
 
If your sequence is looking too complicated, is there stuff in your sequence that actually belongs elsewhere? Break thinks down to smaller units if possible.

To handle faults and exceptions you can go to a "Pause" state and if you log the previous state then you know where to go back to when a resume is required.

You can use a single timer for delays and timeout functions by having your state set the timer value and then re-trigger the timer on a state change. This can be achieved by comparing the input state with the output state: if they are equal then the timer runs, if they are not equal then the timer is re-triggered and will start with the value set in the transition to a new state.

Nick
 

Similar Topics

I have a job utilising an S7 400 plc which requires a no of automatic sequences to occur.I have some nice timing diagrams from the customer but I...
Replies
2
Views
1,585
Hello, I need to create an automatic transfer panel that connects to the generator when the mains power is cut. I can draw up to 60kW and draw up...
Replies
0
Views
59
Hello everyone, I'm having trouble solving this one and was hoping someone could help. I have a AB CompactLogix L16ER PLC connected to a AB...
Replies
2
Views
572
Hello everyone, I was hoping someone with a lot of experience with Automatic Device Configuration would chime in with any of your thoughts on this...
Replies
6
Views
1,815
Hello. At my job I get from clients lists of their inputs and outputs (hundreds of them) and what they want the program to do. So I have to type...
Replies
2
Views
1,327
Back
Top Bottom