SySim control blocks (SySim)
A SySim Control Block is a Block that has applied to it the «SySim ControlBlock» stereotype from the SySim profile. In a model that is set up for generating a SySim model execution, there will be two types of Blocks that are stereotyped.
• Blocks (subsystems) in the underlying SysML model.
To include these Blocks in a SySim model execution, they must be stereotyped by the «SySim ControlBlock» stereotype.
• Blocks that model controls and behavior for a SySim Simulation Scenario.
To include these Blocks in a SySim model execution, they also must be stereotyped by the «SySim ControlBlock» stereotype.
Blocks (subsystems) in the underlying SysML model
There may be many Blocks (subsystems) in the underlying SysML model. To ensure that SySim generates code only for those Blocks that are involved in a SySim Simulation Scenario, you must identify the SysML model Blocks that are involved with a SySim Simulation Scenario by applying the «SySim ControlBlock» stereotype to those Blocks.
If the SysML model block owns a state machine and you want that state machine to be ignored in the SySim model execution, set the tagged value of the SySim StateMachine tag definition to No.
If you want to define the behavior of the SysML model block through a Simulink model: apply the «SySim SimulinkBlock» stereotype to the SysML model block and set the tagged value of the SySim SimulinkModelPathName tag definition to the path and name of the Simulink mdl or slx file you want to reference.
Working with Simulink
Blocks that model controls and behavior for a SySim simulation scenario
The SySim Profile includes PTC provided SySim Control Blocks for the following custom input and output controls: Graph, Knob, LedBulb, LedDisplay, Meter, NumericSlider, PushButton, SevenSegmentDisplay and Switch.
PTC provided SySim control blocks
In addition to the PTC provided SySim Control Blocks, you can create your own SySim Control Blocks to model controls and behavior for a SySim model execution. You can create SySim Control Blocks that use Visual Basic standard controls, such as a text box, SySim Control Blocks that are based on the PTC provided SySim Control Blocks, and SySim Control Blocks that define processing for the SySim model execution:
• When you create a SySim Control Block that is based on a PTC provided SySim Control Block, set up the SySim Control Block to inherit from the PTC provided SySim Control Block through a Generalization relationship. You can then refine your SySim Control Block. For more information refer to
Creating your own SySim control blocks to model controls and behavior
• When you create a SySim Control Block that defines only processing for the SySim model execution, you may not define any inheritance from SySim VB Base Classes or PTC provided SySim Control Blocks.
You can define the behavior of a Block through a child State Diagram that uses ASAL (a PTC structured action language). For more information refer to
Creating your own SySim control blocks to model controls and behavior
You can create Operations on a SySim Control Block that are triggered by a SySim model execution being ready to start, started or ended; and Operations that are triggered by the input latch, time advance and output publish phases of a SySim model execution loop. These Operations can then define how the SySim Control Block behaves to the relevant trigger. Most event handling Operations will be triggered by the Time Advance trigger. For more information refer to
SySim model execution event handling
If the SySim Control Block owns a state machine and you want that state machine to be ignored in the SySim model execution, set the tagged value of the SySim StateMachine tag definition to No.
If you want to define the behavior of the SysML model block through a Simulink model: Apply the «SySim SimulinkBlock» stereotype to the SysML model block and set the tagged value of the SySim SimulinkModelPathName tag definition to the path and name of the Simulink mdl or slx file you want to reference. For more information refer to
Working with Simulink
Parent topic