|
On a <<SySim ModelCenterBlock>>, the user can redefine the following operations needed by the ModelCenter integration, that are otherwise automatically created by the code generator:
• InitMC() —Called at each loop. Intent is to initialize the ModelCenter subsystem if not already initialized.
• ExecuteAnalysis(Timespan) —Called when the intent is start or continue the execution of a ModelCenter analysis.
• OnModelCenterAdvance(Timespan) —Called at each loop to progress the SySim simulation.
• OnModelCenterError(System.Exception) —Called whenever Model Center returns an exception.
• OnModelCenterEnd() —Called when the used presses the simulation end button on the SySim form.
|
|
• The semantics of ports within a <<SySim ModelCenterBlock>> block is as follows:
◦ When <<SySim ModelCenterPort>> is not applied to any of the SySim ports in the block, then all the SySim ports in the block as assumed to be ModelCenter ports (with all tag definitions empty that will assume their predefined meaning)
◦ Otherwise, the user must specify <<SySim ModelCenterPort>> (along with the needed tag definition values) for each of the ports representing ModelCenter variables.
|
Type of part or port
|
Type in Visual Basic is assigned to
|
IDecimal
IDouble
ISingle
Decimal
Double
Single
|
Phoenix.ModelCenter.Common.Types.RealValue
|
IInteger
ILong
Integer
Long
|
Phoenix.ModelCenter.Common.Types. IntegerValue
|
IBoolean
Boolean
|
Phoenix.ModelCenter.Common.Types.BooleanValue
|
IString
String
|
Phoenix.ModelCenter.Common.Types.StringValue
|
<any other>, with “SySim ModelCenterType” left empty
|
An error is generated during SySim preparation
|
|
When a ModelCenter type is specified directly, omit the prefix Phoenix.ModelCenter.Common.Types as it is automatically added by the code generator.
|