t21-014-530

Upload: scribd111111

Post on 04-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 T21-014-530

    1/5

    Design of IEC 61131-3 Function Blocks using

    SysML

    Fabien Chiron! "hali# "ouiss

    Laboratoire #$Infor%ati&ue! #e Mo#'lisation et #$()ti%isation #es Syst*%es +LIM(S,

    Blaise-ascal .ni/ersity of Cler%ont-Ferran#! B 1012! 6313 4ubi*re! Francefchiron5netec-grou)7co%8khali#7kouiss5if%a7fr

    AbstractUML is almost inevitable when dealing with

    software designing and intends to be extended to cover

    many different disciplines. At the same time, control and

    automation designers integrate further object oriented

    concepts in their traditional programming behaviors in

    particular with unction !loc"s. #hereas UML was not

    adapted to model these $%& '(()( compliant items, an

    important extension called *ysML has been proposed. +his

    paper deals with evaluating the new modeling abilities ofthis language according to programmable logical controllers

    specific programming rules.

    Key Words&ontrol and Automation, *ysML, $%& '(()(),

    unction !loc"s, M-A, UML.

    I7I9:;(D.C:I(9

    4n i%)ortant issue for co%)anies hile #esigninginno/ati/e )ro#ucts an# a))lications is to ensure theca)itali1?@7

    A. Model-based engineering4#/antages brought by %o#eling techni&ues are

    noa#ays i#ely recogni1@reco%%en#s the s)litting u) of #esign %o#els into asuccession of %o#el refine%ents using latfor%In#e)en#ent Mo#els +IM, an# then a))lying #ifferent%a))ing to obtain latfor% S)ecific Mo#els +SM, at thelast ste)s of #esign7 4ccor#ing to this a))roach! integrity

    of the high le/el %o#el is %aintaine# regar#less of the)latfor% ith its s)ecific stan#ar#s! )atterns an#constraints7

    :o gi/e concrete e)ression to this )ara#ig%! the(b=ect Manage%ent Arou) +(MA, has )ut in a lot ofeffort for the s)ecification of a .nifie# Mo#elingLanguage +.ML, >@ alloing the #esign of softare

    a))lications in#e)en#ently of a s)ecific )rogra%%inglanguage7 :he final co#e i%)le%entation is %ainlyobtaine# using an .ML )rofile an# a %o#eling tool thatallos the co#e generation )rocess7

    oe/er! hereas .ML as ell-a#a)te# to softare#esign! %o#eling of real-ti%e syste%s an# ofrogra%%able Logical Controllers +LC, )rogra%s ashar# to achie/e7 Many )a)ers un#erline# these lacks an#)ro)ose# etensions to .ML! e7g7 B7 Selic in >2@! herene stereoty)es ere intro#uce# an# i#ely reuse# in%ore recent )a)ers that #eal ith ti%e-#ri/en syste%s%o#eling7 4ccor#ing to all these orks! an officialetension to the /ersion 70 of .ML has recently beenrelease# by the (MA! the Syste%s Mo#eling Language

    +SysML, >?@7

    B. Object Oriented Design

    In softare #e/elo)%ent area! the (( )rogra%%inghas un#oubte#ly been a %a=or re/olution! alloing a greatfleibility insi#e the co#e structure an# breaking thetra#itional %onolithic ay of )rogra%%ing7

    Later! the (( conce)t has been intro#uce# in Controlan# 4uto%ation )rogra%%ing by the InternationalElectro-technical Co%%ission +IEC, through one of thestan#ar# conce)t #escribe# in the IEC 61131-3s)ecification >3@! the Functional Block +FB,7 oe/er! aFB #iffers by %any as)ects fro% a class conce)t an#

    coul#n$t be re)resente# using the %o#eling tools use# forsoftare )rogra%%ing7

    4 ne stan#ar# IEC 61? >6@ is currently un#er orkan# re#efine# the FB conce)t! inclu#ing e/ent%anage%ent7 4lthough this a))roach re)resents aninteresting i%)ro/e%ent for LC )rogra%%ing! lea#ingLC solutions su))liers #i# not %ake i%)ortant efforts onthe integration of this ne a))roach! ece)t ;ockell4uto%ation an# its Function Block De/elo)%ent "it+FBD", by G7 Christensen >1?@7 For the /ast %a=ority ofcontrol engineers! orienting #e/elo)%ent ith thisstan#ar# is not rele/ant at the %o%ent7

    In this )a)er e ill focus on the IEC 61131-3 stan#ar#an# e ill sho ho the SysML etension )ro/i#esgreat )ossibilities for integrating actual LC )rogra%s#esign using .ML7

  • 8/13/2019 T21-014-530

    2/5

    II7F.9C:I(9BL(C"FE4:.;ES

    4 FB enca)sulates a knon beha/iour that ill react#e)en#ing on the in)ut #ata /alues re)resente# on the FBleft si#e7 4n o/erall re)resentation is gi/en Fig7 17

    Hhen instantiating a FB in a )rogra%! e/ery in)ut/ariable %ust be linke# to an eternal /ariable an# follos

    its e/olution! the FB oning this /ariable cannot %o#ifyits /alue +rea#-only access,7 (n the contrary! a FB oningan out)ut /ariable can rite or rea# it! hile the eecutionen/iron%ent can only rea# it7 In)ut(ut)ut /ariableinherits both features7

    Intern /ariables can be rea# or rite by the oning FBan# can usually be set )ublic or )ri/ate7 Intern beha/ior is#escribe# ith the IEC 61131-3 languages an# can reusethe one# /ariables accor#ing to the )re/ious #escribe#rules7

    III7M(DELI9AFB HI:.ML

    In LC )rogra%s! co#e consists of sections starte# an#eecute# se&uentially7 9o call ser/ices are i%)le%ente#by a FB an# intern beha/iour is acti/ate# #e)en#ing on its

    )osition in a )rogra% section7 .ML JinterfaceK stereoty)eis not rele/ant to e)ress the etern link of FB ith itsen/iron%ent7 In#ee#! a FB #oes not e)ose ser/ices to theoutsi#e but static #ata7 .ML class attributes #oes noteither fit to %o#el In)ut /ariables #ue to its s)ecific accessrights7

    If e first focus on a structural /ie! .ML 70intro#uce# the J)ortK stereoty)e in the language an# %any)a)ers #ealt ith the corres)on#ence beteen this )ortconce)t an# the FB /ariables interfaces like "7:hra%bouli#is in >@! >@ an# >10@ ith the intro#uction ofJ#ata )ortK hich are stan#ar# )orts ith attributesithout ser/ices! an# connecte# to the Jca)suleKstereoty)e intro#uce# in >2@7 :7 e/erhagen in >@! >11@!

    >1@ )ro)oses a ne ite%! the Function Block 4#a)ter+FB4,! that %ay contain at the sa%e ti%e stan#ar# )ortsan# in)utout)ut /ariables on the sa%e re)resentation7Hith this hybri# /ie! he un#erlines the lacks for theactual stan#ar# re)resentation hen trying to re)resent FBin .ML7 :he SysML etension intro#uces a ne Jflo)ortK stereoty)e offering a stan#ar# ay to e)ress #atainterfaces ith a certain si%ilarity ith FB47

    .ntil .ML 70! to e)ress the s)ecific %anage%ent ofthe tasks in a LC! it as necessary to intro#uce nestereoty)es7 For instance! .ML-4 >13@ )oints outi%)ortant re)resentation nee#s in beha/ioral constructsaccor#ing to ;eal-:i%e constraints in a LC7 .ML 70brought i%)ro/e%ents at this le/el an# SysML eten#e#

    the .ML 70 acti/ity ith flo in)uts an# out)uts a%ongactions! alloing #ee)er consi#eration hen #esigning

    #ata flos7 :he net )arts #escribe the SysML etensionsenabling a FB #escri)tion in .ML7

    I7M(DELI9AFB HI:SNSML

    A. Block Stereotype

    SysML eten#s the Class stereoty)e #efine# in the.ML 70 Co%)osite Structure Diagra% by intro#ucing ane stereoty)e calle# JBlockK7 In our contet! blocks area rele/ant %anner to re)resent sub)arts of a syste% orfunctions that belong to a )rocess! like Function Blocks inthe IEC 61131 stan#ar#7

    :o e)ress the structural relationshi)s beteen blocks!a Jblock #efinition #iagra%K +b##, is create#7 It can beuseful to #escribe generali

  • 8/13/2019 T21-014-530

    3/5

    Co%)leting the ty)e s)ecification of a flo )ort! a#irection )refi %ust be e)licitly s)ecifie# +inPoutPinout,before the flo )ort na%e7 Fig7 3 #is)lays the negra)hical notation alloe# in SysML7 Inout flo )orts are

    #is)laye# ith to arros facing aay fro% each other+Q-R,7

    He #o not e)lain ho to re)resent IEC 61? FB ithSysML in this )a)er! but a block can on a##itionalstan#ar# )orts ithin the sa%e #iagra%! offering a ay to)recise e/ent %anage%ent on the )re/ious /ie7

    Flo )orts inherits fro% .ML 70 )ort an# can be setas beha/ioral )orts or not7 In our case e choose to set the%eta-attribute $$isBeha/ioral$$ to false7 In#ee#! e try tostick to the FB structure conser/ing only one beha/iour#escri)tion in our %o#el! the one one# by the block7

    C. Program implementation

    LC )rogra% eecution )asses se&uentially throughsections containing sub)rogra%s #escribe# in one of theIEC 61131-3 stan#ar# languages7 4 FB can be use# byany of these languages but the Functional Block Diagra%+FBD, is )articularly interesting hen asse%bling %anyFBs together7 It allos a gra)hical )rogra%%ing an##e/elo)ers can connect %anually in)ut an# out)utbeteen blocks as ell as ith syste% #ata liketo)ological a##resses7

    :he SysML Internal Block Diagra% is a rele/ant ayto re)resents FBD in .ML7 :he ea%)le gi/en in Fig7 ?illustrates the internal block #iagra% for SensorCtrltask7 It #escribes ho flo )orts can be linke# to internal)arts an# to eternal #ata! it also intro#uces a ne

    stereoty)e $$Ite% Flo$$7 Hhereas a flo )ort #efines hatcan flo! an ite% flo #efines hat #oes really flo an##escribes connectors beteen flo )orts7

    7BE4I(;;E;ESE9:4:I(9

    4fter structural consi#erations! beha/ioral as)ect canalso be %anage# ith SysML in or#er to %o#el theeecution se&uences that o)erate in the LC )rogra%7:here are to %ain )oints to focus on7

    First the global #escri)tion of the #ifferent tasks an#their arrange%ent insi#e the %aster task7 In this )a)er eill not #eal ith insertion of auiliary an# fast tasks7 In a/ast %a=ority of LCs! eecution %o#e can be cyclic! the%aster task restarts hen it =ust en#s! or )erio#ic! if the%aster task en#s before the )erio#ic ti%e that has been setu)! syste% ait until ti%e has been ela)se#7

    (ther )oint is the internal beha/ior associate# to ablock stereoty)e7

    A. Actiities and Allocations

    arious ays of re)resenting beha/iour are a/ailable in.ML 70! use cases at a high le/el of #escri)tion!interactions insi#e se&uence #iagra% to e)ress ser/icean# o)eration calls beteen entities! state %achines#iagra% for the #escri)tion of #iscrete beha/iours an#transitions beteen the%! an# finally acti/ities that are afleible ay to s)ecify an# link tasks to blocks in SysML7

    4nother a#/antage of using acti/ities in SysML is the)ossibility to e)loit crosscutting constructs intro#uce# inSysML7 :he $$4llocations$$ %anage%ent in )articular)er%its to allocate a beha/ior ite% to a structural ite%7 Forthese reasons e choose the acti/ity #iagra% to #is)lay

    beha/ior #escri)tion in the net sections of this )a)er7(ne ay to #efine these links is to use the co%)art%ent

    notation in a block #efinition #iagra% or internal block#iagra% as shon in Fig7 27

    Figure 37 SysML BlockFigure ?7 SysML Internal Block Diagra% illustration

    Figure 27 4llocation Co%)art%ent notation

  • 8/13/2019 T21-014-530

    4/5

    In a si%ilar ay! it is )ossible to allocate Ite% Flosfro% (b=ect Flos in acti/ity #iagra%s! gi/ing %orecoherence to the o/erall %o#el hen #esigning beha/ioran# structure for FB in .ML7

    4cti/ities are #escribe# ith %ore #etails in acti/ity#iagra%s %ainly consisting in our case of action

    se&uences an# ob=ect no#es7

    B. Master !ask Decomposition

    Consi#ering the first #eco%)osition le/el of a )rogra%!e ai% at i#entifying %a=or sub-tasks that belong to theeecution %o#el7 (nce this ork achie/e#! i%)ortant sub-)rogra%s that ha/e been obtaine# ill be re)resente# asblocks ele%ents7 4 block ill be #escribe# ith a block#efinition #iagra%! #escribing a kin# of black bo /ieith so%e a##itional infor%ation about the intern sub-ele%ents )artici)ating in its reali

  • 8/13/2019 T21-014-530

    5/5

    %o#eling tools an# allo generation of co#e in a i#erange of )rogra%%ing language +C! Ga/a! Del)hi! 777,7

    SysML is a recent s)ecification an# its integration in%o#eling tools is not co%)lete# at the %o%ent7 4)otential co#e generator oul# offer the )ossibility tochoose the IEC 61131 language targete#7

    4 ea%)le of such a )ossible generation for a block isillustrate# Fig7 7 :he first )art #escribes the structuralite%s of the blocks like it as e)licitly #is)laye# in theblock #efinition #iagra%7 :he net )arts translate theallocate# acti/ity #e)en#ing on the selecte# LClanguage! in our case so%e Structure# :et +S:,7

    It is i%)ortant to un#erline that so%e LC su))liersalrea#y inclu#e %l re)resentation of FB /iae)orti%)ort tools! Schnei#er an# its .9I:N )latfor%for instance7 :hat %eans that ith a correct .ML )rofilefor the co#e auto%ation! it is concei/able to i%)ort FBinto LC )rogra%%ing en/iron%ent by the inter%e#iateof TML generate# files7 He currently ork on this kin#of a))roach an# e e/aluate its )ossibilities an# rele/ance

    to #e/elo) control an# auto%ation )rogra%s7

    II7C(9CL.SI(9S

    :he %ain )ur)ose of this a))roach is not to re)lace thetra#itional )rogra%%ing en/iron%ents ith a .ML toolfor )ersons that are currently #e/elo)ing LC )rogra%s7:raining of this staff category in .ML utili@ (b=ect Manage%ent Arou)! J.nifie# Mo#eling Language ersion70! Su)erstructureK! 00?7

    >3@ International Electro-technical Co%%ission! Jrogra%%ableControllers U art 3 V rogra%%ing languagesK! 137

    >?@ (b=ect Manage%ent Arou)! J(MA Syste%s Mo#eling LanguageS)ecificationK! 0067

    >2@ B7 Selic! G7;u%baugh! J.sing .ML for Co%)le ;eal-:i%eSyste%sK! (b=ec:i%e Li%ite#! 17

    >6@ International Electro-technical Co%%ission! :echnical co%%ittee62 JIn#ustrial-rocess Measure%ent an# ControlK! HorkingArou)6V Function Blocks7

    >@ :7 e/erhagen! :7 :racht! ;7 irschfel#! J4 rofile forIntegrating Function Blocks into the .nifie# Mo#elingLanguageK! S)ecification an# ali#ation of .ML Mo#els for ;eal:i%e E%be##e# Syste%s +SE;:S,! 0037

    >@ "7 :hra%bouli#is! J.sing .ML in Control an# 4uto%ationV 4Mo#el Dri/en 4))roachK! International Conference on In#ustrialinfor%atics +I9DI9,! 00?7

    >@ "7 :hra%bouli#is! A7 Doukas! 47 Frant10@ C7 :ranoris! "7 :hra%bouli#is! JIntegrating .ML an# theFunction Block conce)t for the #e/elo)%ent o# #istribute# controla))licationsK! International Conference on E%erging:echnologies an# Factory 4uto%ation +E:F4,! 0037

    >11@ :7 e/erhagen! JIntegration of languages for )rogra%%ablecontrollers into the .nifie# Mo#eling Language through FunctionBlock 4#a)tersK +in Aer%an,! hD :hesis! .ni/ersity ofDuisburg-Essen! Shaker 003 7

    >1@ :7 e/erhagen! ;7 :racht! JIntegrating .ML-;eal:i%e an# IEC

    61131-3 ith Function Block 4#a)tersK! International Sy%)osiu%on (b=ect-oriente# ;eal-ti%e Co%)uting +IS(;C,! 0017

    >13@ .7 "at1?@ D7 Ser/at et al7! $$Cli)sV e)eri%ents on %o#el-#ri/en engineeringfor )ro#uction syste%s$$! International Conference on E%erging:echnologies an# Factory 4uto%ation +E:F4,! 0027

    Figure 7 FB TML #escri)tion