api_i_c4

Upload: mihai37

Post on 03-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 API_I_C4

    1/46

    Page1

    IST / DEEC / API

    http://users.isr.ist.utl.pt/~jag/courses/api1112/api1112.html

    Slides 2010/2011 Prof. Paulo Jorge OliveiraRev. 2011/2012 Prof. JosGaspar

    GRAFCETGRAFCET((SequentialSequential FunctionFunction ChartChart))

    MEEC 2011-2012

    IndustrialIndustrial AutomationAutomation(Automa(Automao de Processos Industriais)o de Processos Industriais)

  • 7/29/2019 API_I_C4

    2/46

    Page2

    IST / DEEC / API

    Chap. 3 PLCsProgrammingLanguages[2 weeks]...

    Chap. 4 - GRAFCET (Sequential Function Chart) [1 week]TheGRAFCET norm.

    Elementsof thelanguage.ModellingtechniquesusingGRAFCET.

    ...Chap. 5 CAD/CAM and CNC Machines[1 week]

    SyllabusSyllabus::

    MEEC 2011-2012

  • 7/29/2019 API_I_C4

    3/46

    Page3

    IST / DEEC / API

    PLCsPLCs ProgrammingProgramming LanguagesLanguages(IEC 1131(IEC 1131--3)3)

    Chap. 4 - GRAFCET

    Ladder Diagram

    Instruction List

    StructuredText

    Sequential Function Chart(GRAFCET)

    LD %M12AND %I1.0ANDN %I1.1OR %M10ST %Q2.0

    If %I1.0 THEN%Q2.1 := TRUE

    ELSE%Q2.2 := FALSE

    END_IF

    1

    Right(1)

    m

    2

    3

    (2) b

    (3) p

    4

    (2) a

    Load

    Left

    IST / DEEC / ACSDC

  • 7/29/2019 API_I_C4

    4/46Page4

    IST / DEEC / API

    SomeSomepointerspointers toto GRAFCETsGRAFCETs((SFCsSFCs))

    History: http://www.lurpa.ens-cachan.fr/grafcet/groupe/gen_g7_uk/geng7.html

    Tutorial: http://asi.insa-rouen.fr/~amadisa/grafcet_homepage/tutorial/index.html

    http://www-ipst.u-strasbg.fr/pat/autom/grafce_t.htm

    Simulator: http://asi.insa-rouen.fr/~amadisa/grafcet_homepage/grafcet.htmlhttp://www.automationstudio.com(See projects)

    Bibliography: -- Petri Netsand GRAFCET: Tools for ModellingDiscreteEvent SystemsR. David, H. Alla, New York : PRENTICE HALL Editions, 1992-- Grafcet: a powerful tool for specification of logic controllers, R. David,

    IEEE Trans. on Control Systems Tech., 1995 v3n3 pp253-268[online]-- Programao de Autmatos, Mtodo GRAFCET, JosNovais,Fundao Calouste Gulbenkian-- NormeFranaiseNF C 03-190 + R1 : Diagrammefonctionnel"GRAFCET" pour la description des systmeslogiquesde commande

    Homepage: http://www.lurpa.ens-cachan.fr/grafcet/

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    5/46Page5

    IST / DEEC / API

  • 7/29/2019 API_I_C4

    6/46Page6

    IST / DEEC / API

    GRAFCETGRAFCET HistoryHistory

    1975 Decisionof theworkgroup "Logical Systems" daAFCET (Association

    FranaisedeCyberntiqueEconomiqueet Technique) on the creation of acommittee to study a standard for the representation of logical systems andautomation.

    1977 GRAFCET definition(GrapheFonctionnel de CommandeEtape-Transition).

    1979 Disseminationinschoolsandadoptedas researchareafor theimplementation

    of solutionsof automationintheindustry.

    1988 - GRAFCET becomes an international standard denominated as "SequentialFunction Chart, pela I.E.C.

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    7/46

    Page7

    IST / DEEC / API

    Steps

    1Inactive

    Active 2

    Initial 3

    Transitions

    Simple (1) R1

    Fork(parallel branch)

    (3) R3

    J oint(parallel junction)(2) R2

    J oint e fork (3) R3

    Actionscan be

    associated withSteps.

    A logical receptivity function canbe associated with eachTransition.

    GRAFCETGRAFCET Basic Elements

    Connections

    DirectedArc

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    8/46

    Page8

    IST / DEEC / API

    Oriented connections (arcs)

    In a GRAFCET:

    An Arc can connect Steps to Transitions

    An Arc can connect Transitions to Steps

    A Step can have no Transitions as inputs (source);

    A Step can have no Transitions as outputs (drain);

    The same can occur for the Transitions.

    2

    1

    3

    (1) R1

    (2) R2

    4

    (3) R3

    Action A. .

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    Basic Elements

  • 7/29/2019 API_I_C4

    9/46

    Page9

    IST / DEEC / API

    Definition of State:

    The set of markings of aGRAFCET constitutes its state.

    Question:

    How does the stateof a GRAFCET evolve?

    2

    1

    3

    (1) R1

    (2) R2

    4

    (3) R3

    Action A.

    .

    GRAFCETGRAFCET Stateof a GRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    10/46

    Page10

    IST / DEEC / API

    State Evolution:

    Rule 5: Simultaneous activation and deactivation of a Step

    In this case the activation has priority.

    Rule 1: Initial State

    It is characterized by the active Steps at the beginning of operation (at least one).Rule 2: Transposition of a Transition

    A Transition is active or enabledonly if all the Steps at its input are active (if not it is inactive).

    A Transition can only be transposed if it is active and is truethe associated condition (receptivity

    function).Rule 3: Evolution of active Steps

    The transposition of a Transition leads to the deactivationof all the Steps on its inputs and

    the activationof all Steps on its outputs.

    Rule 4: Simultaneous transposition of TransitionsAll active Transitions are transposed simultaneously.

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    11/46

    Page11

    IST / DEEC / API

    Rule 2a:

    All active Transitions are transposed immediately.

    Rule 4:

    Simultaneous active Transitions are transposed simultaneously.

    1 2

    (1) a

    3

    (2) a

    4

    5

    (3) b

    6 7

    (4) b

    8

    9 10

    (5) c

    Example 1 Example 2 Example 3

    . .. .

    . .

    ..

    . .

    ..

    . .

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    State Evolution:

  • 7/29/2019 API_I_C4

    12/46

    Page12

    IST / DEEC / API

    AND Divergences:

    If Step1 isactive andifa is TRUE thenStep1 isdeactivatedandSteps2 and3 are activated.

    AND Convergences:

    If Steps1 and2 are active andifa isTRUE thenSteps

    1 and2 are deactivatedandStep3 isactivated(ifonly one of the input steps is active, the state remains).

    Chap. 4 - GRAFCET

    OR Divergences:

    If Step 1 is active and ifa is TRUE then Step 1 isdeactivated and Step 2 is activated (state of Step 3 ismaintained).

    Ifa andb are TRUE andStep1 isactive thenStep1 is

    deactivatedandSteps2 and3 are activated(for any previousstateof Steps2 and3).

    OR Convergences:

    If Step 1 is active and ifa is TRUE then Step 1 is deactivateand Step 3 is activated (state of Step 2 remains unchanged).

    The same happens for Step 2 andb.

    If both Steps 1 and 2 are active andaandb are TRUEthen Steps 1 and 2 are deactivated and Step 3 is activated.

  • 7/29/2019 API_I_C4

    13/46

    Page13

    IST / DEEC / API

    Example:

    GRAFCET stateevolution

    Level activated Action. Actions can also beactivated during transitions - see next.

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    2

    1

    3

    (1) R1

    (2) R2

    4

    (3) R3

    Action A

  • 7/29/2019 API_I_C4

    14/46

    Page14

    IST / DEEC / API

    Given4 Steps(1 to 4) and2 Transitions(t1 andt2) writea segmentof

    GRAFCET to solve thefollowingproblem:

    Inthe case that theSteps1 and2 are active:

    if t1 isTRUE, activateStep3 (anddeactivateSteps1 and2);

    if t2 isTRUE, activateStep4 (anddeactivateSteps1 and2);

    otherwise, thestateismaintained.

    Modellingproblem:

    1

    .

    3 4

    t2t1

    2

    .GRAFCETGRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    15/46

    Page15

    IST / DEEC / API

    Given4 Steps(1 to 4) and2 Transitions(t1 andt2) writea segmentofGRAFCET to solve thefollowingproblem:

    If Step1 isactive andt1 isTRUE

    OR

    If Step2 isactive andt2 isTRUE

    THEN

    ActivateSteps3 and4.

    1

    .

    3 4

    t2t1

    2

    .GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    Other modellingproblem:

  • 7/29/2019 API_I_C4

    16/46

    Page16

    IST / DEEC / API

    GRAFCET state evolution, Conflicts:

    There existConflictswhen the validation of a Transition depends on the same Step or whenmore than one receptivity functions can become truesimultaneously.

    Solutions:

    1

    (1) a

    2 3

    (2) b

    1

    (1) a

    2 3

    (2) ba

    1

    (1) a b

    2 3

    (2) a ba b(3)

    Transiction 1prioritary

    Three mutualy

    exclusivehypotheses

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    17/46

    Page17

    IST / DEEC / API

    Example 1: modeling a control/automation system

    1

    Right

    (1) m

    2

    3

    (2) b

    (3) p

    4

    (4) a

    Load

    Left

    a b

    left right

    p

    m load

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    18/46

    Page18

    IST / DEEC / API

    Example 2: modeling a automated transport workcell

    GRAFCETGRAFCET

    * Conveyor A brings parts (sensor adetects part ready to lift)

    * Conveyor B brings parts (sensor b detects part ready to lift)

    Hanging crane, commanded withD (droit)eG (gauche),uses sensorsx, yez to detect crane over the base,over A, or over B, respectively.

    Clamp of the crane grabs and releases parts with commandsPPandDP. Limit switches fppand fdp indicate grabbed andreleased part. A holding platform has two extreme positions, topand bottom, detected by switches fv+and fv-. Part release canonly be done having the holding platform up.

    * Effectorpushes parts with commandsP+eP-. Limit switchesfp+and fp- indicate max and min pushing positions.

    * The output conveyor is always ON.

    * Conveyors A eB are commanded by other automata,independent of this workcell.

    fp- fp+

    fv+

    fv-

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    19/46

    Page19

    IST / DEEC / API

    To guarantee alternating A and B, modify the program, adding thefollowing GRAFCET:

    and changing the receptivity function * to:

    Explanation: grab part iny, if there exists part inaand ifbhas not

    the priority; ifb is true and has priority, then grab part in z.

    Solution

    GRAFCETGRAFCET

    fp- fp+

    fv+

    fv-

    Chap. 4 - GRAFCET

    Example 2 (cont)

    Note: terminology X10 of PL7 changes to S_1_10in Unity Pro

  • 7/29/2019 API_I_C4

    20/46

    Page20

    IST / DEEC / API

    Improvedsolution:GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    Example 2 (cont)

    a) After processing one part (P+) prepare

    immediately to receive the next one: fv+.

    b) Move crane (D) to an optimal waiting location(i.e. location that reduces delays): y.

  • 7/29/2019 API_I_C4

    21/46

    Page21

    IST / DEEC / API

    Example 3: modeling and automation of a distribution system

    Objective:fill 1&2, empty 1&2refill only after both empty

    Sensors:m = ON/OFFb1, h1, b2 h2 = level

    Actuators:V1, V2, W1 W2 = admit/exhaust

    mreservoir

    b1

    h1

    b2

    h2

    V1 V2

    W1 W2

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    22/46

    Page22

    IST / DEEC / API

    Example 3: modeling and automation of a distribution system

    1

    (4) h2

    (6) =1

    5 V22 V1

    (2) h1

    3 W16 W2

    (1) m

    (5) b'2(3) b'1

    4 7

    (4) h2

    5 V22 V1

    (2) h1

    3 W1 6 W2

    (1) m

    (5) b'2(3) b'1

    4 7

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    23/46

    Page23

    IST / DEEC / API

    Example 3: modeling and automation of a distribution system

    4 7

    (1') m.X7 (1'') m.X4

    5 V22 V1

    (2) h1

    3 W16 W2

    (5) b'2(3) b'1

    (4) h2

    1

    (4) h2

    (6) b'1 . b'2

    5 V22 V1

    (2) h1

    34 W1 se b167

    (1) m

    W2 se b2

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    ifif

    Ch 4 GRAFCET

  • 7/29/2019 API_I_C4

    24/46

    Page24

    IST / DEEC / API

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    Transitions can be conditions, events andconditions mixed with events

    Grafcet: a powerful tool for specification of logic controllers, R. David, IEEE Trans. onControl Systems Tech., 1995 v3n3 pp253-268

    (a) Eventsf andf obtained from a condition f (b) Eventa.bobtained from eventa and condition b

    (c) Eventa. b obtained from eventsa and b (d) Eventa + b obtained from eventsa and b

    IST / DEEC / API Ch 4 GRAFCET

  • 7/29/2019 API_I_C4

    25/46

    Page25

    IST / DEEC / API

    Properties of events (edge triggers) mixed with conditions (Boolean variables):

    a =a

    a . a =a, a . a = 0, a . a =a, a . a = 0

    a .a =a, a .a = 0

    (a . b) =a . b +b . a, (a + b) =a . b +b . a

    (a . b) . (a . c) = (a . b . c)

    In general, if events a and b are independent

    a .b = 0

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    Transitions can be conditions, events andconditions mixed with events

    IST / DEEC / API Chap 4 GRAFCET

  • 7/29/2019 API_I_C4

    26/46

    Page26

    IST / DEEC / API

    Macro-steps

    Other auxiliary mechanisms

    E10

    h2

    =1

    5 V22 V1

    h1

    3 W16 W2

    (1) m

    b'2b'1

    4 7

    S8

    15 V2

    h2

    16M10

    17 V1

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    IST / DEEC / API Chap 4 GRAFCET

  • 7/29/2019 API_I_C4

    27/46

    Page27

    IST / DEEC / API

    Pseudo Macro-steps

    Macro Actions

    Force actions

    Enable actions

    Mask actions

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    Other auxiliary mechanisms

    IST / DEEC / API Chap 4 GRAFCET

  • 7/29/2019 API_I_C4

    28/46

    Page28

    IST / DEEC / API

    Implementation in DOLOG80

    The activity of each Step is stored in an auxiliary memory.

    AM3AM4RLM1AM3

    AM4RLM2

    Store Rk evaluation in M100

    AM1

    AM2AM100SLM3AM1

    AM2AM100SLM4

    At startup do:AM128SLMx

    ...AM128SLMy(initial steps)

    RLM128 43

    21

    (k) Rk

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    IST / DEEC / API Chap 4- GRAFCET

  • 7/29/2019 API_I_C4

    29/46

    Page29

    IST / DEEC / API

    Implementation in the TSX3722/TSX57

    Steps

    GRAFCETGRAFCET

    Chap. 4 - GRAFCET

    IST / DEEC / API Chap 4- GRAFCET

  • 7/29/2019 API_I_C4

    30/46

    Page30

    IST / DEEC / API

    Macro-steps

    GRAFCETGRAFCET

    Chap. 4 GRAFCET

    Implementation in the TSX3722/TSX57

    IST / DEEC / API Chap 4- GRAFCET

  • 7/29/2019 API_I_C4

    31/46

    Page31

    IST / DEEC / API

    GRAFCETGRAFCET

    Chap. 4 GRAFCET

    Implementation in the TSX3722/TSX57

    IST / DEEC / API Chap. 4- GRAFCET

  • 7/29/2019 API_I_C4

    32/46

    Page32

    IST / DEEC / API

    Arcs/Connectors

    GRAFCETGRAFCET

    Chap. 4 GRAFCET

    Implementation in the TSX3722/TSX57

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    33/46

    Page33

    IST / DEEC / API

    InformationassociatedwithStepsintheGRAFCET:

    C ap G C

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    34/46

    Page34

    S / C /

    Andwhereto findinformationrelatedwithTransitions?

    Does notmakesensestateoractivitynor timmings(onlynumber of occurences).

    p

    InformationassociatedwithStepsintheGRAFCET (bis):

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    35/46

    Page35

    / /

    GRAFCETGRAFCETGeneral structure:

    Characteristics:

    p

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    36/46

    Page36

    GRAFCETGRAFCETEditor: 8 pages

    Pages0 to 7

    154 cells(14*11)

    Characteristics:

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    37/46

    Page37

    GRAFCETGRAFCETOR divergences

    (OR convergences)

    Characteristics:

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    38/46

    Page38

    GRAFCETGRAFCETAND divergences

    (AND Convergences)

    Characteristics:

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    39/46

    Page39

    GRAFCETGRAFCETArcs/Connectors

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    40/46

    Page40

    ANDOR

    Rulesfor divergencesand convergences:

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    41/46

    Page41

    GRAFCETGRAFCETProgrammingActions

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    42/46

    Page42

    GRAFCETGRAFCET

    Exampleof executionof Actions

    Exampleof Activation/deactivation Exampleof continuousAction

    ProgrammingActions

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    43/46

    Page43

    GRAFCETGRAFCETGRAFCET Section Sctructure

    LD, IL, ST

    LD, IL, ST

    GRAFCET

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    44/46

    Page44

    GRAFCETGRAFCETGRAFCET Section Initialization

    IST / DEEC / API Chap. 4 - GRAFCET

  • 7/29/2019 API_I_C4

    45/46

    Page45

    GRAFCETGRAFCETGRAFCET Section Reset

    IST / DEEC / API

  • 7/29/2019 API_I_C4

    46/46

    Page46

    Transition sections have the following properties:Transition sections only have one single output (transition variable), whose data type is

    BOOL. The name of these variables are identical to the names of the transition sections.

    The transition variable can only be used once in written form.The transition variable can be read in any position within the project.Only functions can be used, function blocks or procedures cannot.Only one coil may be used in LD.

    There is only one network, i.e. all functions used are linked with each other either directlyor indirectly.

    Transition sections can only be used once.Transition sections belong to the SFC section in which they weredefined. If the respective

    SFC section is deleted then all transition sections of this SFC section are also deletedautomatically.

    Transition sections can be called exclusively from transitions.

    Properties of Transition Sections (Unity Pro)