Exporting State Machine Diagram in SLX or MDL Format

You can export a state machine diagram to a state flow. The state machine diagram can be exported SLX or MDL format.

This task shows you how to:

Export to State Flow using the Export Command

  1. In the tree, select a function or a logical component containing a state machine diagram.

    Notes:
    • If several state machine diagrams are selected, a file is created for each selected state machine diagram. The files are named after the state machine diagrams.
    • If the function of the model contains only one state machine diagram, it is included in the same file as the complete model only if this is a leaf (no function or logical children). Otherwise all the state machine diagrams are exported separately.

  2. Click Share > Export > System Architecture and select one of the following options:
    • To MDL
    • To SLX
  3. In the Path box of the Export dialog box, define the location of the file that will contain the exported state machine diagram.
  4. In the File Name box, enter the name of file.

Export SIMULINK using Batch File

You can export MDL or SLX data using a .XML batch file.

  1. Create .XML batch file containing the following elements:

  2. In each tag, define the necessary information:
    • <Database></Database>: Name of the database
    • <User ID></User ID>: User name
    • <Password></Password>: Password to connect to a server
    • <MDL_Path> </MDL_Path>: Path to the exported MDL or SLX file
    • <MDL_Name> </MDL_Name>: Name of the exported MDL or SLX file
    The state machine elements are exported in as state flow elements, when existing :
    State Machine ElementEquivalent Element in State FlowComment
    State Diagramstate Flow Chart-
    StateState The expression associated with Entry / Do / Exit is concatenated with the state label name.

    Entry is renamed entry.

    Do is renamed during.

    Exit is renamed exit.

    Initial StateDefault TransitionThe initial state and the transition starting from it defines the default transition.
    Final State-No equivalent element but the occurrence of the element must be signaled.
    TransitionTransitionFor transitions which are not linked to an initial state:

    Trigger is renamed Event Trigger.

    Guard is renamed Condition.

    Effect is renamed Transition Action.

    Reflexive Transition Self Loop Transition

    Trigger is renamed Event Trigger.

    Guard is renamed Condition.

    Effect is renamed Transition Action.

    Submachine StateLinked Atomic Subchart-
    Composite StateParallel and State Decomposition-
    Junction Pseudo StateConnective Junction-
    History Pseudo StateHistory Junction-
    Deep History Pseudo State-No equivalent element but the occurrence of the element must be signaled.
    CommentNote-
    Terminate Pseudo State-No equivalent element but the occurrence of the element must be signaled.
    Composite State with Entry and Exit Pseudo State Nodes- The transition is directly linked with the internal state.