PAgraph Environment

Figure 42. PAgraph Environment

The PAgraph interface consists of the following elements:

  • Explorer—Contains the state machine as well as the used libraries and variables in a tree structure.
  • Toolbox—Contains all elements that are available for the creation of a state machine.
  • Code view—Contains the code for the states, submachines, and transitions.
  • Message window—Contains the messages of the compiler or generator.
  • Graphical workspace—Contains the graphical representation of the state machine.
  • Menu bar—Contains all central menus.
  • Icon bar—Contains buttons for the most common functions of the interface.
Tip You can freely move the windows and dock them to the interface.

Explorer

The Explorer nodes have the following structure:

  • Root Node—Displays the name of the state machine.
  • Libraries, Global and Local Variables Nodes—Click one of these nodes to open a window in the code view to define the libraries, local and global variables. You cannot move or delete these nodes.
  • Initial State—You can only delete this element if you move the transition, which leads from the start element to the initial state, to another state. You cannot edit the start element. You cannot fill the start element with code. Even clicking on this item has no effect. Below the initial state, there is a separate node for each state or submachine. If you expand this node, the next layer displays all transitions that lead away from that state.
  • Toolbox

    The toolbox contains all elements that you need to create a state machine.

    When you open PAgraph, the toolbox is docked to the left edge of the Explorer. You can drag the desired element from the toolbox to the diagram area.

    Figure 43. Elements of the Toolbox
    Table 63. Toolbox Elements
    Symbol Name Description Positioning


    Do4Ever Always executed before the current state. Freely positionable.


    Any transition Always checked before the current state. Freely positionable.


    DoAtStateChange Executed at each state change. Freely positionable.


    State The cyclic part is executed as long as the state is active. After the start, a state or a state machine.


    State Machine Summarizes several states and transitions, is left via Out. After the start, a state or a state machine.


    Branch Not editable and is only run through when both the incoming and at least one outgoing transition are met. Between states and state machines.


    Out Leaves a state machine purposefully. After a state or state machine.


    End Stops execution of the current state machine; contains no code. After a state or state machine.


    Stop Changes only in the next cycle to the successor state when a transition is executed. Within a transition.


    Comment Any text. Freely positionable.
    Note The start element is not part of the toolbox, as it is created automatically when you create a state or state machine.

    Transitions are also not part of the toolbox because you cannot freely position them. You can drag transitions from existing elements to another existing element.

    Graphical Work Area

    The graphical work area, also known as the chart view, is the central area of PAgraph. The state machine is displayed graphically as a tab that is labeled with the name of the group Graphical programming.

    When you create a new state machine, PAgraph automatically creates the start element and the start state.

    If the state machine contains sub-state machines, they are displayed individually on a separate tab in the diagram area. You can arrange the tabs on the interface. You can position the tabs freely on your monitor.

    Editing Options

    The following editing options are available when you are working in the chart view.

    • Click an element in the chart view to display the program code in the code view. The element is marked in the Explorer at the same time that it is displayed.
    • Open a context menu for each element that provides the editing options for that element.
    • Move an element by setting the cursor on the label of this element. Then the cursor turns to an arrow and you can drag the element to the desired position.
    • Select and move multiple elements, including the transitions between elements.
    • Create additional elements from all the elements. Move the cursor to the unlabeled background area of the desired element. When the mouse pointer turns to a hand, you can create a new element.
    Note Any elements that are positioned in the chart view are automatically aligned on an invisible grid. Alignment occurs regardless of whether the grid is visible.