Yann,
So you are saying that the sequential editor in Classic Ladder Grafcet
freezes up?
I use the Classic Ladder - Ladder editor quite a bit and I don't have
any freezing problems with that.
The only recent Classic Ladder changes that I am aware of are Modbus
related, not logical editor related.
What you need to do is to establish a "state" engine in Ladder. That
gets around racing issues for the most part.
There are some other techniques to avoid race issues but I will skip
those now for clarity..
A program that you need might look like the following: (Look at this in
fixed width type)
Start system: State 1
i0 B1 B0
-----| |------------------| \ |------------------{L}------
| B1 In process
|---{L}------
Run with whatever glue tank is full starting with Glue pot 1
Glue pot 1 full State 2 - Use Glue pot 1
i1 B0 B2
-----| |--------------------| |-------------------{L}------
| | B0
| |-----{U}------
B6 | | B6
------| |------------------------- | |---- {U}------
Glue pot 2 full
State 3 - Use
Glue pot 2
i2 B0 B3
--------| |--------------------| |-------------------{L}------
| | B0
| |-----{U}------
B5 | | B5
------------------------| |------------ |-----{U}------
Glue pot 1 and 2 empty State 4 Both tanks
empty when system was started!
i2 i1 B0 B4 Honk horn?
-----| |-------| |-----------| |-------------------{L}------
| B0
|-----{U}------
State 4
B4
-----| |------------------------------------[ timer for 3 seconds ]----
3 sec timer times out B4 State 4
----| |----------------------------------{U}---------- Reset State
4 and reset system to off
| B1 In process
|------ {U}-----------
Was running with glue pot 1 but now glue pot 1 is empty
but glue pot 2 is full
Glue pot 1 empty State 2 State 5
Run now with glue pot 2
i1 i2 Glue pot 2 full B2 B5
-----| \ |------| |----------------------| |-------------------{L}------
| B2
|-----{U}------
Was running with glue pot 2 but now glue pot 2 is empty
but glue pot 1 is full
Glue pot 1 full State 3 State 6
Run now with glue pot 1
i1 i2 Glue pot 2 empty B3 B6
-----| |------|\ |----------------------| |-------------------{L}------
| B3
|-----{U}------
Was running and then both Glue Pots became empty
Glue pot 1 and 2 empty
B2 i1 i2 B7 State
7 Pause system via Hal
-------| |--------------|\|------|\|----------------------{L}---------
B3 | | B2
-------| |-------| |-----{U}------
| B3
|-----{U}------
State 7
B7
-----| |------------------------------------[ timer for 2 seconds ]----
2 sec timer times out B7 State 7
----| |--------------------------------------{U}---------- Reset
State 7 and reset system to off
| B1 In process Must
fill glue pots, restart glue system and unpause EMC
|------ {U}-----------
The trick to thinking about this logic is that when you move to a new
state, you need to release or unlatch the old state....
That makes the logic sequential..
Now to connect the logic bits to the outputs: The easy part.
B2 Q1 Glue
pot 1 valve
---| |-------------------------------------{ }---
B3 Q2 Glue
pot 2 valve
---| |-------------------------------------{ }----
B1 Q3 Glue
pump motor
---| |--------------------------------------{ }------
B7 Q4 Bit
to tie to pause bit via Hal to pause EMC2
---| |--------------------------------------{ }------------
B4 Q5
Horn (glue pot is empty)
---| |--------------------------------------{ }------------
B7 |
--| |------|
Tie these Q output bits to Modbus I/O or link via Hal to Mesa I/O or a
parallel port
Q4 needs to be tied via a net command to the motion pause bit.
Dave
On 7/7/2010 3:08 AM, yann jautard wrote:
> Hi
>
> Second try to send this mail to the list...
>
> For the machine I'm building, I've to use two glue tanks.
>
> When one is empty, the second one is automatically switched on, then at
> the next end of the program, the user has to refill the empty tank
> before he can restart another cycle.
>
> Then if on the next cycle the second tank become empty, the machine
> switchs back to the first one, and so on.
>
> If for some reasons the two tanks are empty at the same time, program
> is paused and user have to refill both before it can resume the program.
>
> To manage this system, I planned to use some grafcet programming, as
> this was widely used in France during my studies, it is quite natural
> for me to use it.
>
> I know ladder is prefered by most people, but ladder is something like
> chinese for me... Specially this : /
>
> "ALL the inputs are read, ALL the logic is figured out, then ALL the
> outputs are set. This can presents a problem in certain circumstance if
> the output of one line feeds the input of another."
> http://www.linuxcnc.org/docs/html/ladder_classic_ladder.html/
>
> This is exactly a problem for me because to chose what tank to turn on
> depends on wich one was in use before the "tank_n_empty" event happens.
>
> I also see this in the doc : /
> "Sequential programs do not work alone-there is always a ladder program
> as well that controls the variables."/
> Well, I figure I can live with that.
>
> But... Sequential editor simply don't work, selecting anything other
> than "modify" frozes the whole thing. And when using "modify" you can do
> some editing, but not all can be done. Specially you can't use
> TRANSITION LINK-DOWNSIDE/UPSIDE, and I need some...
>
> I use 2.4.0pre from mozmck experimental packages. May be this is a
> issues with this particular version ? Is this fixed in next release ? Or
> do I need to switch back to an older one ?
>
> Or if you have some link that can explain me how to convert my grafcet
> program to a ladder one, that would be great.
>
> In the end, I can turn my grafcet to a physical Dlatch schema that will
> be implemented with HAL. But I suspect this is not the funny way to do...
>
> Thanks
>
> Yann
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users