Interface Siemens::Simatic::Simulation::Runtime::IInstance¶
ClassList > Siemens > Simatic > Simulation > Runtime > IInstance
#include <SimulationRuntimeApiNet.h>
Inherits the following classes: System::IDisposable
Public Attributes¶
| Type | Name |
|---|---|
| property System::String | ArticleNumber = { System::String^ get()Gets or sets the ArticleNumber cpu of the virtual controller. A change of the CPU will only happen when the controller is restarted. |
| property ECPUType | CPUType = { [**ECPUType**](SimulationRuntimeApi_8h.md#enum-ecputype) get()Gets or sets the CPU type of the virtual controller. A change of the CPU Type will only happen when the controller is restarted. |
| property ECommunicationInterface | CommunicationInterface = { [**ECommunicationInterface**](SimulationRuntimeApi_8h.md#enum-ecommunicationinterface) get() |
| property array< System::String^> | ControllerIP = { array<System::String^>^ get()Returns a configured IP address of the instance. |
| property array< SIPSuite4 > | ControllerIPSuite4 = { array<[**SIPSuite4**](structSIPSuite4.md)>^ get()Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0. |
| property System::String | ControllerName = { System::String^ get()Returns the downloaded controller name of the virtual controller. |
| property System::String | ControllerShortDesignation = { System::String^ get()Returns the downloaded short designation of the virtual controller. |
| property INT32 | ID = { INT32 get()Returns the ID of the instance. The ID is assigned by the Runtime Manager when registering the instance. |
| property SInstanceInfo | Info = { [**SInstanceInfo**](structSInstanceInfo.md) get()Returns a struct providing information about the instance. |
| property IIOArea | InputArea = { IIOArea^ get()Returns the interface that can be used to call I/O access by address functions. |
| property bool | IsSendSyncEventInDefaultModeEnabled = { bool get()Gets or sets the SendSyncEventInDefault mode. If the mode is set, the OnSyncPointReached event is triggered after every cycle end in the operating mode "Default". |
| property ERuntimeErrorCode | LicenseStatus = { [**ERuntimeErrorCode**](SimulationRuntimeApi_8h.md#enum-eruntimeerrorcode) get()Returns information about whether a Trial License is currently in use. |
| property IIOArea | MarkerArea = { IIOArea^ get()Returns the interface that can be used to call I/O access by address functions. |
| property System::String | Name = { System::String^ get()Returns the name of the instance. |
| event Delegate_SREC_ST_UINT32_UINT32 | OnAlarmNotificationDone Registers or unregisters an event handler method. |
| event Delegate_II_EREC_DT_SDRI | OnDataRecordRead Registers or unregisters an event handler method. |
| event Delegate_II_EREC_DT_SDR | OnDataRecordWrite Registers or unregisters an event handler method. |
| event Delegate_DisplayDataChanged | OnDisplayDataChanged The event will be fired when the front panel data has changed. Afterwards it is always safe to access the display data. |
| event Delegate_II_EREC_DT | OnHardwareConfigChanged The event will be fired when the download of a HW-Config happens. It will always stop and restart the isochronous clock mechanism. |
| event Delegate_IPAddressChanged | OnIPAddressChanged Fired on IP address change |
| event Delegate_II_EREC_DT_ELT_ELM | OnLedChanged The event will be fired when a LED of the virtual controller has been changed. |
| event Delegate_II_EREC_DT_EOS_EOS | OnOperatingStateChanged The event will be fired every time the operating state of the virtual controller has been changed. |
| event Delegate_SREC_ST_UINT32_UINT32_EPET_UINT32 | OnProcessEventDone Registers or unregisters an event handler method. |
| event Delegate_SREC_ST_UINT32 | OnProfileEventDone The user can Register or unregister for an asynchronous acknowledgement of the Profile Event. |
| event Delegate_SREC_ST_UINT32_EPPET_UINT32 | OnPullOrPlugEventDone Registers or unregisters an event handler method. |
| event Delegate_SREC_ST_UINT32_ERSFET | OnRackOrStationFaultEvent The user can Register or unregister for an asynchronous acknowledgement of the RackOrStationFault Event. |
| event Delegate_SoftwareConfigurationChanged | OnSoftwareConfigurationChanged Software configuration changed event handler. |
| event Delegate_SREC_ST_UINT32 | OnStatusEventDone The registered user-defined function will be executed as acknowledgement that the execution of the Status Event OB (OB 55) has completed. |
| event Delegate_II_EREC_DT_UINT32_INT64_INT64_UINT32 | OnSyncPointReached Registers or unregisters an event handler method. |
| event Delegate_SREC_ST_UINT32 | OnUpdateEventDone The user can register or unregister for an asynchronous acknowledgement of the Update Event. |
| property EOperatingMode | OperatingMode = { [**EOperatingMode**](SimulationRuntimeApi_8h.md#enum-eoperatingmode) get()Gets or sets the operating mode of the virtual controller. Changes of the value during runtime take effect on the cycle control point. |
| property EOperatingState | OperatingState = { [**EOperatingState**](SimulationRuntimeApi_8h.md#enum-eoperatingstate) get()Returns the operating state of the virtual controller. |
| property IIOArea | OutputArea = { IIOArea^ get()Returns the interface that can be used to call I/O access by address functions. |
| property INT64 | OverwrittenMinimalCycleTime_ns = { INT64 get()Gets or sets the overwritten minimal cycle time in nanoseconds used in the extended single-step operating mode. A valid input is a value between 0 and 6,000,000,000. Changes of the value during runtime take effect at the cycle control point. |
| property double | ScaleFactor = { double get()Gets or sets the scale factor the virtual time proceeds. A valid input value X is a value between 0 and 1000. The default value is 1.0. If the value is unequal to 1, the virtual time of the virtual controller runs X times faster/slower than the wall clock time. Changes of the value during runtime take effect at the cycle control point. |
| property System::String | StoragePath = {System::String^ get()Gets or sets the full path of the directory the instance is storing its data. This can also be a network share. The path has to be set while the instance is not running. The instance will read the path during power on only. If no path is set the default path will be 'user documents folder'\Siemens\Simatic\Simulation\Runtime\Persistence\'Instance Name' |
| property bool | StrictMotionTiming = /* multi line expression */ |
| property System::DateTime | SystemTime = { System::DateTime get()Gets or sets the virtual system time of the virtual controller. A valid input is a system time between Jan 1 1970 00:00:00:000 and Dec 31 2200 23:59:59:999 |
| property array< STagInfo > | TagInfos = { array<[**STagInfo**](structSTagInfo.md)>^ get()Get a list of all tags. |
Public Functions¶
| Type | Name |
|---|---|
| virtual void | AlarmNotification (UINT16 in_HardwareIdentifier, UINT16 in_ModuleState, UINT16 in_NumberOfDiagnosisEvents, array< SDiagExtChannelDescription >^ in_ArrayOfDiagnosisEvents, UINT16% out_SequenceNumber) This API is used to trigger the diagnosis alarms. Each call of this API-Method triggers the OB82 once, independent from the number and severity of the transmitted Diagnostic-Items. |
| virtual void | ArchiveStorage (System::String^ in_FullFileName) Stores the virtual memory card in a .zip file. The virtual controller has to be in the operating state off. |
| virtual ERuntimeErrorCode | CheckNetInterfaceMapping () Check for valid network interface mapping, so instance can be started. All already running instances on PC are checked for possible duplicate mappings. Also check for valid bindings on PC network interfaces. |
| virtual void | CleanupStoragePath () Cleans up the storage folder. The controller must be in operational state OFF. |
| virtual void | CreateConfigurationFile (System::String^ in_FullFileName) Writes all taglist entries from the taglist storage into an XML file. |
| virtual ERuntimeErrorCode | DisplayKeyPress (EDisplayKey keyId) This API Interacts with the selected button on the Display. |
| virtual array< SConfiguredProcessEvents > | GetConfiguredProcessEvents () The API GetConfiguredProcessEvents can be used for reading the configuration of the downloaded process events at runtime. |
| virtual void | GetCycleTimeMonitoringMode (ECycleTimeMonitoringMode% out_CycleTimeMonitoringMode, INT64% out_MaxCycleTime_ns) gets the maximum cycle time in nanoseconds based on the CycleTimeMonitoring mode. |
| virtual SDisplayData | GetDisplayData () This API gets the current display data of the display and writes it into the given uint8_t Buffer. |
| virtual int | GetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID) Get the interface index of PC interface to which specified PLC interface is mapped. |
| virtual void | GetTagListStatus (ETagListDetails% out_TagListDetails, bool% out_IsHMIVisibleOnly) Returns the current update state of the taglist storage. "inout_TagListDetails" is "NONE" if the list needs to be updated. |
| virtual bool | HasDisplay () This API gets if the PLC is having a display or not. If the return value is true it is save that the display is simulated and the functions for accessing its data are returning simulated data. |
| virtual void | MemoryReset () Shuts down the virtual controller, closes its process and restarts it. |
| virtual void | MemoryReset (UINT32 in_TimeOut_ms) Shuts down the virtual controller, closes its process and restarts it. |
| virtual void | PowerOff () Shuts down the virtual controller and closes its process. |
| virtual void | PowerOff (UINT32 in_TimeOut_ms) Shuts down the virtual controller and closes its process. |
| virtual ERuntimeErrorCode | PowerOn () Creates the process of the simulation runtime instance and starts the firmware of the virtual controller. |
| virtual ERuntimeErrorCode | PowerOn (UINT32 in_TimeOut_ms) Creates the process of the simulation runtime instance and starts the firmware of the virtual controller. |
| virtual void | ProcessEvent (UINT16 in_HardwareIdentifier, UINT16 in_Channel, EProcessEventType in_ProcessEventType, UINT16% out_SequenceNumber) This API is used to trigger the process event interrupt. |
| virtual void | ProfileEvent (UINT16 in_HardwareIdentifier, UINT16 in_Specifier) This API is used to trigger the Profile event OB (OB 57). Profile-Events are supported only for modules on a decentral IO-system. |
| virtual void | PullOrPlugEvent (UINT16 in_HardwareIdentifier, EPullOrPlugEventType in_PullOrPlugEventType, UINT16% out_SequenceNumber) This API is used to trigger the Pull and Plug events. For Pull and Plug Events, the interrupt OB 83 �Pull or plug of modules� is executed. |
| virtual void | RackOrStationFaultEvent (UINT16 in_HardwareIdentifier, ERackOrStationFaultType in_EventType) This API is used to trigger the RackOrStationFault event OB (OB 86). This event is only supported for Decentral devices. |
| virtual SDataValue | Read (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual bool | ReadBool (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual char | ReadChar (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual double | ReadDouble (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual float | ReadFloat (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual INT16 | ReadInt16 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual INT32 | ReadInt32 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual INT64 | ReadInt64 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual INT8 | ReadInt8 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual void | ReadRecordDone (SDataRecordInfo in_RecordInfo, array< BYTE >^ in_Data, UINT32 in_Status) Completion of Asynchronous Reading of Data record. |
| virtual void | ReadSignals (array< SDataValueByName >^% inout_Signals) Reads a list of signals at once. Only signals of the primitive data type are supported but the function is not type safe. The function is also taking care of the endianness. |
| virtual void | ReadSignals (array< SDataValueByNameWithCheck >^% inout_Signals, bool% out_SignalsHaveChanged) Reads a list of signals at once. Only signals of the primitive data type are supported but the function is not type safe. The function is also taking care of the endianness. |
| virtual System::String | ReadString (System::String^ in_Tag) Reads the value of a PLC string variable. |
| virtual UINT16 | ReadUInt16 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual UINT32 | ReadUInt32 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual UINT64 | ReadUInt64 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual UINT8 | ReadUInt8 (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual WCHAR | ReadWChar (System::String^ in_Tag) Reads the value of a PLC variable. |
| virtual System::String | ReadWString (System::String^ in_Tag) Reads the value of a PLC wstring variable. |
| virtual void | RegisterOnDisplayDataChangedEvent () When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnHardwareConfigChangedEvent () When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnIPAddressChangedEvent () When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnLedChangedEvent () When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnOperatingStateChangedEvent () When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RegisterOnSoftwareConfigurationChangedEvent () Registers event signaled whenever a software changed event becomes signaled. |
| virtual void | RegisterOnSyncPointReachedEvent () When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one. |
| virtual void | RetrieveStorage (System::String^ in_FullFileName) Restores a virtual memory card from a .zip file. The virtual controller has to be in the operating state off. |
| virtual void | Run () Requests the virtual controller to switch into run mode. |
| virtual void | Run (UINT32 in_TimeOut_ms) Requests the virtual controller to switch into run mode. |
| virtual void | RunToNextSyncPoint () When operating the virtual controller in the single step or extended single step operating mode the virtual controller will go into freeze state at the end of each cycle. With this function the next cycle will be triggered. |
| virtual void | RunToNextSyncPoint (UINT32 in_IoSystemId, UINT64 in_BusTimeStamp_ns) Extension to IInstance::RunToNextSyncPoint for bus synchronous mode. |
| virtual void | SetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode) sets the CycleTimeMonitoring mode. A valid input CycleTimeMonitoring modes are Ignored,Downloaded or Specified. |
| virtual void | SetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode, INT64 in_MaxCycleTime_ns) sets the maximum cycle time in nanoseconds based on the CycleTimeMonitoring mode. A valid input is a value between 1000000 and 60,000,000,000. Changes of the value during runtime take effect at the cycle control point. |
| virtual void | SetIPSuite (UINT32 in_InterfaceID, SIPSuite4 in_IPSuite, bool in_IsRemanent) Sets the IP suite of a network interface of the virtual controller. |
| virtual void | SetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID, UINT32 in_PCInterfaceIndex) Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface. |
| virtual void | SetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID, System::String^ in_PCInterfaceName) Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface. |
| virtual void | SetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID, SMACAddress in_MACAddressParam) Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface. |
| virtual void | StartProcessing (INT64 in_MinimalTimeToRun_ns) When operating the virtual controller in the timespan synchronized operating mode the virtual controller will go into freeze state at the cycle control point. This function will wake up the virtual controller. The virtual controller will now run for at least the requested time based on virtual time before going back into freeze state at the next cycle control point. |
| virtual void | StatusEvent (UINT16 in_HardwareIdentifier, UINT16 in_Specifier) This API is used to trigger the Status event OB (OB 55). Status-Events are supported only for modules on a decentral IO-system. |
| virtual void | Stop () Requests the virtual controller to switch into stop mode. |
| virtual void | Stop (UINT32 in_TimeOut_ms) Requests the virtual controller to switch into stop mode. |
| virtual void | UnregisterInstance () Unregisters this instance from the Runtime Manager. |
| virtual void | UnregisterOnDisplayDataChangedEvent () Unregisters the event object. |
| virtual void | UnregisterOnHardwareConfigChangedEvent () Unregisters the event object. |
| virtual void | UnregisterOnIPAddressChangedEvent () Unregisters the event object. |
| virtual void | UnregisterOnLedChangedEvent () Unregisters the event object. |
| virtual void | UnregisterOnOperatingStateChangedEvent () Unregisters the event object. |
| virtual void | UnregisterOnSoftwareConfigurationChangedEvent () Unregisters the software changed event. |
| virtual void | UnregisterOnSyncPointReachedEvent () Unregisters the event object. |
| virtual void | UpdateEvent (UINT16 in_HardwareIdentifier, UINT16 in_Specifier) This API is used to trigger the Update event OB (OB 56). Update events are supported only for modules on a decentral IO-system. |
| virtual void | UpdateTagList () Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual void | UpdateTagList (ETagListDetails in_TagListDetails) Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual void | UpdateTagList (ETagListDetails in_TagListDetails, bool in_IsHMIVisibleOnly) Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual void | UpdateTagList (ETagListDetails in_TagListDetails, bool in_IsHMIVisibleOnly, System::String^ in_DataBlockFilterList) Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual bool | WaitForOnDisplayDataChangedEvent () The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnDisplayDataChangedEvent (UINT32 in_Time_ms) The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnHardwareConfigChangedEvent () The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnHardwareConfigChangedEvent (UINT32 in_Time_ms) The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnIPAddressChangedEvent () The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnIPAddressChangedEvent (UINT32 in_Time_ms) The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnLedChangedEvent () The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnLedChangedEvent (UINT32 in_Time_ms) The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnOperatingStateChangedEvent () The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnOperatingStateChangedEvent (UINT32 in_Time_ms) The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnSoftwareConfigurationChangedEvent () Like WaitForOnSoftwareConfigurationChangedEvent(const UINT32) without timeout. |
| virtual bool | WaitForOnSoftwareConfigurationChangedEvent (UINT32 in_Time_ms) Wait for software changed event to be signaled. |
| virtual SOnSyncPointReachedResult | WaitForOnSyncPointReachedEvent () The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual SOnSyncPointReachedResult | WaitForOnSyncPointReachedEvent (UINT32 in_Time_ms) The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual void | Write (System::String^ in_Tag, SDataValue in_Value) Writes the value of a PLC variable. |
| virtual void | WriteBool (System::String^ in_Tag, bool in_Value) Writes the value of a PLC variable. |
| virtual void | WriteChar (System::String^ in_Tag, char in_Value) Writes the value of a PLC variable. |
| virtual void | WriteDouble (System::String^ in_Tag, double in_Value) Writes the value of a PLC variable. |
| virtual void | WriteFloat (System::String^ in_Tag, float in_Value) Writes the value of a PLC variable. |
| virtual void | WriteInt16 (System::String^ in_Tag, INT16 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteInt32 (System::String^ in_Tag, INT32 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteInt64 (System::String^ in_Tag, INT64 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteInt8 (System::String^ in_Tag, INT8 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteRecordDone (SDataRecordInfo in_RecordInfo, UINT32 in_Status) Completion of Asynchronous writing of Data record. |
| virtual void | WriteSignals (array< SDataValueByName >^% inout_Signals) Writes multiple signals within a single API call. |
| virtual void | WriteString (System::String^ in_Tag, System::String^ in_Value) Writes the value of a PLC variable. |
| virtual void | WriteUInt16 (System::String^ in_Tag, UINT16 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteUInt32 (System::String^ in_Tag, UINT32 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteUInt64 (System::String^ in_Tag, UINT64 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteUInt8 (System::String^ in_Tag, UINT8 in_Value) Writes the value of a PLC variable. |
| virtual void | WriteWChar (System::String^ in_Tag, WCHAR in_Value) Writes the value of a PLC variable. |
| virtual void | WriteWString (System::String^ in_Tag, System::String^ in_Value) Writes the value of a PLC wstring variable. |
| void | set (ECPUType in_Value) |
| void | set (System::String^) |
| void | set (bool) |
| void | set (double) |
| void | set (INT64) |
| void | set (System::DateTime) |
| void | set (EOperatingMode) |
| void | set (bool) |
Public Attributes Documentation¶
variable ArticleNumber¶
Gets or sets the ArticleNumber cpu of the virtual controller. A change of the CPU will only happen when the controller is restarted.
virtual property System::String Siemens::Simatic::Simulation::Runtime::IInstance::ArticleNumber;
variable CPUType¶
Gets or sets the CPU type of the virtual controller. A change of the CPU Type will only happen when the controller is restarted.
virtual property ECPUType Siemens::Simatic::Simulation::Runtime::IInstance::CPUType;
variable CommunicationInterface¶
virtual property ECommunicationInterface Siemens::Simatic::Simulation::Runtime::IInstance::CommunicationInterface;
Gets the communication interface of the virtual controller.
variable ControllerIP¶
Returns a configured IP address of the instance.
virtual property array<System::String^> Siemens::Simatic::Simulation::Runtime::IInstance::ControllerIP;
variable ControllerIPSuite4¶
Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0.
virtual property array<SIPSuite4> Siemens::Simatic::Simulation::Runtime::IInstance::ControllerIPSuite4;
variable ControllerName¶
Returns the downloaded controller name of the virtual controller.
virtual property System::String Siemens::Simatic::Simulation::Runtime::IInstance::ControllerName;
variable ControllerShortDesignation¶
Returns the downloaded short designation of the virtual controller.
virtual property System::String Siemens::Simatic::Simulation::Runtime::IInstance::ControllerShortDesignation;
variable ID¶
Returns the ID of the instance. The ID is assigned by the Runtime Manager when registering the instance.
virtual property INT32 Siemens::Simatic::Simulation::Runtime::IInstance::ID;
variable Info¶
Returns a struct providing information about the instance.
virtual property SInstanceInfo Siemens::Simatic::Simulation::Runtime::IInstance::Info;
variable InputArea¶
Returns the interface that can be used to call I/O access by address functions.
virtual property IIOArea Siemens::Simatic::Simulation::Runtime::IInstance::InputArea;
variable IsSendSyncEventInDefaultModeEnabled¶
Gets or sets the SendSyncEventInDefault mode. If the mode is set, the OnSyncPointReached event is triggered after every cycle end in the operating mode "Default".
virtual property bool Siemens::Simatic::Simulation::Runtime::IInstance::IsSendSyncEventInDefaultModeEnabled;
variable LicenseStatus¶
Returns information about whether a Trial License is currently in use.
virtual property ERuntimeErrorCode Siemens::Simatic::Simulation::Runtime::IInstance::LicenseStatus;
variable MarkerArea¶
Returns the interface that can be used to call I/O access by address functions.
virtual property IIOArea Siemens::Simatic::Simulation::Runtime::IInstance::MarkerArea;
variable Name¶
Returns the name of the instance.
virtual property System::String Siemens::Simatic::Simulation::Runtime::IInstance::Name;
variable OnAlarmNotificationDone¶
Registers or unregisters an event handler method.
virtual event Delegate_SREC_ST_UINT32_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnAlarmNotificationDone;
variable OnDataRecordRead¶
Registers or unregisters an event handler method.
virtual event Delegate_II_EREC_DT_SDRI Siemens::Simatic::Simulation::Runtime::IInstance::OnDataRecordRead;
variable OnDataRecordWrite¶
Registers or unregisters an event handler method.
virtual event Delegate_II_EREC_DT_SDR Siemens::Simatic::Simulation::Runtime::IInstance::OnDataRecordWrite;
variable OnDisplayDataChanged¶
The event will be fired when the front panel data has changed. Afterwards it is always safe to access the display data.
virtual event Delegate_DisplayDataChanged Siemens::Simatic::Simulation::Runtime::IInstance::OnDisplayDataChanged;
variable OnHardwareConfigChanged¶
The event will be fired when the download of a HW-Config happens. It will always stop and restart the isochronous clock mechanism.
virtual event Delegate_II_EREC_DT Siemens::Simatic::Simulation::Runtime::IInstance::OnHardwareConfigChanged;
variable OnIPAddressChanged¶
Fired on IP address change
virtual event Delegate_IPAddressChanged Siemens::Simatic::Simulation::Runtime::IInstance::OnIPAddressChanged;
variable OnLedChanged¶
The event will be fired when a LED of the virtual controller has been changed.
virtual event Delegate_II_EREC_DT_ELT_ELM Siemens::Simatic::Simulation::Runtime::IInstance::OnLedChanged;
variable OnOperatingStateChanged¶
The event will be fired every time the operating state of the virtual controller has been changed.
virtual event Delegate_II_EREC_DT_EOS_EOS Siemens::Simatic::Simulation::Runtime::IInstance::OnOperatingStateChanged;
variable OnProcessEventDone¶
Registers or unregisters an event handler method.
virtual event Delegate_SREC_ST_UINT32_UINT32_EPET_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnProcessEventDone;
variable OnProfileEventDone¶
The user can Register or unregister for an asynchronous acknowledgement of the Profile Event.
virtual event Delegate_SREC_ST_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnProfileEventDone;
variable OnPullOrPlugEventDone¶
Registers or unregisters an event handler method.
virtual event Delegate_SREC_ST_UINT32_EPPET_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnPullOrPlugEventDone;
variable OnRackOrStationFaultEvent¶
The user can Register or unregister for an asynchronous acknowledgement of the RackOrStationFault Event.
virtual event Delegate_SREC_ST_UINT32_ERSFET Siemens::Simatic::Simulation::Runtime::IInstance::OnRackOrStationFaultEvent;
variable OnSoftwareConfigurationChanged¶
Software configuration changed event handler.
virtual event Delegate_SoftwareConfigurationChanged Siemens::Simatic::Simulation::Runtime::IInstance::OnSoftwareConfigurationChanged;
Exception:
SimulationRuntimeException
variable OnStatusEventDone¶
The registered user-defined function will be executed as acknowledgement that the execution of the Status Event OB (OB 55) has completed.
virtual event Delegate_SREC_ST_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnStatusEventDone;
variable OnSyncPointReached¶
Registers or unregisters an event handler method.
virtual event Delegate_II_EREC_DT_UINT32_INT64_INT64_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnSyncPointReached;
variable OnUpdateEventDone¶
The user can register or unregister for an asynchronous acknowledgement of the Update Event.
virtual event Delegate_SREC_ST_UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::OnUpdateEventDone;
variable OperatingMode¶
Gets or sets the operating mode of the virtual controller. Changes of the value during runtime take effect on the cycle control point.
virtual property EOperatingMode Siemens::Simatic::Simulation::Runtime::IInstance::OperatingMode;
variable OperatingState¶
Returns the operating state of the virtual controller.
virtual property EOperatingState Siemens::Simatic::Simulation::Runtime::IInstance::OperatingState;
variable OutputArea¶
Returns the interface that can be used to call I/O access by address functions.
virtual property IIOArea Siemens::Simatic::Simulation::Runtime::IInstance::OutputArea;
variable OverwrittenMinimalCycleTime_ns¶
Gets or sets the overwritten minimal cycle time in nanoseconds used in the extended single-step operating mode. A valid input is a value between 0 and 6,000,000,000. Changes of the value during runtime take effect at the cycle control point.
virtual property INT64 Siemens::Simatic::Simulation::Runtime::IInstance::OverwrittenMinimalCycleTime_ns;
variable ScaleFactor¶
Gets or sets the scale factor the virtual time proceeds. A valid input value X is a value between 0 and 1000. The default value is 1.0. If the value is unequal to 1, the virtual time of the virtual controller runs X times faster/slower than the wall clock time. Changes of the value during runtime take effect at the cycle control point.
virtual property double Siemens::Simatic::Simulation::Runtime::IInstance::ScaleFactor;
variable StoragePath¶
Gets or sets the full path of the directory the instance is storing its data. This can also be a network share. The path has to be set while the instance is not running. The instance will read the path during power on only. If no path is set the default path will be 'user documents folder'\Siemens\Simatic\Simulation\Runtime\Persistence\'Instance Name'
virtual property System::String Siemens::Simatic::Simulation::Runtime::IInstance::StoragePath;
variable StrictMotionTiming¶
virtual property bool Siemens::Simatic::Simulation::Runtime::IInstance::StrictMotionTiming;
Get or set current strict motion timing setting. true get: Enabled. set: Enable. false get: Disabled. set: Disable.
Exception:
SimulationRuntimeExceptionInstance is powered on.
variable SystemTime¶
Gets or sets the virtual system time of the virtual controller. A valid input is a system time between Jan 1 1970 00:00:00:000 and Dec 31 2200 23:59:59:999
virtual property System::DateTime Siemens::Simatic::Simulation::Runtime::IInstance::SystemTime;
variable TagInfos¶
Get a list of all tags.
virtual property array<STagInfo> Siemens::Simatic::Simulation::Runtime::IInstance::TagInfos;
Public Functions Documentation¶
function AlarmNotification¶
This API is used to trigger the diagnosis alarms. Each call of this API-Method triggers the OB82 once, independent from the number and severity of the transmitted Diagnostic-Items.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::AlarmNotification (
UINT16 in_HardwareIdentifier,
UINT16 in_ModuleState,
UINT16 in_NumberOfDiagnosisEvents,
array< SDiagExtChannelDescription >^ in_ArrayOfDiagnosisEvents,
UINT16% out_SequenceNumber
)
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the diagnosis item is sent.in_ModuleStateState of the Module. Accepted states are: DMODULE_STATE_OK, DMODULE_STATE_ERROR, DMODULE_STATE_MAINT_DEMANDED, DMODULE_STATE_MAINT_REQUIRED.in_NumberOfDiagnosisEventsNumber of Diagnosis Events sent to the CPU.in_ArrayOfDiagnosisEventsPointer to an array of diagnosis items. The array must match with the number of diagnosis items. It may be NULL-Pointer.out_SequenceNumberUnique consecutive number assigned to every single alarm event.
function ArchiveStorage¶
Stores the virtual memory card in a .zip file. The virtual controller has to be in the operating state off.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::ArchiveStorage (
System::String^ in_FullFileName
)
Parameters:
in_FullFileNameThe full file path to the .zip file. The path is based on the directories of the computer the instance is running on.
function CheckNetInterfaceMapping¶
Check for valid network interface mapping, so instance can be started. All already running instances on PC are checked for possible duplicate mappings. Also check for valid bindings on PC network interfaces.
virtual ERuntimeErrorCode Siemens::Simatic::Simulation::Runtime::IInstance::CheckNetInterfaceMapping ()
function CleanupStoragePath¶
Cleans up the storage folder. The controller must be in operational state OFF.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::CleanupStoragePath ()
function CreateConfigurationFile¶
Writes all taglist entries from the taglist storage into an XML file.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::CreateConfigurationFile (
System::String^ in_FullFileName
)
Parameters:
in_FullFileNameThe full filename of the XML file ('path' + 'filename' + 'file extension').
function DisplayKeyPress¶
This API Interacts with the selected button on the Display.
virtual ERuntimeErrorCode Siemens::Simatic::Simulation::Runtime::IInstance::DisplayKeyPress (
EDisplayKey keyId
)
Parameters:
keyIdThe kind of the key press to set.
function GetConfiguredProcessEvents¶
The API GetConfiguredProcessEvents can be used for reading the configuration of the downloaded process events at runtime.
virtual array< SConfiguredProcessEvents > Siemens::Simatic::Simulation::Runtime::IInstance::GetConfiguredProcessEvents ()
function GetCycleTimeMonitoringMode¶
gets the maximum cycle time in nanoseconds based on the CycleTimeMonitoring mode.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::GetCycleTimeMonitoringMode (
ECycleTimeMonitoringMode % out_CycleTimeMonitoringMode,
INT64% out_MaxCycleTime_ns
)
function GetDisplayData¶
This API gets the current display data of the display and writes it into the given uint8_t Buffer.
virtual SDisplayData Siemens::Simatic::Simulation::Runtime::IInstance::GetDisplayData ()
function GetNetInterfaceMapping¶
Get the interface index of PC interface to which specified PLC interface is mapped.
virtual int Siemens::Simatic::Simulation::Runtime::IInstance::GetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID
)
Parameters:
in_PLCInterfaceIDID of the PLC interface for which network interface mapping should be retrieved. Fixed range 0 - 2 (IE1 - IE3)
function GetTagListStatus¶
Returns the current update state of the taglist storage. "inout_TagListDetails" is "NONE" if the list needs to be updated.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::GetTagListStatus (
ETagListDetails % out_TagListDetails,
bool% out_IsHMIVisibleOnly
)
Parameters:
out_TagListDetailsThe status of the tag list details. SRTLD_NONE if the list needs to be updated.out_IsHMIVisibleOnlyIf "true", only tags marked as "HMI Visible" are available in the list.
function HasDisplay¶
This API gets if the PLC is having a display or not. If the return value is true it is save that the display is simulated and the functions for accessing its data are returning simulated data.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::HasDisplay ()
function MemoryReset [½]¶
Shuts down the virtual controller, closes its process and restarts it.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::MemoryReset ()
function MemoryReset [2/2]¶
Shuts down the virtual controller, closes its process and restarts it.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::MemoryReset (
UINT32 in_TimeOut_ms
)
Parameters:
in_TimeOut_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get noticed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_STOP , SROS_RUN }
function PowerOff [½]¶
Shuts down the virtual controller and closes its process.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::PowerOff ()
function PowerOff [2/2]¶
Shuts down the virtual controller and closes its process.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::PowerOff (
UINT32 in_TimeOut_ms
)
Parameters:
in_TimeOut_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get noticed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { EOperatingState.Off }
function PowerOn [½]¶
Creates the process of the simulation runtime instance and starts the firmware of the virtual controller.
virtual ERuntimeErrorCode Siemens::Simatic::Simulation::Runtime::IInstance::PowerOn ()
function PowerOn [2/2]¶
Creates the process of the simulation runtime instance and starts the firmware of the virtual controller.
virtual ERuntimeErrorCode Siemens::Simatic::Simulation::Runtime::IInstance::PowerOn (
UINT32 in_TimeOut_ms
)
Parameters:
in_TimeOut_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get informed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_STOP , SROS_RUN }
function ProcessEvent¶
This API is used to trigger the process event interrupt.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::ProcessEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Channel,
EProcessEventType in_ProcessEventType,
UINT16% out_SequenceNumber
)
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the diagnosis item is sent.in_ChannelThe channel of the I/O module from which the process event is generated.in_ProcessEventTypeOne value from the list of pre-defined process event types for S7-Modules. The event types are defined in the enumeration EProcessEventType.out_SequenceNumberUnique consecutive number assigned to every single alarm event.
function ProfileEvent¶
This API is used to trigger the Profile event OB (OB 57). Profile-Events are supported only for modules on a decentral IO-system.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::ProfileEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Specifier
)
Parameters:
in_HardwareIdentifierThe ID of the module from which the Profile event is generated.in_SpecifierThe parameter is transmitted as alarm specifier in the alarm telegram and is available as input parameter of the OB 57 call.
function PullOrPlugEvent¶
This API is used to trigger the Pull and Plug events. For Pull and Plug Events, the interrupt OB 83 �Pull or plug of modules� is executed.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::PullOrPlugEvent (
UINT16 in_HardwareIdentifier,
EPullOrPlugEventType in_PullOrPlugEventType,
UINT16% out_SequenceNumber
)
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the diagnosis item is sent.in_PullOrPlugEventTypeOne value from the list of pre-defined PullOrPlug event types. The event types are defined in the enumeration EPullOrPlugEventType.out_SequenceNumberUnique consecutive number assigned to every single alarm event.
function RackOrStationFaultEvent¶
This API is used to trigger the RackOrStationFault event OB (OB 86). This event is only supported for Decentral devices.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RackOrStationFaultEvent (
UINT16 in_HardwareIdentifier,
ERackOrStationFaultType in_EventType
)
Parameters:
in_HardwareIdentifierThe HW ID of the device from which the RackOrStationFault event is generated.in_EventTypeThe event Type value from the list of pre-defined RackOrStationFault types. The event types are defined in the ERackOrStationFaultType.
function Read¶
Reads the value of a PLC variable.
virtual SDataValue Siemens::Simatic::Simulation::Runtime::IInstance::Read (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadBool¶
Reads the value of a PLC variable.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::ReadBool (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadChar¶
Reads the value of a PLC variable.
virtual char Siemens::Simatic::Simulation::Runtime::IInstance::ReadChar (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadDouble¶
Reads the value of a PLC variable.
virtual double Siemens::Simatic::Simulation::Runtime::IInstance::ReadDouble (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadFloat¶
Reads the value of a PLC variable.
virtual float Siemens::Simatic::Simulation::Runtime::IInstance::ReadFloat (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadInt16¶
Reads the value of a PLC variable.
virtual INT16 Siemens::Simatic::Simulation::Runtime::IInstance::ReadInt16 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadInt32¶
Reads the value of a PLC variable.
virtual INT32 Siemens::Simatic::Simulation::Runtime::IInstance::ReadInt32 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadInt64¶
Reads the value of a PLC variable.
virtual INT64 Siemens::Simatic::Simulation::Runtime::IInstance::ReadInt64 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadInt8¶
Reads the value of a PLC variable.
virtual INT8 Siemens::Simatic::Simulation::Runtime::IInstance::ReadInt8 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadRecordDone¶
Completion of Asynchronous Reading of Data record.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::ReadRecordDone (
SDataRecordInfo in_RecordInfo,
array< BYTE >^ in_Data,
UINT32 in_Status
)
Parameters:
in_RecordInfoStruct SDataRecordInfo which provides the DataRecord info.in_DataByte array of the Data Record read with the length specified by DataSize value of SDataRecordInfo.in_StatusStatus of the job execution.
function ReadSignals [½]¶
Reads a list of signals at once. Only signals of the primitive data type are supported but the function is not type safe. The function is also taking care of the endianness.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::ReadSignals (
array< SDataValueByName >^% inout_Signals
)
Parameters:
inout_SignalsThe list of the signals to read.
function ReadSignals [2/2]¶
Reads a list of signals at once. Only signals of the primitive data type are supported but the function is not type safe. The function is also taking care of the endianness.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::ReadSignals (
array< SDataValueByNameWithCheck >^% inout_Signals,
bool% out_SignalsHaveChanged
)
Parameters:
inout_SignalsContains name, the value and the expected type of the PLC variable. If the expected type is UNSPECIFIC the expected type will be set to the stored type when the function returns successfully. The type STRUCT is not supported.out_SignalsHaveChangedWill return "true", if the value of at least one signal changed since the previous call.
function ReadString¶
Reads the value of a PLC string variable.
virtual System::String Siemens::Simatic::Simulation::Runtime::IInstance::ReadString (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC string variable to read.
function ReadUInt16¶
Reads the value of a PLC variable.
virtual UINT16 Siemens::Simatic::Simulation::Runtime::IInstance::ReadUInt16 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadUInt32¶
Reads the value of a PLC variable.
virtual UINT32 Siemens::Simatic::Simulation::Runtime::IInstance::ReadUInt32 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadUInt64¶
Reads the value of a PLC variable.
virtual UINT64 Siemens::Simatic::Simulation::Runtime::IInstance::ReadUInt64 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadUInt8¶
Reads the value of a PLC variable.
virtual UINT8 Siemens::Simatic::Simulation::Runtime::IInstance::ReadUInt8 (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadWChar¶
Reads the value of a PLC variable.
virtual WCHAR Siemens::Simatic::Simulation::Runtime::IInstance::ReadWChar (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC variable to read.
function ReadWString¶
Reads the value of a PLC wstring variable.
virtual System::String Siemens::Simatic::Simulation::Runtime::IInstance::ReadWString (
System::String^ in_Tag
)
Parameters:
in_TagThe name of the PLC wstring variable to read.
function RegisterOnDisplayDataChangedEvent¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnDisplayDataChangedEvent ()
function RegisterOnHardwareConfigChangedEvent¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnHardwareConfigChangedEvent ()
function RegisterOnIPAddressChangedEvent¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnIPAddressChangedEvent ()
function RegisterOnLedChangedEvent¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnLedChangedEvent ()
function RegisterOnOperatingStateChangedEvent¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnOperatingStateChangedEvent ()
function RegisterOnSoftwareConfigurationChangedEvent¶
Registers event signaled whenever a software changed event becomes signaled.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnSoftwareConfigurationChangedEvent ()
Returns:
ERuntimeErrorCode::OK: On success. Otherwise failure.¶
function RegisterOnSyncPointReachedEvent¶
When receiving the event, the registered event object is set to signaled state. There can be only one event object registered to the event. Registering a new one will automatically unregister the previous one.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RegisterOnSyncPointReachedEvent ()
function RetrieveStorage¶
Restores a virtual memory card from a .zip file. The virtual controller has to be in the operating state off.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RetrieveStorage (
System::String^ in_FullFileName
)
Parameters:
in_FullFileNameThe full file path to the .zip file. The path is based on the directories of the computer the instance is running on.
function Run [½]¶
Requests the virtual controller to switch into run mode.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::Run ()
function Run [2/2]¶
Requests the virtual controller to switch into run mode.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::Run (
UINT32 in_TimeOut_ms
)
Parameters:
in_TimeOut_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get noticed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_RUN }
function RunToNextSyncPoint [½]¶
When operating the virtual controller in the single step or extended single step operating mode the virtual controller will go into freeze state at the end of each cycle. With this function the next cycle will be triggered.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RunToNextSyncPoint ()
function RunToNextSyncPoint [2/2]¶
Extension to IInstance::RunToNextSyncPoint for bus synchronous mode.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::RunToNextSyncPoint (
UINT32 in_IoSystemId,
UINT64 in_BusTimeStamp_ns
)
Parameters:
in_IoSystemIdBus ID.in_BusTimeStamp_nsTimestamp in nanoseconds.
Exception:
SimulationRuntimeExceptionInvalid bus ID. Invalid S7-PLCSIM version. S7-PLCSIM version must be V4.0 or higher.
function SetCycleTimeMonitoringMode [½]¶
sets the CycleTimeMonitoring mode. A valid input CycleTimeMonitoring modes are Ignored,Downloaded or Specified.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::SetCycleTimeMonitoringMode (
ECycleTimeMonitoringMode in_CycleTimeMonitoringMode
)
function SetCycleTimeMonitoringMode [2/2]¶
sets the maximum cycle time in nanoseconds based on the CycleTimeMonitoring mode. A valid input is a value between 1000000 and 60,000,000,000. Changes of the value during runtime take effect at the cycle control point.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::SetCycleTimeMonitoringMode (
ECycleTimeMonitoringMode in_CycleTimeMonitoringMode,
INT64 in_MaxCycleTime_ns
)
function SetIPSuite¶
Sets the IP suite of a network interface of the virtual controller.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::SetIPSuite (
UINT32 in_InterfaceID,
SIPSuite4 in_IPSuite,
bool in_IsRemanent
)
Parameters:
in_InterfaceIDThe ID of the network interface.in_IPSuiteThe IP suite to be set to the network interface. The IP suite is containing the IP address, the subnet mask and the default gateway. If the communication interface is set to Softbus subnet mask the default gateway will be ignored.in_IsRemanentIf set to true, the IP suite will be restored after restarting the virtual controller. If the communication interface is set to Softbus this flag will be ignored.
function SetNetInterfaceMapping [⅓]¶
Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::SetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID,
UINT32 in_PCInterfaceIndex
)
Parameters:
in_PLCInterfaceIDID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)in_PCInterfaceIndexIndex of computer interface. If this value is 0, mapping will be deleted.
function SetNetInterfaceMapping [⅔]¶
Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::SetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID,
System::String^ in_PCInterfaceName
)
Parameters:
in_PLCInterfaceIDID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)in_PCInterfaceNameA user-friendly name for the computer interface.
function SetNetInterfaceMapping [3/3]¶
Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::SetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID,
SMACAddress in_MACAddressParam
)
Parameters:
in_PLCInterfaceIDID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)in_MACAddressParamHardware MAC address of the computer interface.
function StartProcessing¶
When operating the virtual controller in the timespan synchronized operating mode the virtual controller will go into freeze state at the cycle control point. This function will wake up the virtual controller. The virtual controller will now run for at least the requested time based on virtual time before going back into freeze state at the next cycle control point.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::StartProcessing (
INT64 in_MinimalTimeToRun_ns
)
Parameters:
in_MinimalTimeToRun_nsThe minimal virtual time in nanoseconds the virtual controller will run before going into freeze state.
function StatusEvent¶
This API is used to trigger the Status event OB (OB 55). Status-Events are supported only for modules on a decentral IO-system.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::StatusEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Specifier
)
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the Status event is sent.in_SpecifierThe parameter is transmitted as alarm specifier in the alarm telegram and is available as input parameter of the OB 55 call.
function Stop [½]¶
Requests the virtual controller to switch into stop mode.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::Stop ()
function Stop [2/2]¶
Requests the virtual controller to switch into stop mode.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::Stop (
UINT32 in_TimeOut_ms
)
Parameters:
in_TimeOut_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get noticed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { EOperatingState.Stop }
function UnregisterInstance¶
Unregisters this instance from the Runtime Manager.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterInstance ()
function UnregisterOnDisplayDataChangedEvent¶
Unregisters the event object.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnDisplayDataChangedEvent ()
function UnregisterOnHardwareConfigChangedEvent¶
Unregisters the event object.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnHardwareConfigChangedEvent ()
function UnregisterOnIPAddressChangedEvent¶
Unregisters the event object.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnIPAddressChangedEvent ()
function UnregisterOnLedChangedEvent¶
Unregisters the event object.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnLedChangedEvent ()
Unregisters the event object.
function UnregisterOnOperatingStateChangedEvent¶
Unregisters the event object.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnOperatingStateChangedEvent ()
function UnregisterOnSoftwareConfigurationChangedEvent¶
Unregisters the software changed event.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnSoftwareConfigurationChangedEvent ()
Returns:
ERuntimeErrorCode::OK: On success. Otherwise failure.¶
ERuntimeErrorCode::DoesNotExist: No event registered.¶
function UnregisterOnSyncPointReachedEvent¶
Unregisters the event object.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UnregisterOnSyncPointReachedEvent ()
function UpdateEvent¶
This API is used to trigger the Update event OB (OB 56). Update events are supported only for modules on a decentral IO-system.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UpdateEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Specifier
)
Parameters:
in_HardwareIdentifierThe ID of the module from which the Update event is generated.in_SpecifierThe parameter is transmitted as alarm specifier in the alarm telegram and is available as input parameter of the OB 56 call.
function UpdateTagList [¼]¶
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UpdateTagList ()
function UpdateTagList [2/4]¶
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UpdateTagList (
ETagListDetails in_TagListDetails
)
Parameters:
in_TagListDetailsAny combination of the following four areas: IO: Inputs and Outputs M: Marker CT: Counter and Timer DB: Data blocks e.g. IOM will only read the tags from the input/output and marker area. The default value is IOMCTDB.
function UpdateTagList [¾]¶
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UpdateTagList (
ETagListDetails in_TagListDetails,
bool in_IsHMIVisibleOnly
)
Parameters:
in_TagListDetailsAny combination of the following four areas: IO: Inputs and Outputs M: Marker CT: Counter and Timer DB: Data blocks e.g. IOM will only read the tags from the input/output and marker area. The default value is IOMCTDB.in_IsHMIVisibleOnlyIf "true", only tags marked as "HMI Visible" will be read. The default value is "false".
function UpdateTagList [4/4]¶
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::UpdateTagList (
ETagListDetails in_TagListDetails,
bool in_IsHMIVisibleOnly,
System::String^ in_DataBlockFilterList
)
Parameters:
in_TagListDetailsAny combination of the following four areas: IO: Inputs and Outputs M: Marker CT: Counter and Timer DB: Data blocks e.g. IOM will only read the tags from the input/output and marker area. The default value is IOMCTDB.in_IsHMIVisibleOnlyIf "true", only tags marked as "HMI Visible" will be read. The default value is "false".in_DataBlockFilterListA string including the names of all data blocks that should be available in the tag entry storage.
function WaitForOnDisplayDataChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnDisplayDataChangedEvent ()
function WaitForOnDisplayDataChangedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnDisplayDataChangedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function WaitForOnHardwareConfigChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnHardwareConfigChangedEvent ()
function WaitForOnHardwareConfigChangedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnHardwareConfigChangedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function WaitForOnIPAddressChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnIPAddressChangedEvent ()
function WaitForOnIPAddressChangedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnIPAddressChangedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function WaitForOnLedChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnLedChangedEvent ()
function WaitForOnLedChangedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnLedChangedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function WaitForOnOperatingStateChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnOperatingStateChangedEvent ()
function WaitForOnOperatingStateChangedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnOperatingStateChangedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function WaitForOnSoftwareConfigurationChangedEvent [½]¶
Like WaitForOnSoftwareConfigurationChangedEvent(const UINT32) without timeout.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnSoftwareConfigurationChangedEvent ()
function WaitForOnSoftwareConfigurationChangedEvent [2/2]¶
Wait for software changed event to be signaled.
virtual bool Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnSoftwareConfigurationChangedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_ms[in] Timeout in milliseconds. IfINFINITE, no timeout can occur.
Returns:
ERuntimeErrorCode::OK: Event received.¶
ERuntimeErrorCode::Timeout: Timeout occurred.¶
ERuntimeErrorCode::DoesNotExist: No event registered.¶
function WaitForOnSyncPointReachedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual SOnSyncPointReachedResult Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnSyncPointReachedEvent ()
function WaitForOnSyncPointReachedEvent [2/2]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual SOnSyncPointReachedResult Siemens::Simatic::Simulation::Runtime::IInstance::WaitForOnSyncPointReachedEvent (
UINT32 in_Time_ms
)
Parameters:
in_Time_msThe value for the timeout limit in milliseconds.
function Write¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::Write (
System::String^ in_Tag,
SDataValue in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value and the expected type of the PLC variable to write. The type UNSPECIFIC and STRUCT are not supported.
function WriteBool¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteBool (
System::String^ in_Tag,
bool in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteChar¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteChar (
System::String^ in_Tag,
char in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteDouble¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteDouble (
System::String^ in_Tag,
double in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteFloat¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteFloat (
System::String^ in_Tag,
float in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt16¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteInt16 (
System::String^ in_Tag,
INT16 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt32¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteInt32 (
System::String^ in_Tag,
INT32 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt64¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteInt64 (
System::String^ in_Tag,
INT64 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt8¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteInt8 (
System::String^ in_Tag,
INT8 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteRecordDone¶
Completion of Asynchronous writing of Data record.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteRecordDone (
SDataRecordInfo in_RecordInfo,
UINT32 in_Status
)
Parameters:
in_RecordInfoStruct SDataRecordInfo which provides the DataRecord info.in_StatusStatus of the job execution.
function WriteSignals¶
Writes multiple signals within a single API call.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteSignals (
array< SDataValueByName >^% inout_Signals
)
Parameters:
inout_SignalsContains the name, value and the expected type of the PLC variable to write. The type UNSPECIFIC and STRUCT are not supported.
function WriteString¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteString (
System::String^ in_Tag,
System::String^ in_Value
)
Parameters:
in_TagThe name of the PLC wstring string variable to write.in_ValueContains the value of the PLC string variable to write.
function WriteUInt16¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteUInt16 (
System::String^ in_Tag,
UINT16 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteUInt32¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteUInt32 (
System::String^ in_Tag,
UINT32 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteUInt64¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteUInt64 (
System::String^ in_Tag,
UINT64 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteUInt8¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteUInt8 (
System::String^ in_Tag,
UINT8 in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteWChar¶
Writes the value of a PLC variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteWChar (
System::String^ in_Tag,
WCHAR in_Value
)
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteWString¶
Writes the value of a PLC wstring variable.
virtual void Siemens::Simatic::Simulation::Runtime::IInstance::WriteWString (
System::String^ in_Tag,
System::String^ in_Value
)
Parameters:
in_TagThe name of the PLC wstring variable to write.in_ValueContains the value of the PLC wstring variable to write.
function set [⅛]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
ECPUType in_Value
)
function set [2/8]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
System::String^
)
function set [⅜]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
bool
)
function set [4/8]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
double
)
function set [⅝]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
INT64
)
function set [6/8]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
System::DateTime
)
function set [⅞]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
EOperatingMode
)
function set [⅜]¶
void Siemens::Simatic::Simulation::Runtime::IInstance::set (
bool
)