The Moby/plc Tutorial - CiteSeerX

13 downloads 0 Views 411KB Size Report
Feb 16, 2001 - Now re ne the system control light by the automaton that is given in Fig. 7. .... object, click lowest icon on the left; (v) SHIFT with double click.
The Moby/plc Tutorial Henning Dierks, Hans Fleischhack, Josef Tapken CvO-Universit at Oldenburg 16th February 2001

Contents

1 Introduction

1

2 Examples

2

1.1 PLC-Automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Moby/plc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 2.2 2.3 2.4

Simple PLC-Automata . . . Delays . . . . . . . . . . . . Connecting PLC-Automata Working with Hierarchy . .

. . . .

. . . .

A Reference Card

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

1 2

. 3 . 8 . 10 . 13

17

A.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 A.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 A.3 Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

1 Introduction This paper introduces the language of PLC-Automata and the tool Moby/plc, a CASE-tool for PLC-Automata. The properties of the language are explained step by step using examples within Moby/plc. After reading this text the reader should be able to construct systems of PLC-Automata on her/his own. It is assumed that the reader is familiar with the behaviour of PLCs.

1.1 PLC-Automata

Programmable Logic Controllers (PLCs) are often used in industrial practice to control real-time systems. The main reason is that the cyclic behaviour is suitable to handle real-time requirements. Moreover, they are cheap. 1

There are several programming languages for PLCs that provide constructs to ease the design of real-time programs. However, most of these languages are close to an assembler level. In order to construct PLC programs on a more abstract level the pascal-like language \ST" (structured text) has been proposed in the standard IEC 1131. Compilers are used to produce executable source code from ST. However, the debugging of real-time programs is still complicated and not supported by CASE-tools for those languages. In the UniForM project [KBPO+96] the language of PLC-Automata [Die97, DT98] has been proposed to provide an abstract representation of PLC programs and to simplify debugging. A PLC-Automaton is an abstracted program for PLCs. Hence, the interface of such an automaton consists of inputs, locals, and outputs as usual for PLC programs. The automaton has states and transitions. Depending on the inputs the automaton may execute a legal transition which determines the successor state and may manipulate locals and outputs. It is reasonable to represent automata by graphs instead of a textual representation. Therefore, PLC-Automata are always given as graphs in this tutorial. States are given as rounded boxes while transitions are drawn as arrows. Both guards and assignments for transitions are given by annotations to the arrows. The syntax of those correspond to the syntax of ST. Besides the graphical representation further advantages of PLC-Automata are: 1. PLC-Automata are executable, i.e. the behaviour of the system can be visualised in the graphical representation directly. 2. PLC-Automata are equipped with formal semantics in real-time formalisms which allow for automatic veri cation of real-time properties. 3. PLC-Automata can be compiled into ST.

1.2

Moby/plc

Figure 1 provides an overview over the components of Moby/plc. The central component is a graphical interactive editor for PLC-Automata from which all other components of the system can be controlled. These components are a simulator for networks of PLC-Automata, components to verify properties of such systems, an interface to the commercial test system \RT-Tester", and a compiler into ST.

2 Examples In this section we present some examples of PLC-Automata to explain the usage of Moby/plc. To this end we introduce all properties of the language step 2

verification methods

graphical editor

compiler

simulation

RT-Tester

ST code PLC code

Figure 1: components of Moby/plc by step. We explain how to use the pull-down menus and buttons. Alternatives like pop-up menus and hot-keys are often o ered by the system,too. Those alternatives and the complete syntax of annotations are explained in Section A.

2.1 Simple PLC-Automata

2.1.1 Designing a radiator control Example 1 The temperature of a given room should range between 18o and 22o .

Two sensors deliver Boolean information whether the temperature is below 18o and above 22o respectively. A radiator is given which can be switched o and on by sending a corresponding signal of type fon,o g. The radiator should be switched o if the temperature has reached 22o which is indicated by the corresponding sensor. Analogously, the radiator should be switched on when the temperature falls down to 18o . Initially, the radiator should be switched o .

The following ST program would implement such a controller: FUNCTION BLOCK radiator VAR above 22 : BOOL := FALSE; below 18 : BOOL := FALSE; status : on,o := o ; state : INT := 2; END VAR above 22 := %IX0.0; below 18 := %IX1.0; CASE state OF

3

1 : (* state = radiator on *) IF above 22 = TRUE THEN state := 2; status:=o ; END IF; 2 : (* state = radiator o *) IF below 18 = TRUE THEN state := 1; status:=on; END IF; END CASE; %QX2.0 := status; END FUNCTION BLOCK

2.1.2 Constructing the radiator control in Moby/plc

First, we have to start Moby/plc. If you have installed it according to the installation instructions, then you can start it within a shell with the command PATH/bin/mobyPLC &

where PATH stands for the path of the home-directory of your Moby/plc installation. A so-called project manager appears on your screen. We want to build a new project and therefore we select menu File and choose in menu New Project the item PLC-Project.1 A request for the name of the new project appears and we enter radiator. The request disappears after hitting return or pressing the accept-Button. Two new windows are opened automatically. The rst one with title MIXDesGraph: radiator.MIX is useful to manage complex systems since it represents the hierarchical structure of the whole project. At the moment this is not really necessary, because we will only design a small toy example. The second window carries the title PLCSysGraph: radiator.MIX. and allows us to construct the system itself. On the left hand side of this window you can nd a column of icons. Select the blue box and click somewhere on the white construction area on the right. A blue box with the default annotation sys 1 1 appears at the position where you have clicked.2 Select Edit > Edit Name and replace the default name by radiator in the Name- eld. Hit OK afterwards. Then select Hierarchy > Re ne by > PLCAutomaton. A window entitled with PLCAutGraph: radiator.MIX.radiator for the rest of the tutorial we describe this as File > New Project > PLC-Project. If something is not readable or colors mentioned in this tutorial di er from what you see on the screen, then be advised that Moby/plc has to compete with other applications on your terminal to get a number of colors. Moby/plc will loose this competition when you have started programs like web-browser beforehand. 1 2

4

appears.3 First let us de ne inputs and outputs. To this end we select on the left the icon with a yellow paper and click afterwards on the construction area. A default de nition of a variable occurs. To edit this de nition we choose Edit > Edit Properties and enter the name below 18, click on the Input button and on OK to nish our editing. Now the text of the variable de nition may not t into the yellow box. To change this you might drag the little black boxes at the border of the yellow box. You can also change the position of the text within the yellow box by dragging. Analogously, construct now the input variable above 22 and the output variable status. In case of status overwrite the type by the enumeration f on,off g and the initial value by off. Each PLC-Automaton has an upper bound for the cycle time called epsilon. You can manipulate this integer value (default is 10) by Edit > Edit epsilon. Now construct the states of the automaton. Click on the green rounded box on the left and then on the construction area where you want to place the rst state. A default de nition of the state will appear. To change this de nition select Edit > Edit Properties, overwrite the default name by radiator off and hit OK. Again, you can manipulate the extends of the state by dragging the little black boxes around the state. To make this state the initial state press the mid key of your mouse and select Status > Start in the appearing pop-up menu. Construct the second state radiator on analogously. Note, that this state is not the initial state. Next we add transitions to the automaton. Hit the arrow symbol of the icon column on the left. Then click rst on the state radiator o and then on the state radiator on. An arrow from the rst to the second state occurs. To add annotations to this arrow we select Edit > Edit Properties. Add the condition below 18 = true and the action status := on and hit OK. The execution of this transition is only possible if the temperature is below 18o and the execution will set the variable status to on. Construct analogously a transition from the second back to the rst state with the condition above 22 and action status := off. If you are not satis ed by the position of an arrow or its annotations you can change this by dragging the little black boxes if the transition is selected. You have nished your rst PLC-Automaton and the picture should look similar to Fig. 2.

2.1.3 Simulation

To check whether the radiator control meets our expectations we can simulate the system. Choose Simulate > Simulation. A warning appears that the initialisation of the simulator may take some time. Hit OK and the warning will disappear. If the selection is disabled then you have probably deselected the blue box by clicking on the white construction area. In this case click on the blue box. Another reason might be that you have already done this step. 3

5

Figure 2: The PLC-Automaton for the radiator control After some seconds a simulation window should pop up.4 Drag it into a position such that you can observe both the simulation window and the automaton. In the latter the initial state should have changed its color to red. This symbolises that the PLC-Automaton is currently in this state. First we reduce the speed to \4" by dragging the slider to the left accordingly. Hit the Run button and the simulation will start. By clicking the radio buttons of the input variables in the upper part of the simulation window you can manipulate the values of the inputs. First set the value of above 22 to true. As expected, the system does not react to this. Hence, we reset the value to False. Now set below 18 to True. According to our expectations the system changes its state and sets the value of status to on. Now set the value of above 22 to True again and observe the reactions of the system for a while. It does not stop switching its state. The reason is that we have not considered the possibility that the sensors signal contradictory values. To end the simulation hit Quit. Before quitting the work on the whole project we rst save our design. To this end choose in the window MIXDesGraph: radiator.MIX the action File > Save. Afterwards select File > Quit to quit the project.

2.1.4 Another Example Example 2 We want to design a system that has two Boolean inputs I1,I2 and its Boolean output Out should contain the conjunction of the current input values. We want to have two states named is true and is false which also represent the

If this is not the case is it likely that you have mistyped something in the system. Check all items of the automaton. 4

6

current result of the computation.

An automaton that implements the given speci cation is shown in Fig. 3

Figure 3: A PLC-Automaton for conjunction Note that in Fig. 3 we set is true to the initial state. This makes a di erence only for the rst cycle of the system because afterwards the output is determined by the input values. However, the output value during the rst cycle may contradict a given speci cation. Since we have not speci ed the initial value of Out in Example 2, we could choose the initial value arbitrarily.

2.1.5 Variables

Example 2 shows that the current value of an output of a PLC-Automaton depends on the assignments that have been executed. It is legal to change more than one variable by a transition. We distinguish locals and outputs. Locals are intended for internal use only and are not visible for the environment. We can add to Example 2 a local variable counter of type f0..20g with initial value 0. This counter should count the number of state changes of the system. To this end add the counter to your system and add to the actions of both transitions the assignment counter := counter +1. Make sure that the assignments are separated by a semicolon. This editing can be done by selecting a transition and Edit > Edit Properties. Note that we added also the conjunct counter Edit Graph and a window will appear. There we click on the blue box representing a system and afterwards somewhere in the contruction area on the right. We can change the default name to control light by selecting Edit > Edit Name. Maybe the blue system box has to be resized. Now, add an arrow from radiator to control light in the same way as transitions. This arrow indicates that an output of radiator is connected to an input of control light. Hence, Moby/plc asks which output of the radiator should be connected to an input of control light. In this case the possible choices are status or a new output. Select status. Now re ne the system control light by the automaton that is given in Fig. 7. To do this, proceed as before. Now, the hierarchy graph of the whole control system should have a structure as given in Fig. 8 on the left hand side. On the right hand side the topmost view 10

Figure 7: The PLC-Automaton for the control light on the whole system is shown. We can simulate both automata simultaneously by selecting Simulation > Simulate in the system view (make sure that eithor no blue box is selected or both boxes are selected). To observe the reactions of the system working in parallel have both automata windows on the screen.

11

Figure 8: hierarchy graph and system view of the raditation control

12

2.4 Working with Hierarchy

To structure a design it is useful to exploit the hierarchy concept of Moby/plc. Especially in cases where di erent modes of functionality are given. Then one should gather together states belonging to the same mode in a so-called superstate. On the higher level of superstates one would de ne the transitions for a mode change and on the lower levels one would de ne the functionality.

2.4.1 Radiation Control Revisited

In the radiation control we can identify modes, eg. the sensors are working correctly or not. Hence, we select both states representing the mode that the sensors are working: radiator on and radiator o . To select both click on the states while the SHIFT-key being pressed.

Figure 9: The radiation control after the folding Then we select Hierarchy > Fold to fold both states into a new superstate. A window appears in which we can assign the name sensors ok to the new superstate. After clicking on the OK-button both selected states will be replaced by a new state with the name given by us. Note that the new superstate is drawn with an additional line around the state. This symbolises that this state is re ned by socalled substates. Make the superstate the initial state (the procedure is explained in Sect. 2.1.2). The window should now look similar to the one in Fig. 9. Then we select the superstate and choose Edit > Edit Re nement. A window for editing an automaton appears containing the so-called subautomaton sensors ok. It consists of the selected states and a so-called outport. Make the state 13

Figure 10: The subautomaton sensors ok radiator o the start state. The result should look like the system in Fig. 10. The resulting hierarchy graph is shown in Fig. 11.

Figure 11: Hierarchiegraph zur Heizungssteuerung

2.4.2 Disco Light Controller Example 4 We want to design a PLC-Automaton that has two modes. One

mode \green" should switch a green light on and o in an interval of 20 seconds. In the second mode \red" it should do the same with a red light. Switching between modes should be triggered by an input of type fgreen,redg.

14

We start to design the system by two states which represent the modes: green blinking and red blinking. We re ne these states by a subautomaton in which we de ne the behaviour that is expected in the current mode. In mode green blinking we switch between two states green on and green o with a minimal delay of 20 time units. Analogously, construct the subautomaton for red blinking. The whole system should look similar to Fig. 12. Make sure that you create the transitions between the superstates last. During creation of these transitions you will be asked by the system whether you want a \stubbed edge" or a \new port". Choose \stubbed edge".

Figure 12: Hierarchical solution of the disco light controller In the upper automaton of Fig. 12 both superstates representing the modes of the system are shown. The additional frame around the states symbolises that these states are re ned by subautomata. Both subautomata are shown below. Note that all levels of the automaton are equipped with a start state. This is important to determine the destination of the transitions in the upper automaton. The destination of a transition to a superstate is the start state of the corresponding subautomaton. For example, the destination of the transition to green blinking is the state green on. However, sometimes it is necessary to jump to a state that is not the start state of a subautomaton. In these case the user has to work with so-called \connectors". The usage of these connectors is displayed in Fig. 13. There we use the connectors (\outports" displayed as circled minus, \inports" as circled plus) to make a transition from red on to green on and from red o to green o . Note that in this case the transitions are divided into three parts. The rst part goes from the state to an outport, the second from the superstate into the other superstate, and nally from the inport to the destination state. Note that these 15

kind of transitions from substates or into substates are connected to the inner frame of the superstate. The previous transitions are connected to the outer frame. In cases where transitions are split in several parts as above, only the rst part can carry the condition and action of the transition.

Figure 13: The usage of connectors The semantics of transitions from a superstate that is connected to the outer frame is the following: the transition is connected to all states of the subautomaton and has a higher priority than the ordinary transitions.

References [DT98]

H. Dierks and J. Tapken. Tool-Supported Hierarchical Design of Distributed Real-Time Systems. In Euromicro Workshop on Real Time Systems, pages 222{229. IEEE, 1998. [Die97] H. Dierks. PLC-Automata: A New Class of Implementable RealTime Automata. In M. Bertran and T. Rus, editors, ARTS'97, volume 1231 of Lecture Notes in Computer Science, pages 111{125, Mallorca, Spain, May 1997. Springer-Verlag. [KBPO+96] B. Krieg-Bruckner, J. Peleska, E.-R. Olderog, D. Balzer, and A. Baer. UniForM | Universal Formal Methods Workbench. In U. Grote and G. Wolf, editors, Statusseminar des BMBF Softwaretechnologie, pages 357{378. BMBF, Berlin, March 1996. 16

A Reference Card A.1 Commands

During the work with Moby/plc all three keys of the mouse have a meaning.5 In each window you will get a menu that is related to the window if you press the right key. For example, here you can nd operations to close the window. Pressing the mid key let a menu (\context menu") appear that is related to the currently selected object of the window. This menu depends on the type of the corresponding object. The left key is used for selecting, deselecting, moving, resizing etc. of objects.

A.1.1 Basic Operations of Graph Editors

Most of the commands are o ered in several ways to the user. Usually the user can issue a command by a pull-down menu, by a context menu, and by a hotkey. creating a (i) pull-down menu Edit > Create, repeats creation until Edit vertex > Create > Stop creation; (ii) if no object is selected, in the context menu Create; (iii) hotkey c creates the same object as the last created one; (iv) Click a corresponding symbol in the icon column on the left. creating an (i) pull-down menu Edit > Create > Edge, then clicking on the edge source and on the destination afterwards; (ii) select the source, choose in the context menu Create edge, then select the destination; (iii) select the source, hotkey g, then select the destination; (iv) select the source, click the arrow symbol on the left, then select the destination; changing (i) select the edge, choose change source resp. change destination source and in the context menu, then click on the new source resp. destinadestination tion. open an (i) select the object, pull-down menu Edit > Edit Name or Edit > object Edit Properties; (ii) select the object, choose Edit Properties from editor the context menu; (iii) select the object, hotkey E; (iv) select the object, click lowest icon on the left; (v) SHIFT with double click on the object

If your mouse has only two keys, then the middle key is usually emulated by pressing both keys simultaneously. 5

17

selecting an object

Vertices and edges may be selected by clicking directly on the object using the left key of the mouse. Selected objects are symbolises by small black boxes around the object. To add objects to the set of selected objects click on the object while pressing SHIFT. To select objects in an area span the region with the left mouse key being pressed. removing (i) Select the object, then Edit > Remove; (ii) select the object, an object then Remove in the context menu; (iii) select the object, hotkey BackSpace. duplicating (i) Select the object, then Edit > Duplicate; (ii) select the object, an object then Duplicate in the context menu; (iii) select the object, hotkey D. copying (i) Select object(s), then choose pull-down menu Edit > Copy; into the (ii) Select object(s), then choose Copy in the context menu; (iii) clipboard select object(s), then hotkey C. inserting (i) Select object(s), then choose pull-down menu Edit > Insert; from the (ii) Select object(s), then choose Insert in the context menu; (iii) clipboard select object(s), then hotkey I.

A.1.2 Editing and Browsing through the hierarchy

Navigating Each vertex of the design graph represents a window and each window belongs to a vertex of the design graph. To open a window (i) select the corresponding vertex and choose Edit > Edit Graph, (ii) select the corresponding vertex and use the hotkey e, (iii) doubleclick the corresponding vertex. Closing a Each window can be closed by (i) File > Close or (ii) Close in window the window-menu (press the right button of the mouse). Closing the design graph closes the whole project. Saving a part of the system includes saving the whole project. Getting From a window one gets one level up by choosing Hierarchy > Edit a hierar- Supergraph. Stepping one level down is possible by (i) Hierarchy chy level > Edit Re nement whereas the vertex which is re ned can be higher or selected in advance or after the choice. (ii) Doubleclicking the lower re ned vertex. (iii) Select the re ned vertex, hit hotkey e. (iv) Select the re ned vertex, choose Edit Re nement in the context menu. Moreover one can get the window of the design graph on top of the screen by selecting Hierarchy > Edit Design.

18

Making a In a system graph the user can assign a re nement to a vertex re nement by (i) Hierarchy > Re ne by whereas the vertex can be selected in advance or afterwards. The user can make two kinds of re nements. Either a re nement by another system graph or by a PLC-Automaton. (ii) By selecting the vertex to be re ned and choosing Re ne By from the context menu. In an automaton window the user can re ne a state by a subautomaton. This can be done by (i) Hierarchy > Add Re nement whereas the vertex can be selected in advance or afterwards. (ii) By selecting the vertex to be re ned and choosing Add Re nement from the context menu. Removing The re nement relation between a vertex and a graph can be a re ne- deleted by (i) choosing in the window of the vertex Hierarchy > ment Cut Re nement whereas the vertex can be selected in advance or afterwards. (ii) By selecting the vertex and choosing Cut Re nement from the context menu. Note that after this operation the re nement graph still exists in the design graph. The graph can be removed by selecting the corresponding vertex in the design graph and choose Remove from the context menu. It is also possible to reuse this graph as a re nement. To this end one has to add a re nement for a vertex that carries the same name. Ports Connections between neighbouring hierarchy levels are established by so-called ports. They symbolise the entrances and exits of a graph that is a re nement of a vertex. If an edge from or to this vertex is created the user has to select a port that is connected to the edge. This relation between an edge from/to the re ned vertex and a port on the level of the re nement can be edited by the submenu Ports of the context-menu for the edge. In case of PLC-Automata it is possible that edges from/to re ned vertices are not related to a port. We call those edges \stubbed edges". Stubbed edges from a re ned state are implicitly connected with all states of the re nement and this transitions has a higher priority than the transitions in the re nement. Stubbed edges to a re ned state are connected with the start state of the re nement. The graphical representation displays stubbed edges to be connected with the outer frame whereas edges that are connected to ports are drawn to the inner frame of the vertex.

19

transparent Re ned vertices can be displayed transparently. In this case the display graphical representation of a vertex contains the display of its re nement graph. This can be selected by Display transparent in the context menu of the vertex. To switch o this option repeat this choice. To change the transparent display of the re nement graph select Attach to navigator in the context menu of the re ned vertex. A separate window appears in which a slider can be used to de ne the scaling. The position can also be manipulated by scrolling.

A.1.3 Speci c Operations for PLC-Automata

Simulation The simulation of one PLC-Automaton can be started by Simof one ulation > Simulate in the window of the automaton. Note that automaton it is note possible to start the simulation on a subautomaton. Starting the simulation is preceded by a syntactic analysis. If this analysis fails, a window with error messages will appear. To start the syntax analysis only, select Simulation > Parse. Simulation A simulation can be started in window of a system graph by of a system Simulation > Simulate. Then a simulation of all selected vertices will be started. If no vertex is selected, all vertices will be taken into account for the simulation. During the simulation clicking on re ned vertices will open a window for the re nement. Clicking a variable will open a window that display the current value of that variable. Clicking a channel in a system graph will open a similar window.

20

Controlling The control window of the simulator o ers several buttons to the sim- manipulate directly the behaviour of the simulation. Run starts ulation a simulation or resumes it. Stop freezes the simulation. With Time the simulator can be started for a duration that can be chosen by the user. With Step the simulation is executed for one time unit whereas Next executes the simulation until the next action. An action is either polling of an input or a reaction of the automaton (which may cause a transition). In the upper part of the control window the user can manipulate the drivers for all input variables of the current system under simulation except for those inputs which are driven by another output of an automaton that is also under simulation. Values of outputs can be observed. Both the input variables and output variables are categorised. The category that is displayed by the simulation control can be changed with the help of the Categorymenu. In cases where more items belong to the category that can be displayed it is possible to ip through several pages by the \>" and \ Export > ST-Code. A window appears that code allows for changing the lename of the compiled code and editing the relation of inputs and outputs to the input and output addresses of the PLC. 22

A.2 Syntax

A.2.1 Type Declarations

Moby/plc allows three kinds of types:

 Boolean variables can be declared by the keyword bool  Enumerations are de ned by enumerating the elements within curly brackets. For example, flight on,light o g. It is allowed to use '.' once per identi er. Hence, the type f a.b, c.d g is legal.  Subranges of nonnegative integers are de ned by giving the minimum and maximum separated by .. within curly brackets. For example, f3..6g con-

tains 3,4,5, and 6. A particular variables is called states. If the user declares this variable, the type of it will generated automatically as the enumeration of the full names of all states in the automaton. Note that states cannot be de ned as input.

A.2.2 Conditions

Conditions are boolean expressions over declared variables. The following operators and constants can be used. For some operators alternative syntax is given in rounded brackets, explanation are given in curly brackets.  and (&,AND), or (j,OR), not (!,NOT), true (TRUE), false (FALSE)  if (IF) . . . then (THEN) . . . [else (ELSE) . . . ] endif (endif)  = fequalityg, # () finequalityg, >=, , <  +, ?, , = fdivisiong, % fmodulog  (, ) For time conditions the use of local and output variables is not permitted. For conditions of simulation breakpoints variables have to be pre xed by the name of the corresponding automaton separated by \.". For example, the breakpoint condition A1.var2=true is a syntactly correct if automaton A1 contains a boolean variable var2.

A.2.3 Actions

Actions are sequences of assignments which are separated by \;". An assignment has the shape u:=e where u is a local or an output variable and e is an expression that is type consistent with u. Examples are a:=a+1; b:=a*2; c:= radio o . Moreover, it is allowed to build statements by if-then-else. For example, if a>0 then a:=a-1;b:=b*2; else a:=10; endif is legal. Even nesting is ne. 23

A.2.4 Reserved Keywords

All identi ers for automata, variables and enumeration elements have to be unique. Identi ers are strings consisting of letters (uppercase and lowercase), numbers, and \ " where the rst symbol is not a number. The following keywords are reserved and cannot be used as identi ers:  action, all, automaton, channel, condition, connect, delay, else, endif, epsilon, for, if, init, inport, in, interface, into, local, nextstate, outport, out, start, state, states, subautomaton, then,to, with  all operators and constants given in Sect. A.2.2. For the conditions of simulation breakpoints the following additional keywords are also reserved (written in lowercase and uppercase):

 at, await, breakpoint, cycle, cyclic, def, else, message, option, parallel, poll,

report, restart, since, stop, trace, use, vector, wait, InputPolling, TimeResolution.

24

design vertex of an automaton

25

Figure 14: Nomenclature in Moby/plc

channel design vertex of a subautomaton

{design graph, hierarchy graph}

subautomaton

selected vertex

{button column, icon column}

{system graph, system, block view}

PLC-Automaton variable

{inport, connector}

state

transition condition

initial state

time delay

{refined state, superstate} outport

selected edge, transition

A.3 Nomenclature

design vertex of a system