Customization > SySim- SysML model execution > Modeling a SySim model execution > Defining SySim control block and SysML model block interaction (SySim)
  
Defining SySim control block and SysML model block interaction (SySim)
Preparing a SysML model for SySim
Modeling a SySim model execution:
Creating a SySim simulation scenario
Including SysML model blocks in a SySim simulation scenario
Including PTC provided SySim control blocks in a SySim simulation scenario
Creating your own SySim control blocks to model controls and behavior
Including your own SySim control blocks in a SySim simulation scenario
Defining SySim control block and SysML model block interaction
Setting up a model to work with PTC ThingWorx
Generating and building a SySim model execution
Working with a SySim model execution
After including SysML model Blocks and SySim Control Blocks through Block Properties on a SySim Simulation Scenario's Internal Block Diagram, you must define their interaction through connections.
Important: Before connecting a port, ensure that either the «SySim InputPort», «SySim OutputPort» or «SySim InputOutputPort» stereotype as appropriate has been applied to that port. If you apply the «SySim InputPort», «SySim OutputPort» or «SySim InputOutputPort» stereotype to a port after connecting the port to another port, the Stereotype may be applied only to a redefinition of port (rather than the underlying port) and the SySim model execution application will not be generated correctly. For more information refer to Troubleshooting SySim
To define interaction between a SySim control block and a SysML model block:
1. Open the Internal Block Diagram you created for the SySim Simulation Scenario.
2. Ensure that each Full Port, Proxy Port and Flow Port that will be connected is stereotyped by either the «SySim InputPort», «SySim OutputPort» or «SySim InputOutputPort» stereotype as appropriate
To apply one of the preceding Stereotypes to a Full Port, Proxy Port or Flow Port: right-click the port, point to Links > Stereotypes, and then click either SySim InputPort,SySim OutputPort or SySim InputOutputPort.
Notes:
For a Flow Port, the «SySim InputOutputPort» stereotype can be applied only when the Flow Port is typed by Flow Specifications.
The types of the two ports that are connected must be compatible.
3. Ensure that each UML standard port that has been connected is stereotyped by either the «SySim InputPort» or «SySim OutputPort» stereotype as appropriate.
To apply one of the preceding Stereotypes to a Full Port, Proxy Port or Flow Port: right-click the port, point to Links > Stereotypes, and then click either SySim InputPort or SySim OutputPort.
Ensure that the «SySim PortClass» stereotype is applied to the Class that is used as a type for the standard port.
4. On the Structure Diagram toolbar, click the required Connector or Binding Connector button
5. Click the first port, and then click the second port.
After defining the interaction between SySim Control Blocks and SysML model Blocks, you can generate and build the SySim model execution. For more information refer to Setting up Microsoft Visual Studio