SFC to ladder some questions..

bara_hence

Member
Join Date
Aug 2007
Location
Ockelbo
Posts
225
Ive read numerous examples of how to convert a SFC to ladder and Ive used some of them.. But now as I am getting to be a better programmer and wanting to do things better and better I am looking for better soulutions.. Before I used the SET/RESET way of doing SFC to ladder and then I had some networks in the end moving an integer to a step register used for showing a multiple text on a HMI. Why dont using that integer and compares instead of SET/RESET ?? I think it gets messy when dealing whit large sequences with several parallell branches..

Now to the question:

How do you experts handle large sequences that you must program in ladder??
 
Hi, "D352.ST.WAIT_PRODUCT" is The 1'st bit of DB352.DBW20. It could be DBD as well. 1stly 1'st bit must Set and also when Sequence is ready, when next bit from 'SEND' bit is on.
- Transitio [Finnish] is Transition as Event [ONS] when next step is changed.
- F.e. COPY_DATA is ONS as well, so extra edge evolution is not necessary.
Works f.e. in AB and Omron as well.

sequence.jpg
 
Last edited:
Thats a nice method but doesnt it to get a little bit messy when dealinng with parallell branches?? I mean with one parallell branch you have to have one extra dbw to shift to keep track of that branch and if that branch also have one parallell branch... Do you get my drift.. Now i think its kind of unusual with so advanced sequences but sometimes they are there..
 
I made a video showing how I do it:

http://www.youtube.com/watch?v=rCa_U6YATTA


And why do I do it such a long way..... This technique is very easy to explain and teach to anyone including most electricians. You only need to know 3 basic plc instructions that every PLC has available.


I much prefer to use a PLC that supports SFC and keep it in SFC.
 
bara_hence said:
... Do you get my drift..
I hope so. If we have f.e. 3 optional cases (3 sequences) what to do, so 1 main sequence is needed who select one of subsequence 1,2 or 3. So 4 sequences in all. It happends sometimes..

Archie uses same preliminary design method than I, but I like ladder in S7 world. In S5 world SFC was more usable because of smaller gates.
 
A picture says more than 1000 words.. This is what i mean with a somewath complex sequence.. To do this in ladder with set/reset or with selfholding steps no problemos but how to do it in the nicest/best way if they tell you to do this in ladder is the question...

Sorry for the crappy quality but I think you get my idea..

EDIT: woops saw an error the OR convergence in the bottom should be an AND convergence..
 
Last edited:
I would call each step a number. Say 1......20 or whatever. At Rest would be 0.

Then use a register to contain the step number.

Then program

if register=0 then at rest (coil)
if register=1 then in step 1 (coil)
.
.
.
if register=20 then in step 20 (coil)


Then program if in step 0 and condions met, move 1 into step register.

Use step 1 coil to drive relevant outputs (maybe with aux coils) to perform the task

when step 1 conditions are satisfied, move 2 into step register.
etc.

What about an e-stop? maybe move 0 and force them to manually clear out product and then restart.
Or, use HMI to let them select a step.

I will try and draw somthing but time is short

Cheers
 
Using stepregisters works flawless if you have a straight sequence with no more than one step active at a time.. But when dealing with "and parallell" branches you must have a stepregister for each of the "and parallell" branches, I mean here you can have several steps active at the same time and if you are using one register for all the steps this doesnt work.. or have I missed something here?

I often use a sequence run bit that is self retained and when emergency stop or stop or som other condition i halt the sequence or in some cases reset the hole sequence this is much dependent on the aplication..

Sometimes I program the machine to have for example these states: Idle, Startup, Operate, Shutdown and Emergency Shutdown each of these states has one or more sequences for handling of the machine.. This technique i think is pretty neat but for an easy application it may be overkill..

Im pretty young and unexperinced and I want to find a really good programming practice to stick with the few projects Ive done so far Is completely different from eachother beacausse ive used different methods.. This I think is no good when I can I want to use a good method that Ive adopted to 100% so my programs get more reliable and I can feel comfortable with my work..
 
I prefer the step number in an Integer method. It just gives you so much more flexibility. You can branch or loop if needed.

How to handle parallel branches? I prefer to deal with it by starting two new sub-sequences, each with their own step number. The main sequence launches them in one step, then waits for them both to be complete in the next step.

If you have a really large sequence, you can break it up into smaller sequences that are called from a main sequence. Especially useful if some of those sub-sequences will be used more than once. Then the parallel branch is just a special case where you launch more than one sequence and wait for them all to complete before moving on.
 
I do as Mellis says. If the sequence has parallel paths I create a 'sub SFC' that is called by the 'main SFC' and then returns to the 'main SFC' when complete.


Remember you can have 100's of these running at the same time if you so wished.
 

Similar Topics

Q(1) Design a controlling system using DVP-40ES Delta PLC for a threestory Elevator Prototype as shown in the figure below. Show in details the...
Replies
4
Views
2,160
Hello Friends I would like to represent the start/stop of a motor in the five programming languages (Ladder, FBD, IL, SFC, ST) I have done in...
Replies
11
Views
5,315
I am working on a machine with many pneumatic cylinders which cycle in a certain sequence. The PLC used is fully IEC 61131 compliant. I can...
Replies
6
Views
10,894
I'm trying to get a handle on how to discern the "appropriate" times and situations to implement SFC, FB, and STX over ladder logic. I've...
Replies
2
Views
2,698
Working with a program that was done in germany, finally got it translated in english. Found out what the program was doing and narrowed it down...
Replies
2
Views
3,385
Back
Top Bottom