Grafcet 2 LAD conversion....

TL_

Member
Join Date
Nov 2005
Location
Beringen
Posts
5
Since a few years I'm a teacher in a 'Technical Institute'. Before I was an automation engineer and I mainly programmed Industrial Robots.

In my new job I teach the basics of PLC programming. One of the skills I (try to) teach the students is how to program sequential programs with PLC using the grafcet method.

In the books I use, I found a big mistake in converting a grafcet to LAD instructions. See picture.
grafcet2LAD1.jpg

What's the mistake???

Well when changing step there will be more then 1 step active at the same time. Because the previous step will be reset the next PLC-cycle.

This event only last 1 PLC-cycle. But it's wrong.

One off the first rules is when the next step becomes active the previous step has to become inactive.

I've demonstrated this error to my college teachers. But, they aren't convinced. They have teached this method for years and never had any problems. (They think.)

I stated that in bigger programs used in real you can’t rely on this kind of programming. So I proposed how it should be done.
grafcet2LAD2.jpg

Here you do not have this error behaviour.

So anyone who agrees or disagrees with my statement, proof my right or wrong.
 
Well TL_,

I do agree. You can simplify the solution even further by setting and resetting in one rung, like this:

;Step n
AND Step n-1
AND Conditions
SET Step n
RESET Step n-1



That way you'll always be sure that only one step is active at any given time.

[EDIT]It looks as if Ivo was just some minutes ahead of me.[/EDIT]

Another thingy I don't like is the fact that these flipflops are drawn as SET-dominant ones. I aways use RESET-dominant flipflops unless it's necessary to do otherwise.

Kind regards,
 
K.i.s.s.

Indeed but JVDCANDE in an older post explained the meaning off KISS and this is my opinion to. That’s also the reason why I prefere the LAD-sollution and not the STL(IL) sollution.

The students are around 17years old so I’m glad if at the end they know de difference between de NC closed switch connected to the PLC and ladder ‘-|/|-‘ statement in the program

 
Proof...

In search in an example to proof my right I found this. If you want to program a watchdog to check the process-time. You could program this the following manner: You use an ondelay timer. You start this timer when the process starts. In the example (M64.1). And you stop the timer if it reaches the end of the process step (M64.0). The timer value is the maximum time that may not be exceeded. The timer should become ‘1’ when the process-time is exceeding the time programmed in the timer. When you program the sequence like the first example this will never work. When you program the sequence like the second, no problemo.
timer.jpg
 
Last edited:
TL_

I also agree on the KISS approach. I only posted in STL because I couldn't produce a ladder picture fast enough. The rung I posted can be entered in LAD perfectly, provided the terms I used are declared as symbols, or you enter absolute addresses instead.

Kind regards,
 
I don't like set and reset pairs scattered throughout the program. Like Steve said, just reverse the order... :nodi:

I live by this method of sequencing, and use it on every program I write. I gave an example in THIS post a while back.

🍻

-Eric
 

The trick is not only to reverse the order but also to add some extra steps the "COMPLETE" en "IN CYCLE" 'step'. Without that trick you still could have errors.


When you have an old PLC like you mentioned you have no other choice.

But with the recent PLC's and programming it's no problem at all, you can easily find the 'scattered' 'Sets' and 'reset'. And I don't think you can call this scattered. It's in the same program block, there where you expect it. If you don't need the reset you can simplify the ladder a bit more.

And for the novice it's much more readable, you have a direct link to the grafcet method. The 'COMPLETE' and the 'IN_CYCLE' step you need with your method are not mentioned in the grafcet method.


|
| STEP 2 STEP 2 DONE STEP 3
|----] [-------] [-----+--------( S )
| |
| | STEP 2
| +--------( R )
|


| STEP 3 STEP 3 DONE STEP 4
|----] [-------] [-----+--------( S )
| |
| | STEP 3
| +--------( R )
|
| STEP 4 STEP 4 DONE STEP 5
|----] [-------] [-----+--------( S )
| |
| | STEP 4
| +--------( R )
|

 
Last edited:

Similar Topics

I’ve found SFCEDIT by http://stephane.dimeglio.free.fr/sfcedit/en/ a simple and reasonably priced Grafcet Editor for planning and documenting...
Replies
2
Views
2,454
Please I want software to convert grafcet to ladder:shock::confused::confused:
Replies
3
Views
4,545
Hi people, I need to make a grafcet and later convert to ladder. In this work I have 3 buttons (on, stop, emergency). I want to know how I can...
Replies
1
Views
4,482
I'm wondering if there are any really good books out there for Grafcet. I'm basically needing to fix or find a problem in an existing program and...
Replies
8
Views
3,419
Hi Does anyone know of a nice to use (and possibly free) package (say like visio) that I can use to draw SFC charts for inclusion in a word...
Replies
12
Views
16,126
Back
Top Bottom