The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
SIMATIC S7-PLCSIM Advanced Share llms optimized content

Efficiently simulate SIMATIC S7 controllers with S7-PLCSIM Advanced. Test, debug, and optimize your control programs without using physical hardware.

Class IInstance

ClassList > IInstance

  • #include <SimulationRuntimeApi.h>

Inherits the following classes: IBaseInterface

Public Functions

TypeName
virtual ERuntimeErrorCodeAlarmNotification (UINT16 in_HardwareIdentifier, UINT16 in_ModuleState, UINT16 in_NumberOfDiagnosisEvents, SDiagExtChannelDescription * in_ArrayOfDiagnosisEvents, UINT16 * out_SequenceNumber) = 0
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 ERuntimeErrorCodeArchiveStorage (WCHAR * in_ArchiveStorageFile) = 0
Stores the virtual memory card in a .zip file. The virtual controller has to be in the operating state off.
virtual ERuntimeErrorCodeCheckNetInterfaceMapping () = 0
Check for valid network interface mapping, so instance can be started. All already running instances on PC are checked for possible duplicate mappings. Also checks for valid bindings on PC network interfaces.
virtual ERuntimeErrorCodeCleanupStoragePath () = 0
Cleans up the storage folder. The controller must be in operational state OFF.
virtual ERuntimeErrorCodeCreateConfigurationFile (WCHAR * in_FullFileName) = 0
Writes all taglist entries from the taglist storage into an XML file.
virtual ERuntimeErrorCodeDisplayKeyPress (EDisplayKey keyId) = 0
Interacts with the selected button on the display.
virtual UINT32GetAreaSize (EArea in_Area) = 0
Returns the size in bytes of the area. Returns 0 if the function fails.
virtual voidGetArticleNumber (WCHAR * out_ArticleNumber) = 0
Returns the article number type of the instance.
virtual ECPUTypeGetCPUType () = 0
Returns the CPU type of the instance.
virtual ECommunicationInterfaceGetCommunicationInterface () = 0
Returns the communication interface of the virtual controller. A change of the communication interface will only happen when the controller is restarted. All instances that are started have to use the same communication interface. PowerOn will be prevented, if another communication interface is selected, than the one that other running instances are using.
virtual ERuntimeErrorCodeGetConfiguredProcessEvents (SConfiguredProcessEvents * inout_ProcessEvents, UINT16 * out_EventsCount) = 0
The API GetConfiguredProcessEvents can be used for reading the configuration of the downloaded process events at runtime.
virtual UIPGetControllerIP () = 0
Returns a configured IP address of the instance.
virtual UIPGetControllerIP (UINT32 in_Index) = 0
Returns a configured IP address of the instance.
virtual UINT32GetControllerIPCount () = 0
Returns the amount of configured IP addresses of the virtual controller. Returns 0 if the function fails.
virtual SIPSuite4GetControllerIPSuite4 () = 0
Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0.
virtual SIPSuite4GetControllerIPSuite4 (UINT32 in_Index) = 0
Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0.
virtual ERuntimeErrorCodeGetControllerName (WCHAR inout_Name, UINT32 in_ArrayLength) = 0
Returns the downloaded controller name of the virtual controller.
virtual ERuntimeErrorCodeGetControllerShortDesignation (WCHAR inout_ShortDesignation, UINT32 in_ArrayLength) = 0
Returns the downloaded short designation of the virtual controller.
virtual ERuntimeErrorCodeGetCycleTimeMonitoringMode (ECycleTimeMonitoringMode * out_CycleTimeMonitoringMode, INT64 * out_MaxCycleTime_ns) = 0
Gets the operating mode of the virtual controller.
virtual ERuntimeErrorCodeGetDisplayData (SDisplayData & displayData) = 0
Gets the data of the display and writes it into the given Struct. The struct includes then the data and the length of the data.
virtual INT32GetID () = 0
Returns the ID of the instance. The ID is assigned by the Runtime Manager when registering the instance.
virtual SInstanceInfoGetInfo () = 0
Returns a struct providing information about the instance.
virtual ERuntimeErrorCodeGetLicenseStatus () = 0
Returns information about whether a Trial License is currently in use.
virtual ERuntimeErrorCodeGetName (WCHAR inout_Name, UINT32 in_ArrayLength) = 0
Returns the name of the instance.
virtual INT32GetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID) = 0
Get the interface index of PC interface to which specified PLC interface is mapped.
virtual EOperatingModeGetOperatingMode () = 0
Gets the operating mode of the virtual controller.
virtual EOperatingStateGetOperatingState () = 0
Returns the operating state of the virtual controller.
virtual INT64GetOverwrittenMinimalCycleTime_ns () = 0
Gets the overwritten minimal cycle time in nanoseconds used in the extended single-step operating mode.
virtual doubleGetScaleFactor () = 0
Gets the scale factor of the virtual clock.
virtual ERuntimeErrorCodeGetStoragePath (WCHAR inout_StoragePath, UINT32 in_ArrayLength) = 0
Returns the full path of the directory the instance is storing its data.
virtual ERuntimeErrorCodeGetStrictMotionTiming (bool * enabled) = 0
Get instance's current strict motion timing setting.
virtual SYSTEMTIMEGetSystemTime () = 0
Returns the virtual system time of the virtual controller. Returns an empty struct if the function fails.
virtual UINT32GetTagInfoCount () = 0
Returns the amount of entries of the taglist storage. Returns 0 if the function fails.
virtual ERuntimeErrorCodeGetTagInfos (UINT32 in_BufferLength, STagInfo * inout_TagInfos, UINT32 * out_TagCount) = 0
Get a list of all tags.
virtual ERuntimeErrorCodeGetTagListStatus (ETagListDetails * out_TagListDetails, bool * out_IsHMIVisibleOnly) = 0
Returns the current update state of the taglist storage. "inout_TagListDetails" is "NONE" if the list needs to be updated.
virtual ERuntimeErrorCodeHasDisplay (bool & hasDisplay) = 0
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 boolIsSendSyncEventInDefaultModeEnabled () = 0
Returns the status of the SendSyncEventInDefaultMode flag. Returns false if the function fails.
virtual ERuntimeErrorCodeMemoryReset () = 0
Shuts down the virtual controller, closes its process and restarts it.
virtual ERuntimeErrorCodeMemoryReset (UINT32 in_TimeOut_ms) = 0
Shuts down the virtual controller, closes its process and restarts it.
virtual ERuntimeErrorCodePowerOff () = 0
Shuts down the virtual controller and closes its process.
virtual ERuntimeErrorCodePowerOff (UINT32 in_TimeOut_ms) = 0
Shuts down the virtual controller and closes its process.
virtual ERuntimeErrorCodePowerOn () = 0
Creates the process of the simulation runtime instance and starts the firmware of the virtual controller.
virtual ERuntimeErrorCodePowerOn (UINT32 in_TimeOut_ms) = 0
Creates the process of the simulation runtime instance and starts the firmware of the virtual controller.
virtual ERuntimeErrorCodeProcessEvent (UINT16 in_HardwareIdentifier, UINT16 in_Channel, EProcessEventType in_ProcessEventType, UINT16 * out_SequenceNumber) = 0
This API is used to trigger the process event interrupt.
virtual ERuntimeErrorCodeProfileEvent (UINT16 in_HardwareIdentifier, UINT16 in_Specifier) = 0
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 ERuntimeErrorCodePullOrPlugEvent (UINT16 in_HardwareIdentifier, EPullOrPlugEventType in_PullOrPlugEventType, UINT16 * out_SequenceNumber) = 0
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 ERuntimeErrorCodeRackOrStationFaultEvent (UINT16 in_HardwareIdentifier, ERackOrStationFaultType in_EventType) = 0
This API is used to trigger the RackOrStationFault event OB (OB 86). This event is only supported for Decentral devices.
virtual ERuntimeErrorCodeRead (WCHAR * in_Tag, SDataValue * inout_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadBit (EArea in_Area, UINT32 in_Offset, UINT8 in_Bit, bool * out_Value) = 0
Reads a single bit from the area.
virtual ERuntimeErrorCodeReadBool (WCHAR * in_Tag, bool * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadByte (EArea in_Area, UINT32 in_Offset, BYTE * out_Value) = 0
Reads a single byte from the area.
virtual ERuntimeErrorCodeReadBytes (EArea in_Area, UINT32 in_Offset, UINT32 in_BytesToRead, UINT32 * out_BytesRead, BYTE inout_Values) = 0
Reads an array of bytes from the area.
virtual ERuntimeErrorCodeReadChar (WCHAR * in_Tag, char * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadDouble (WCHAR * in_Tag, double * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadFloat (WCHAR * in_Tag, float * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadInt16 (WCHAR * in_Tag, INT16 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadInt32 (WCHAR * in_Tag, INT32 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadInt64 (WCHAR * in_Tag, INT64 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadInt8 (WCHAR * in_Tag, INT8 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadRecordDone (SDataRecordInfo in_RecordInfo, BYTE * in_Data, UINT32 in_Status) = 0
Completion of asynchronous reading of data record.
virtual ERuntimeErrorCodeReadSignals (EArea in_Area, SDataValueByAddress * inout_Signals, UINT32 in_SignalCount, bool in_ValidateAddressTag=false) = 0
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 ERuntimeErrorCodeReadSignals (SDataValueByName * inout_Signals, UINT32 in_SignalCount) = 0
Reads multiple signals within a single API call.
virtual ERuntimeErrorCodeReadSignals (EArea in_Area, SDataValueByAddressWithCheck * inout_Signals, UINT32 in_SignalCount, bool * out_SignalsHaveChanged, bool in_ValidateAddressTag=false) = 0
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 ERuntimeErrorCodeReadSignals (SDataValueByNameWithCheck * inout_Signals, UINT32 in_SignalCount, bool * out_SignalsHaveChanged) = 0
Reads multiple signals within a single API call.
virtual ERuntimeErrorCodeReadString (const WCHAR * in_Tag, CHAR * out_Value, const int in_BufferSize, int * out_CharsRead) = 0
Reads the value of a PLC string variable.
virtual ERuntimeErrorCodeReadUInt16 (WCHAR * in_Tag, UINT16 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadUInt32 (WCHAR * in_Tag, UINT32 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadUInt64 (WCHAR * in_Tag, UINT64 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadUInt8 (WCHAR * in_Tag, UINT8 * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadWChar (WCHAR * in_Tag, WCHAR * out_Value) = 0
Reads the value of a PLC variable.
virtual ERuntimeErrorCodeReadWString (const WCHAR * in_Tag, WCHAR * out_Value, const int in_BufferSize, int * out_CharsRead) = 0
Reads the value of a PLC wstring variable.
virtual voidRegisterOnAlarmNotificationDoneCallback (EventCallback_II_SREC_ST_UINT32_UINT32 in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnDataRecordReadCallback (EventCallback_II_SREC_ST_SDRI in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. Only one callback function can be registered for the event. Registering a new callback function causes the previous callback function to be deleted.
virtual voidRegisterOnDataRecordWriteCallback (EventCallback_II_SREC_ST_SDRI_BYTE in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. Only one callback function can be registered for the event. Registering a new callback function causes the previous callback function to be deleted.
virtual voidRegisterOnDisplayDataChangedCallback (EventCallback_II_SREC_ST in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnDisplayDataChangedEvent () = 0
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 voidRegisterOnDisplayDataChangedEvent (HANDLE * in_Event) = 0
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 voidRegisterOnHardwareConfigChangedCallback (EventCallback_II_SREC_ST in_CallbackFunction) = 0
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnHardwareConfigChangedEvent (HANDLE * in_Event) = 0
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 voidRegisterOnHardwareConfigChangedEvent () = 0
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 voidRegisterOnIPAddressChangedCallback (EventCallback_II_SREC_ST_UINT8_SIP in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnIPAddressChangedEvent () = 0
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 voidRegisterOnIPAddressChangedEvent (HANDLE * in_Event) = 0
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 voidRegisterOnLedChangedCallback (EventCallback_II_SREC_ST_SRLT_SRLM in_CallbackFunction) = 0
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnLedChangedEvent (HANDLE * in_Event) = 0
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 voidRegisterOnLedChangedEvent () = 0
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 voidRegisterOnOperatingStateChangedCallback (EventCallback_II_SREC_ST_SROS_SROS in_CallbackFunction) = 0
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnOperatingStateChangedEvent (HANDLE * in_Event) = 0
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 voidRegisterOnOperatingStateChangedEvent () = 0
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 voidRegisterOnProcessEventDoneCallback (EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32 in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnProfileEventDoneCallback (EventCallback_II_SREC_ST_UINT32 in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnPullOrPlugEventDoneCallback (EventCallback_II_SREC_ST_UINT32_EPPET_UINT32 in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnRackOrStationFaultEventCallback (EventCallback_II_SREC_ST_UINT32_ERSFET in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnSoftwareConfigurationChangedCallback (EventCallback_II_SSCCP in_CallbackFunction) = 0
Registers callback called whenever a software changed event becomes signaled.
virtual voidRegisterOnSoftwareConfigurationChangedEvent () = 0
virtual voidRegisterOnSoftwareConfigurationChangedEvent (HANDLE * in_Event) = 0
Registers event signaled whenever a software changed event becomes signaled.
virtual voidRegisterOnStatusEventDoneCallback (EventCallback_II_SREC_ST_UINT32 in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnSyncPointReachedCallback (EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32 in_CallbackFunction) = 0
When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual voidRegisterOnSyncPointReachedEvent () = 0
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 voidRegisterOnSyncPointReachedEvent (HANDLE * in_Event) = 0
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 voidRegisterOnUpdateEventDoneCallback (EventCallback_II_SREC_ST_UINT32 in_CallbackFunction) = 0
When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.
virtual ERuntimeErrorCodeRetrieveStorage (WCHAR * in_ArchiveFile) = 0
Restores a virtual memory card from a .zip file. The virtual controller has to be in the operating state off.
virtual ERuntimeErrorCodeRun () = 0
Requests the virtual controller to switch into run mode.
virtual ERuntimeErrorCodeRun (UINT32 in_TimeOut_ms) = 0
Requests the virtual controller to switch into run mode.
virtual ERuntimeErrorCodeRunToNextSyncPoint () = 0
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 ERuntimeErrorCodeRunToNextSyncPoint (UINT32 in_IoSystemId, UINT64 in_BusTimeStamp_ns) = 0
Extension to IInstance::RunToNextSyncPoint for bus synchronous mode.
virtual voidSetCPUType (ECPUType in_CPUType) = 0
Sets the CPU type of the instance.
virtual ERuntimeErrorCodeSetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode, INT64 in_MaxCycleTime_ns) = 0
Sets the max cycle time based on the ECycleTimeMonitoringMode value
virtual ERuntimeErrorCodeSetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode) = 0
Sets the ECycleTimeMonitoringMode value
virtual ERuntimeErrorCodeSetIPSuite (UINT32 in_InterfaceID, SIPSuite4 in_IPSuite, bool in_IsRemanent) = 0
Sets the IP suite of a network interface of the virtual controller.
virtual ERuntimeErrorCodeSetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID, DWORD in_PCInterfaceIndex) = 0
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 ERuntimeErrorCodeSetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID, const WCHAR * in_PCInterfaceName) = 0
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 ERuntimeErrorCodeSetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID, const SMACAddress * in_MACAddressParam) = 0
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 voidSetOperatingMode (EOperatingMode in_OperatingMode) = 0
Sets the operating mode of the virtual controller. Changes of the value during runtime take effect on the cycle control point.
virtual ERuntimeErrorCodeSetOverwrittenMinimalCycleTime_ns (INT64 in_CycleTime_ns) = 0
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 on the cycle control point.
virtual ERuntimeErrorCodeSetScaleFactor (double in_Value) = 0
Sets the scale factor of the virtual clock. A valid input value X is a value between 0 and 1000. The default value is 1.0. If the value is smaller than 1 the virtual time of the virtual controller runs X times slower than the wall clock time. If the value is bigger than 1 the virtual time of the virtual controller runs X times faster than the wall clock time. Changes of the value during runtime take effect at the cycle control point.
virtual ERuntimeErrorCodeSetSendSyncEventInDefaultModeEnabled (bool in_Enable) = 0
Sets the SendSyncEventInDefault mode. If the mode is set, the OnSyncPointReached event is triggered after every cycle end in the operating mode "Default".
virtual ERuntimeErrorCodeSetStoragePath (WCHAR * in_StoragePath) = 0
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 ERuntimeErrorCodeSetStrictMotionTiming (bool enable) = 0
Enable or disable strict motion timing.
virtual ERuntimeErrorCodeSetSystemTime (SYSTEMTIME in_SystemTime) = 0
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 ERuntimeErrorCodeStartProcessing (INT64 in_MinimalTimeToRun_ns) = 0
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 ERuntimeErrorCodeStatusEvent (UINT16 in_HardwareIdentifier, UINT16 in_Specifier) = 0
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 ERuntimeErrorCodeStop () = 0
Requests the virtual controller to switch into stop mode.
virtual ERuntimeErrorCodeStop (UINT32 in_TimeOut_ms) = 0
Requests the virtual controller to switch into stop mode.
virtual ERuntimeErrorCodeUnregisterInstance () = 0
Unregisters this instance from the Runtime Manager.
virtual voidUnregisterOnAlarmNotificationDoneCallback (EventCallback_II_SREC_ST_UINT32_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual voidUnregisterOnDataRecordReadCallback (EventCallback_II_SREC_ST_SDRI in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnDataRecordWriteCallback (EventCallback_II_SREC_ST_SDRI_BYTE in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnDisplayDataChangedCallback (EventCallback_II_SREC_ST in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnDisplayDataChangedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnHardwareConfigChangedCallback (EventCallback_II_SREC_ST in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual voidUnregisterOnHardwareConfigChangedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnIPAddressChangedCallback (EventCallback_II_SREC_ST_UINT8_SIP in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnIPAddressChangedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnLedChangedCallback (EventCallback_II_SREC_ST_SRLT_SRLM in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual voidUnregisterOnLedChangedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnOperatingStateChangedCallback (EventCallback_II_SREC_ST_SROS_SROS in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual voidUnregisterOnOperatingStateChangedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnProcessEventDoneCallback (EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnProfileEventDoneCallback (EventCallback_II_SREC_ST_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnPullOrPlugEventDoneCallback (EventCallback_II_SREC_ST_UINT32_EPPET_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual voidUnregisterOnRackOrStationFaultEventCallback (EventCallback_II_SREC_ST_UINT32_ERSFET in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnSoftwareConfigurationChangedCallback (EventCallback_II_SSCCP in_CallbackFunction=nullptr) = 0
Unregisters software changed callback.
virtual voidUnregisterOnSoftwareConfigurationChangedEvent () = 0
Unregisters the software changed event.
virtual voidUnregisterOnStatusEventDoneCallback (EventCallback_II_SREC_ST_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual voidUnregisterOnSyncPointReachedCallback (EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.
virtual voidUnregisterOnSyncPointReachedEvent () = 0
Unregisters the event object.
virtual voidUnregisterOnUpdateEventDoneCallback (EventCallback_II_SREC_ST_UINT32 in_CallbackFunction=nullptr) = 0
Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.
virtual ERuntimeErrorCodeUpdateEvent (UINT16 in_HardwareIdentifier, UINT16 in_Specifier) = 0
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 ERuntimeErrorCodeUpdateTagList (ETagListDetails in_TagListDetails, bool in_IsHMIVisibleOnly) = 0
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual ERuntimeErrorCodeUpdateTagList (ETagListDetails in_TagListDetails) = 0
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual ERuntimeErrorCodeUpdateTagList () = 0
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual ERuntimeErrorCodeUpdateTagList (ETagListDetails in_TagListDetails, bool in_IsHMIVisibleOnly, WCHAR * in_DataBlockFilterList) = 0
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual boolWaitForOnDisplayDataChangedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnDisplayDataChangedEvent (UINT32 in_Time_ms) = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnHardwareConfigChangedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnHardwareConfigChangedEvent (UINT32 in_Time_ms) = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnIPAddressChangedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnIPAddressChangedEvent (UINT32 in_Time_ms) = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnLedChangedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnLedChangedEvent (UINT32 in_Time_ms) = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnOperatingStateChangedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnOperatingStateChangedEvent (UINT32 in_Time_ms) = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual boolWaitForOnSoftwareConfigurationChangedEvent () = 0
Wait for software changed event to be signaled.
virtual boolWaitForOnSoftwareConfigurationChangedEvent (UINT32 in_Time_ms) = 0
Wait for software changed event to be signaled.
virtual SOnSyncPointReachedResultWaitForOnSyncPointReachedEvent () = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual SOnSyncPointReachedResultWaitForOnSyncPointReachedEvent (UINT32 in_Time_ms) = 0
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual ERuntimeErrorCodeWrite (WCHAR * in_SymbolTag, SDataValue in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteBit (EArea in_Area, UINT32 in_Offset, UINT8 in_Bit, bool in_Value) = 0
Writes a single bit to the area.
virtual ERuntimeErrorCodeWriteBool (WCHAR * in_Tag, bool in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteByte (EArea in_Area, UINT32 in_Offset, BYTE in_Value) = 0
Writes a single byte to the area.
virtual ERuntimeErrorCodeWriteBytes (EArea in_Area, UINT32 in_Offset, UINT32 in_BytesToWrite, UINT32 * out_BytesWritten, BYTE in_Values) = 0
Writes an array of bytes to the area.
virtual ERuntimeErrorCodeWriteChar (WCHAR * in_Tag, char in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteDouble (WCHAR * in_Tag, double in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteFloat (WCHAR * in_Tag, float in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteInt16 (WCHAR * in_Tag, INT16 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteInt32 (WCHAR * in_Tag, INT32 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteInt64 (WCHAR * in_Tag, INT64 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteInt8 (WCHAR * in_Tag, INT8 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteRecordDone (SDataRecordInfo in_RecordInfo, UINT32 in_Status) = 0
Completion of asynchronous writing of data record.
virtual ERuntimeErrorCodeWriteSignals (EArea in_Area, SDataValueByAddress * inout_Signals, UINT32 in_SignalCount, bool in_ValidateAddressTag=false) = 0
Writes 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 ERuntimeErrorCodeWriteSignals (SDataValueByName * inout_Signals, UINT32 in_SignalCount) = 0
Writes multiple signals within a single API call.
virtual ERuntimeErrorCodeWriteString (const WCHAR * in_Tag, const CHAR * in_Value, const int in_CharsToWrite) = 0
virtual ERuntimeErrorCodeWriteUInt16 (WCHAR * in_Tag, UINT16 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteUInt32 (WCHAR * in_Tag, UINT32 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteUInt64 (WCHAR * in_Tag, UINT64 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteUInt8 (WCHAR * in_Tag, UINT8 in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteWChar (WCHAR * in_Tag, WCHAR in_Value) = 0
Writes the value of a PLC variable.
virtual ERuntimeErrorCodeWriteWString (const WCHAR * in_Tag, const WCHAR * in_Value, const int in_CharsToWrite) = 0
Writes the value of a PLC wstring variable.
virtual~IInstance ()

Public Functions inherited from IBaseInterface

See IBaseInterface

TypeName
virtual~IBaseInterface ()

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 ERuntimeErrorCode IInstance::AlarmNotification (
    UINT16 in_HardwareIdentifier,
    UINT16 in_ModuleState,
    UINT16 in_NumberOfDiagnosisEvents,
    SDiagExtChannelDescription * in_ArrayOfDiagnosisEvents,
    UINT16 * out_SequenceNumber
) = 0

Parameters:

  • in_HardwareIdentifier The ID of the module or submodule from which the diagnosis item is sent.
  • in_ModuleState State of the Module. Accepted states are: DMODULE_STATE_OK, DMODULE_STATE_ERROR, DMODULE_STATE_MAINT_DEMANDED, DMODULE_STATE_MAINT_REQUIRED.
  • in_NumberOfDiagnosisEvents Number of Diagnosis Events sent to the CPU.
  • in_ArrayOfDiagnosisEvents Pointer to an array of diagnosis items. The array must match with the number of diagnosis items. It may be NULL-Pointer.
  • out_SequenceNumber Unique 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 ERuntimeErrorCode IInstance::ArchiveStorage (
    WCHAR * in_ArchiveStorageFile
) = 0

Parameters:

  • in_ArchiveStorageFile The 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 checks for valid bindings on PC network interfaces.

virtual ERuntimeErrorCode IInstance::CheckNetInterfaceMapping () = 0

function CleanupStoragePath

Cleans up the storage folder. The controller must be in operational state OFF.

virtual ERuntimeErrorCode IInstance::CleanupStoragePath () = 0

function CreateConfigurationFile

Writes all taglist entries from the taglist storage into an XML file.

virtual ERuntimeErrorCode IInstance::CreateConfigurationFile (
    WCHAR * in_FullFileName
) = 0

Parameters:

  • in_FullFileName The full filename of the XML file ('path' + 'filename' + 'file extension').

function DisplayKeyPress

Interacts with the selected button on the display.

virtual ERuntimeErrorCode IInstance::DisplayKeyPress (
    EDisplayKey keyId
) = 0

Parameters:

  • keyId The kind of the key press to set.

function GetAreaSize

Returns the size in bytes of the area. Returns 0 if the function fails.

virtual UINT32 IInstance::GetAreaSize (
    EArea in_Area
) = 0

Parameters:

  • in_Area The area to get the size from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.

function GetArticleNumber

Returns the article number type of the instance.

virtual void IInstance::GetArticleNumber (
    WCHAR * out_ArticleNumber
) = 0

function GetCPUType

Returns the CPU type of the instance.

virtual ECPUType IInstance::GetCPUType () = 0

function GetCommunicationInterface

Returns the communication interface of the virtual controller. A change of the communication interface will only happen when the controller is restarted. All instances that are started have to use the same communication interface. PowerOn will be prevented, if another communication interface is selected, than the one that other running instances are using.

virtual ECommunicationInterface IInstance::GetCommunicationInterface () = 0

function GetConfiguredProcessEvents

The API GetConfiguredProcessEvents can be used for reading the configuration of the downloaded process events at runtime.

virtual ERuntimeErrorCode IInstance::GetConfiguredProcessEvents (
    SConfiguredProcessEvents * inout_ProcessEvents,
    UINT16 * out_EventsCount
) = 0

Parameters:

  • inout_ProcessEvents Pointer or reference to user-allocated memory which provides the array of downloaded Configured Process events.
  • out_EventsCount Pointer or reference to a variable which provides the count of configured process events.

function GetControllerIP [½]

Returns a configured IP address of the instance.

virtual UIP IInstance::GetControllerIP () = 0

function GetControllerIP [2/2]

Returns a configured IP address of the instance.

virtual UIP IInstance::GetControllerIP (
    UINT32 in_Index
) = 0

Parameters:

  • in_Index The index of the IP address to get. The index has to be smaller than the result returned by GetControllerIPCount(). The default value is 0.

function GetControllerIPCount

Returns the amount of configured IP addresses of the virtual controller. Returns 0 if the function fails.

virtual UINT32 IInstance::GetControllerIPCount () = 0

function GetControllerIPSuite4 [½]

Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0.

virtual SIPSuite4 IInstance::GetControllerIPSuite4 () = 0

function GetControllerIPSuite4 [2/2]

Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0.

virtual SIPSuite4 IInstance::GetControllerIPSuite4 (
    UINT32 in_Index
) = 0

Parameters:

  • in_Index The index of the IP address you want to receive. The index must be less than the value you receive from GetControllerIPCount(). The default setting is 0.

function GetControllerName

Returns the downloaded controller name of the virtual controller.

virtual ERuntimeErrorCode IInstance::GetControllerName (
    WCHAR inout_Name,
    UINT32 in_ArrayLength
) = 0

Parameters:

  • inout_Name A user allocated buffer for the device name.
  • in_ArrayLength The length of the buffer.

function GetControllerShortDesignation

Returns the downloaded short designation of the virtual controller.

virtual ERuntimeErrorCode IInstance::GetControllerShortDesignation (
    WCHAR inout_ShortDesignation,
    UINT32 in_ArrayLength
) = 0

Parameters:

  • inout_ShortDesignation A user allocated buffer for the short designation.
  • in_ArrayLength The length of the buffer.

function GetCycleTimeMonitoringMode

Gets the operating mode of the virtual controller.

virtual ERuntimeErrorCode IInstance::GetCycleTimeMonitoringMode (
    ECycleTimeMonitoringMode * out_CycleTimeMonitoringMode,
    INT64 * out_MaxCycleTime_ns
) = 0

function GetDisplayData

Gets the data of the display and writes it into the given Struct. The struct includes then the data and the length of the data.

virtual ERuntimeErrorCode IInstance::GetDisplayData (
    SDisplayData & displayData
) = 0

Parameters:

  • displayData The object where the display data should be displayed.

function GetID

Returns the ID of the instance. The ID is assigned by the Runtime Manager when registering the instance.

virtual INT32 IInstance::GetID () = 0

function GetInfo

Returns a struct providing information about the instance.

virtual SInstanceInfo IInstance::GetInfo () = 0

function GetLicenseStatus

Returns information about whether a Trial License is currently in use.

virtual ERuntimeErrorCode IInstance::GetLicenseStatus () = 0

function GetName

Returns the name of the instance.

virtual ERuntimeErrorCode IInstance::GetName (
    WCHAR inout_Name,
    UINT32 in_ArrayLength
) = 0

Parameters:

  • inout_Name A user allocated buffer for the instance name. The array length should be at least as big as DINSTANCE_NAME_MAX_LENGTH.
  • in_ArrayLength The length of the array in wide characters.

function GetNetInterfaceMapping

Get the interface index of PC interface to which specified PLC interface is mapped.

virtual INT32 IInstance::GetNetInterfaceMapping (
    EPLCInterface in_PLCInterfaceID
) = 0

Parameters:

  • in_PLCInterfaceID ID of the PLC interface for which network interface mapping should be retrieved. Fixed range 0 - 2 (IE1 - IE3)

function GetOperatingMode

Gets the operating mode of the virtual controller.

virtual EOperatingMode IInstance::GetOperatingMode () = 0

function GetOperatingState

Returns the operating state of the virtual controller.

virtual EOperatingState IInstance::GetOperatingState () = 0

function GetOverwrittenMinimalCycleTime_ns

Gets the overwritten minimal cycle time in nanoseconds used in the extended single-step operating mode.

virtual INT64 IInstance::GetOverwrittenMinimalCycleTime_ns () = 0

function GetScaleFactor

Gets the scale factor of the virtual clock.

virtual double IInstance::GetScaleFactor () = 0

function GetStoragePath

Returns the full path of the directory the instance is storing its data.

virtual ERuntimeErrorCode IInstance::GetStoragePath (
    WCHAR inout_StoragePath,
    UINT32 in_ArrayLength
) = 0

Parameters:

  • inout_StoragePath A user allocated buffer for the storage path. The array length should be at least as big as DSTARTUP_PATH_MAX_LENGTH.
  • in_ArrayLength The length of the array in wide characters.

function GetStrictMotionTiming

Get instance's current strict motion timing setting.

virtual ERuntimeErrorCode IInstance::GetStrictMotionTiming (
    bool * enabled
) = 0

Parameters:

  • enabled Receives true for enabled, false for disabled.

Returns:

ERuntimeErrorCode::SREC\_OK - Success

function GetSystemTime

Returns the virtual system time of the virtual controller. Returns an empty struct if the function fails.

virtual SYSTEMTIME IInstance::GetSystemTime () = 0

function GetTagInfoCount

Returns the amount of entries of the taglist storage. Returns 0 if the function fails.

virtual UINT32 IInstance::GetTagInfoCount () = 0

function GetTagInfos

Get a list of all tags.

virtual ERuntimeErrorCode IInstance::GetTagInfos (
    UINT32 in_BufferLength,
    STagInfo * inout_TagInfos,
    UINT32 * out_TagCount
) = 0

Parameters:

  • in_BufferLength The length of the user allocated buffer to take the tags.
  • inout_TagInfos The user allocated buffer to take the tags.
  • out_TagCount Returns the amount of tags written into the buffer.

function GetTagListStatus

Returns the current update state of the taglist storage. "inout_TagListDetails" is "NONE" if the list needs to be updated.

virtual ERuntimeErrorCode IInstance::GetTagListStatus (
    ETagListDetails * out_TagListDetails,
    bool * out_IsHMIVisibleOnly
) = 0

Parameters:

  • out_TagListDetails The status of the tag list details. SRTLD_NONE if the list needs to be updated.
  • out_IsHMIVisibleOnly If "true", only tags marked as "HMI Visible" are available in the list.

function HasDisplay

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 ERuntimeErrorCode IInstance::HasDisplay (
    bool & hasDisplay
) = 0

Parameters:

  • hasDisplay The object where the information, if the PLC is having a display gets stored.

function IsSendSyncEventInDefaultModeEnabled

Returns the status of the SendSyncEventInDefaultMode flag. Returns false if the function fails.

virtual bool IInstance::IsSendSyncEventInDefaultModeEnabled () = 0

function MemoryReset [½]

Shuts down the virtual controller, closes its process and restarts it.

virtual ERuntimeErrorCode IInstance::MemoryReset () = 0

function MemoryReset [2/2]

Shuts down the virtual controller, closes its process and restarts it.

virtual ERuntimeErrorCode IInstance::MemoryReset (
    UINT32 in_TimeOut_ms
) = 0

Parameters:

  • in_TimeOut_ms A 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 PowerOff [½]

Shuts down the virtual controller and closes its process.

virtual ERuntimeErrorCode IInstance::PowerOff () = 0

function PowerOff [2/2]

Shuts down the virtual controller and closes its process.

virtual ERuntimeErrorCode IInstance::PowerOff (
    UINT32 in_TimeOut_ms
) = 0

Parameters:

  • in_TimeOut_ms A 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_OFF }

function PowerOn [½]

Creates the process of the simulation runtime instance and starts the firmware of the virtual controller.

virtual ERuntimeErrorCode IInstance::PowerOn () = 0

function PowerOn [2/2]

Creates the process of the simulation runtime instance and starts the firmware of the virtual controller.

virtual ERuntimeErrorCode IInstance::PowerOn (
    UINT32 in_TimeOut_ms
) = 0

Parameters:

  • in_TimeOut_ms A 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 ERuntimeErrorCode IInstance::ProcessEvent (
    UINT16 in_HardwareIdentifier,
    UINT16 in_Channel,
    EProcessEventType in_ProcessEventType,
    UINT16 * out_SequenceNumber
) = 0

Parameters:

  • in_HardwareIdentifier The ID of the module or submodule from which the process event is sent.
  • in_Channel The channel of the I/O module from which the process event is generated.
  • in_ProcessEventType One value from the list of pre-defined process event types for S7-Modules. The event types are defined in the enumeration EProcessEventType.
  • out_SequenceNumber Unique 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 ERuntimeErrorCode IInstance::ProfileEvent (
    UINT16 in_HardwareIdentifier,
    UINT16 in_Specifier
) = 0

Parameters:

  • in_HardwareIdentifier The ID of the module from which the Profile event is generated.
  • in_Specifier The 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 ERuntimeErrorCode IInstance::PullOrPlugEvent (
    UINT16 in_HardwareIdentifier,
    EPullOrPlugEventType in_PullOrPlugEventType,
    UINT16 * out_SequenceNumber
) = 0

Parameters:

  • in_HardwareIdentifier The ID of the module or submodule from which the Pull and Plug event is generated.
  • in_PullOrPlugEventType One value from the list of pre-defined pull or plug event types. The event types are defined in the enumeration EPullOrPlugEventType.
  • out_SequenceNumber Unique 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 ERuntimeErrorCode IInstance::RackOrStationFaultEvent (
    UINT16 in_HardwareIdentifier,
    ERackOrStationFaultType in_EventType
) = 0

Parameters:

  • in_HardwareIdentifier The HW ID of the device from which the RackOrStationFault event is generated.
  • in_EventType The 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 ERuntimeErrorCode IInstance::Read (
    WCHAR * in_Tag,
    SDataValue * inout_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • inout_Value Contains 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.

function ReadBit

Reads a single bit from the area.

virtual ERuntimeErrorCode IInstance::ReadBit (
    EArea in_Area,
    UINT32 in_Offset,
    UINT8 in_Bit,
    bool * out_Value
) = 0

Parameters:

  • in_Area The area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • in_Offset The byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().
  • in_Bit The bit offset inside the byte. Must be a value between 0 and 7.
  • out_Value Returns the value of the bit.

function ReadBool

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadBool (
    WCHAR * in_Tag,
    bool * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadByte

Reads a single byte from the area.

virtual ERuntimeErrorCode IInstance::ReadByte (
    EArea in_Area,
    UINT32 in_Offset,
    BYTE * out_Value
) = 0

Parameters:

  • in_Area The area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • in_Offset The byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().
  • out_Value Returns the value of the byte.

function ReadBytes

Reads an array of bytes from the area.

virtual ERuntimeErrorCode IInstance::ReadBytes (
    EArea in_Area,
    UINT32 in_Offset,
    UINT32 in_BytesToRead,
    UINT32 * out_BytesRead,
    BYTE inout_Values
) = 0

Parameters:

  • in_Area The area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • in_Offset The byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().
  • in_BytesToRead Contains the size of the value buffer.
  • out_BytesRead Contains the amount of bytes that have actually been written into the value buffer.
  • inout_Values The buffer for the bytes to read from the area.

function ReadChar

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadChar (
    WCHAR * in_Tag,
    char * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadDouble

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadDouble (
    WCHAR * in_Tag,
    double * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadFloat

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadFloat (
    WCHAR * in_Tag,
    float * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadInt16

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadInt16 (
    WCHAR * in_Tag,
    INT16 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadInt32

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadInt32 (
    WCHAR * in_Tag,
    INT32 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadInt64

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadInt64 (
    WCHAR * in_Tag,
    INT64 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadInt8

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadInt8 (
    WCHAR * in_Tag,
    INT8 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadRecordDone

Completion of asynchronous reading of data record.

virtual ERuntimeErrorCode IInstance::ReadRecordDone (
    SDataRecordInfo in_RecordInfo,
    BYTE * in_Data,
    UINT32 in_Status
) = 0

Parameters:

  • in_RecordInfo Struct SDataRecordInfo which provides the DataRecord info.
  • in_Data Byte array of the Data Record read with the length specified by DataSize value of SDataRecordInfo.
  • in_Status Status 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 ERuntimeErrorCode IInstance::ReadSignals (
    EArea in_Area,
    SDataValueByAddress * inout_Signals,
    UINT32 in_SignalCount,
    bool in_ValidateAddressTag=false
) = 0

Parameters:

  • in_Area The area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • inout_Signals The list of the signals to read. The result will be stored in the struct.
  • in_SignalCount The amount of signals in the list.

function ReadSignals [2/4]

Reads multiple signals within a single API call.

virtual ERuntimeErrorCode IInstance::ReadSignals (
    SDataValueByName * inout_Signals,
    UINT32 in_SignalCount
) = 0

Parameters:

  • inout_Signals Contains 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.
  • in_SignalCount The amount of signals to read.

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 ERuntimeErrorCode IInstance::ReadSignals (
    EArea in_Area,
    SDataValueByAddressWithCheck * inout_Signals,
    UINT32 in_SignalCount,
    bool * out_SignalsHaveChanged,
    bool in_ValidateAddressTag=false
) = 0

Parameters:

  • in_Area The area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • inout_Signals The list of the signals to read.
  • in_SignalCount The amount of signals in the list.
  • out_SignalsHaveChanged Will return "true", if the value of at least one signal changed since the previous call.

function ReadSignals [4/4]

Reads multiple signals within a single API call.

virtual ERuntimeErrorCode IInstance::ReadSignals (
    SDataValueByNameWithCheck * inout_Signals,
    UINT32 in_SignalCount,
    bool * out_SignalsHaveChanged
) = 0

Parameters:

  • inout_Signals Contains 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.
  • in_SignalCount The amount of signals to read.
  • out_SignalsHaveChanged Will 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 ERuntimeErrorCode IInstance::ReadString (
    const WCHAR * in_Tag,
    CHAR * out_Value,
    const int in_BufferSize,
    int * out_CharsRead
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

Parameters:

  • in_BufferSize Size of the input buffer.

///

Parameters:

  • out_CharsRead Number of characters read.

function ReadUInt16

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadUInt16 (
    WCHAR * in_Tag,
    UINT16 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadUInt32

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadUInt32 (
    WCHAR * in_Tag,
    UINT32 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadUInt64

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadUInt64 (
    WCHAR * in_Tag,
    UINT64 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadUInt8

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadUInt8 (
    WCHAR * in_Tag,
    UINT8 * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadWChar

Reads the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::ReadWChar (
    WCHAR * in_Tag,
    WCHAR * out_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

function ReadWString

Reads the value of a PLC wstring variable.

virtual ERuntimeErrorCode IInstance::ReadWString (
    const WCHAR * in_Tag,
    WCHAR * out_Value,
    const int in_BufferSize,
    int * out_CharsRead
) = 0

Parameters:

  • in_Tag The name of the PLC variable to read.
  • out_Value Contains the value of the PLC variable.

Parameters:

  • in_BufferSize Size of the input buffer.

///

Parameters:

  • out_CharsRead Number of characters read.

function RegisterOnAlarmNotificationDoneCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnAlarmNotificationDoneCallback (
    EventCallback_II_SREC_ST_UINT32_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnDataRecordReadCallback

When the event occurs, the registered callback function is called. Only one callback function can be registered for the event. Registering a new callback function causes the previous callback function to be deleted.

virtual void IInstance::RegisterOnDataRecordReadCallback (
    EventCallback_II_SREC_ST_SDRI in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnDataRecordWriteCallback

When the event occurs, the registered callback function is called. Only one callback function can be registered for the event. Registering a new callback function causes the previous callback function to be deleted.

virtual void IInstance::RegisterOnDataRecordWriteCallback (
    EventCallback_II_SREC_ST_SDRI_BYTE in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnDisplayDataChangedCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnDisplayDataChangedCallback (
    EventCallback_II_SREC_ST in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

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 IInstance::RegisterOnDisplayDataChangedEvent () = 0

function RegisterOnDisplayDataChangedEvent [2/2]

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 IInstance::RegisterOnDisplayDataChangedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event The handle to a user created event object. The event object will be registered.

function RegisterOnHardwareConfigChangedCallback

When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnHardwareConfigChangedCallback (
    EventCallback_II_SREC_ST in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function to subscribe to the event.

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 IInstance::RegisterOnHardwareConfigChangedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event The handle to a user created event object. The event object will be registered.

function RegisterOnHardwareConfigChangedEvent [2/2]

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 IInstance::RegisterOnHardwareConfigChangedEvent () = 0

function RegisterOnIPAddressChangedCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnIPAddressChangedCallback (
    EventCallback_II_SREC_ST_UINT8_SIP in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

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 IInstance::RegisterOnIPAddressChangedEvent () = 0

function RegisterOnIPAddressChangedEvent [2/2]

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 IInstance::RegisterOnIPAddressChangedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event The handle to a user created event object. The event object will be registered.

function RegisterOnLedChangedCallback

When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnLedChangedCallback (
    EventCallback_II_SREC_ST_SRLT_SRLM in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function to subscribe to the event.

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 IInstance::RegisterOnLedChangedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event The handle to a user created event object. The event object will be registered.

function RegisterOnLedChangedEvent [2/2]

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 IInstance::RegisterOnLedChangedEvent () = 0

function RegisterOnOperatingStateChangedCallback

When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnOperatingStateChangedCallback (
    EventCallback_II_SREC_ST_SROS_SROS in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function to subscribe to the event.

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 IInstance::RegisterOnOperatingStateChangedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event The handle to a user created event object. The event object will be registered.

function RegisterOnOperatingStateChangedEvent [2/2]

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 IInstance::RegisterOnOperatingStateChangedEvent () = 0

function RegisterOnProcessEventDoneCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnProcessEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnProfileEventDoneCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnProfileEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnPullOrPlugEventDoneCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnPullOrPlugEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32_EPPET_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnRackOrStationFaultEventCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnRackOrStationFaultEventCallback (
    EventCallback_II_SREC_ST_UINT32_ERSFET in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnSoftwareConfigurationChangedCallback

Registers callback called whenever a software changed event becomes signaled.

virtual void IInstance::RegisterOnSoftwareConfigurationChangedCallback (
    EventCallback_II_SSCCP in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction [in]: Callback to register.

Returns:

  • ERuntimeErrorCode::SREC_OK: On success. Otherwise failure.

  • ERuntimeErrorCode::SREC_WRONG_ARGUMENT: in_CallbackFunction is a null pointer.

Multiple callbacks can be set and will be called in the same order as their registration order.

function RegisterOnSoftwareConfigurationChangedEvent [½]

virtual void IInstance::RegisterOnSoftwareConfigurationChangedEvent () = 0

function RegisterOnSoftwareConfigurationChangedEvent [2/2]

Registers event signaled whenever a software changed event becomes signaled.

virtual void IInstance::RegisterOnSoftwareConfigurationChangedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event [in]: Event to register. If null pointer, registers a default event.

Previously set event will be replaced.

function RegisterOnStatusEventDoneCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnStatusEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RegisterOnSyncPointReachedCallback

When receiving the event the registered callback function will be called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnSyncPointReachedCallback (
    EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function to subscribe to the event.

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 IInstance::RegisterOnSyncPointReachedEvent () = 0

function RegisterOnSyncPointReachedEvent [2/2]

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 IInstance::RegisterOnSyncPointReachedEvent (
    HANDLE * in_Event
) = 0

Parameters:

  • in_Event The handle to a user created event object. The event object will be registered.

function RegisterOnUpdateEventDoneCallback

When the event occurs, the registered callback function is called. The callback function runs in a separate thread. More callback functions can be registered to the event.

virtual void IInstance::RegisterOnUpdateEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32 in_CallbackFunction
) = 0

Parameters:

  • in_CallbackFunction A callback function that subscribes to the event.

function RetrieveStorage

Restores a virtual memory card from a .zip file. The virtual controller has to be in the operating state off.

virtual ERuntimeErrorCode IInstance::RetrieveStorage (
    WCHAR * in_ArchiveFile
) = 0

Parameters:

  • in_ArchiveFile The 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 ERuntimeErrorCode IInstance::Run () = 0

function Run [2/2]

Requests the virtual controller to switch into run mode.

virtual ERuntimeErrorCode IInstance::Run (
    UINT32 in_TimeOut_ms
) = 0

Parameters:

  • in_TimeOut_ms A 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_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 ERuntimeErrorCode IInstance::RunToNextSyncPoint () = 0

function RunToNextSyncPoint [2/2]

Extension to IInstance::RunToNextSyncPoint for bus synchronous mode.

virtual ERuntimeErrorCode IInstance::RunToNextSyncPoint (
    UINT32 in_IoSystemId,
    UINT64 in_BusTimeStamp_ns
) = 0

Parameters:

  • in_IoSystemId Bus ID.
  • in_BusTimeStamp_ns Timestamp in nanoseconds.

Returns:

ERuntimeErrorCode::SREC\_OK - Success. #ERuntimeErrorCode::SREC\_WRONG\_ARGUMENT - Invalid bus ID. #ERuntimeErrorCode::SREC\_WRONG\_VERSION - Invalid S7-PLCSIM version. Must be V4.0 or higher

function SetCPUType

Sets the CPU type of the instance.

virtual void IInstance::SetCPUType (
    ECPUType in_CPUType
) = 0

Parameters:

  • in_CPUType Defines which type of CPU will be simulated when starting the instance.

function SetCycleTimeMonitoringMode [½]

Sets the max cycle time based on the ECycleTimeMonitoringMode value

virtual ERuntimeErrorCode IInstance::SetCycleTimeMonitoringMode (
    ECycleTimeMonitoringMode in_CycleTimeMonitoringMode,
    INT64 in_MaxCycleTime_ns
) = 0

Parameters:

  • in_CycleTimeMonitoringMode The CycleMonitoringMode mode of the virtual controller.
  • in_MaxCycleTime_ns The maximum cycle value in nano seconds.

function SetCycleTimeMonitoringMode [2/2]

Sets the ECycleTimeMonitoringMode value

virtual ERuntimeErrorCode IInstance::SetCycleTimeMonitoringMode (
    ECycleTimeMonitoringMode in_CycleTimeMonitoringMode
) = 0

Parameters:

  • in_CycleTimeMonitoringMode The CycleMonitoringMode mode of the virtual controller.

function SetIPSuite

Sets the IP suite of a network interface of the virtual controller.

virtual ERuntimeErrorCode IInstance::SetIPSuite (
    UINT32 in_InterfaceID,
    SIPSuite4 in_IPSuite,
    bool in_IsRemanent
) = 0

Parameters:

  • in_InterfaceID The ID of the network interface.
  • in_IPSuite The 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 and default gateway will be ignored.
  • in_IsRemanent If 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 ERuntimeErrorCode IInstance::SetNetInterfaceMapping (
    EPLCInterface in_PLCInterfaceID,
    DWORD in_PCInterfaceIndex
) = 0

Parameters:

  • in_PLCInterfaceID ID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)
  • in_PCInterfaceIndex Index 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 ERuntimeErrorCode IInstance::SetNetInterfaceMapping (
    EPLCInterface in_PLCInterfaceID,
    const WCHAR * in_PCInterfaceName
) = 0

Parameters:

  • in_PLCInterfaceID ID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)
  • in_PCInterfaceName A 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 ERuntimeErrorCode IInstance::SetNetInterfaceMapping (
    EPLCInterface in_PLCInterfaceID,
    const SMACAddress * in_MACAddressParam
) = 0

Parameters:

  • in_PLCInterfaceID ID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)
  • in_MACAddressParam Hardware MAC address of the computer interface.

function SetOperatingMode

Sets the operating mode of the virtual controller. Changes of the value during runtime take effect on the cycle control point.

virtual void IInstance::SetOperatingMode (
    EOperatingMode in_OperatingMode
) = 0

Parameters:

  • in_OperatingMode The operating mode of the virtual controller.

function SetOverwrittenMinimalCycleTime_ns

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 on the cycle control point.

virtual ERuntimeErrorCode IInstance::SetOverwrittenMinimalCycleTime_ns (
    INT64 in_CycleTime_ns
) = 0

Parameters:

  • in_CycleTime_ns The overwritten minimal cycle time in nanoseconds.

function SetScaleFactor

Sets the scale factor of the virtual clock. A valid input value X is a value between 0 and 1000. The default value is 1.0. If the value is smaller than 1 the virtual time of the virtual controller runs X times slower than the wall clock time. If the value is bigger than 1 the virtual time of the virtual controller runs X times faster than the wall clock time. Changes of the value during runtime take effect at the cycle control point.

virtual ERuntimeErrorCode IInstance::SetScaleFactor (
    double in_Value
) = 0

Parameters:

  • in_Value The scale factor of the virtual clock.

function SetSendSyncEventInDefaultModeEnabled

Sets the SendSyncEventInDefault mode. If the mode is set, the OnSyncPointReached event is triggered after every cycle end in the operating mode "Default".

virtual ERuntimeErrorCode IInstance::SetSendSyncEventInDefaultModeEnabled (
    bool in_Enable
) = 0

Parameters:

  • in_Enable If true, the OnSyncPointReached event is triggered after every cycle in "Default" mode.

function SetStoragePath

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 ERuntimeErrorCode IInstance::SetStoragePath (
    WCHAR * in_StoragePath
) = 0

Parameters:

  • in_StoragePath The full name of the storage path. The length of the name has to be less than DSTARTUP_PATH_MAX_LENGTH.

function SetStrictMotionTiming

Enable or disable strict motion timing.

virtual ERuntimeErrorCode IInstance::SetStrictMotionTiming (
    bool enable
) = 0

Parameters:

  • enable true to enable, false to disable.

Returns:

ERuntimeErrorCode::SREC\_OK - Success. #ERuntimeErrorCode::SREC\_INVALID\_OPERATING\_STATE - Instance is powered on

function SetSystemTime

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 ERuntimeErrorCode IInstance::SetSystemTime (
    SYSTEMTIME in_SystemTime
) = 0

Parameters:

  • in_SystemTime The system time to set.

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 ERuntimeErrorCode IInstance::StartProcessing (
    INT64 in_MinimalTimeToRun_ns
) = 0

Parameters:

  • in_MinimalTimeToRun_ns The 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 ERuntimeErrorCode IInstance::StatusEvent (
    UINT16 in_HardwareIdentifier,
    UINT16 in_Specifier
) = 0

Parameters:

  • in_HardwareIdentifier The ID of the module or submodule from which the Status event is sent.
  • in_Specifier The 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 ERuntimeErrorCode IInstance::Stop () = 0

function Stop [2/2]

Requests the virtual controller to switch into stop mode.

virtual ERuntimeErrorCode IInstance::Stop (
    UINT32 in_TimeOut_ms
) = 0

Parameters:

  • in_TimeOut_ms A 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 }

function UnregisterInstance

Unregisters this instance from the Runtime Manager.

virtual ERuntimeErrorCode IInstance::UnregisterInstance () = 0

function UnregisterOnAlarmNotificationDoneCallback

Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.

virtual void IInstance::UnregisterOnAlarmNotificationDoneCallback (
    EventCallback_II_SREC_ST_UINT32_UINT32 in_CallbackFunction=nullptr
) = 0

function UnregisterOnDataRecordReadCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnDataRecordReadCallback (
    EventCallback_II_SREC_ST_SDRI in_CallbackFunction=nullptr
) = 0

function UnregisterOnDataRecordWriteCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnDataRecordWriteCallback (
    EventCallback_II_SREC_ST_SDRI_BYTE in_CallbackFunction=nullptr
) = 0

function UnregisterOnDisplayDataChangedCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnDisplayDataChangedCallback (
    EventCallback_II_SREC_ST in_CallbackFunction=nullptr
) = 0

function UnregisterOnDisplayDataChangedEvent

Unregisters the event object.

virtual void IInstance::UnregisterOnDisplayDataChangedEvent () = 0

function UnregisterOnHardwareConfigChangedCallback

Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.

virtual void IInstance::UnregisterOnHardwareConfigChangedCallback (
    EventCallback_II_SREC_ST in_CallbackFunction=nullptr
) = 0

function UnregisterOnHardwareConfigChangedEvent

Unregisters the event object.

virtual void IInstance::UnregisterOnHardwareConfigChangedEvent () = 0

function UnregisterOnIPAddressChangedCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnIPAddressChangedCallback (
    EventCallback_II_SREC_ST_UINT8_SIP in_CallbackFunction=nullptr
) = 0

function UnregisterOnIPAddressChangedEvent

Unregisters the event object.

virtual void IInstance::UnregisterOnIPAddressChangedEvent () = 0

function UnregisterOnLedChangedCallback

Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.

virtual void IInstance::UnregisterOnLedChangedCallback (
    EventCallback_II_SREC_ST_SRLT_SRLM in_CallbackFunction=nullptr
) = 0

function UnregisterOnLedChangedEvent

Unregisters the event object.

virtual void IInstance::UnregisterOnLedChangedEvent () = 0

function UnregisterOnOperatingStateChangedCallback

Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.

virtual void IInstance::UnregisterOnOperatingStateChangedCallback (
    EventCallback_II_SREC_ST_SROS_SROS in_CallbackFunction=nullptr
) = 0

function UnregisterOnOperatingStateChangedEvent

Unregisters the event object.

virtual void IInstance::UnregisterOnOperatingStateChangedEvent () = 0

function UnregisterOnProcessEventDoneCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnProcessEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32_UINT32_EPET_UINT32 in_CallbackFunction=nullptr
) = 0

function UnregisterOnProfileEventDoneCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnProfileEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32 in_CallbackFunction=nullptr
) = 0

function UnregisterOnPullOrPlugEventDoneCallback

Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.

virtual void IInstance::UnregisterOnPullOrPlugEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32_EPPET_UINT32 in_CallbackFunction=nullptr
) = 0

function UnregisterOnRackOrStationFaultEventCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnRackOrStationFaultEventCallback (
    EventCallback_II_SREC_ST_UINT32_ERSFET in_CallbackFunction=nullptr
) = 0

function UnregisterOnSoftwareConfigurationChangedCallback

Unregisters software changed callback.

virtual void IInstance::UnregisterOnSoftwareConfigurationChangedCallback (
    EventCallback_II_SSCCP in_CallbackFunction=nullptr
) = 0

Parameters:

  • in_CallbackFunction [in]: Callback to unregister. If null pointer, the latest added callback will be unregistered.

Returns:

  • ERuntimeErrorCode::SREC_OK: On success. Otherwise failure.

  • ERuntimeErrorCode::SREC_DOES_NOT_EXIST: in_CallbackFunction not found.

  • ERuntimeErrorCode::SREC_IS_EMPTY: No callback registered.

function UnregisterOnSoftwareConfigurationChangedEvent

Unregisters the software changed event.

virtual void IInstance::UnregisterOnSoftwareConfigurationChangedEvent () = 0

Returns:

  • ERuntimeErrorCode::SREC_OK: On success. Otherwise failure.

  • ERuntimeErrorCode::SREC_DOES_NOT_EXIST: No event registered.

function UnregisterOnStatusEventDoneCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnStatusEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32 in_CallbackFunction=nullptr
) = 0

function UnregisterOnSyncPointReachedCallback

Unregisters specified callback function or the last registered one. When receiving the event no callback function will be called.

virtual void IInstance::UnregisterOnSyncPointReachedCallback (
    EventCallback_II_SREC_ST_UINT32_INT64_INT64_UINT32 in_CallbackFunction=nullptr
) = 0

function UnregisterOnSyncPointReachedEvent

Unregisters the event object.

virtual void IInstance::UnregisterOnSyncPointReachedEvent () = 0

function UnregisterOnUpdateEventDoneCallback

Unregisters specified callback function or the last registered one. When the event occurs, no callback function is called.

virtual void IInstance::UnregisterOnUpdateEventDoneCallback (
    EventCallback_II_SREC_ST_UINT32 in_CallbackFunction=nullptr
) = 0

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 ERuntimeErrorCode IInstance::UpdateEvent (
    UINT16 in_HardwareIdentifier,
    UINT16 in_Specifier
) = 0

Parameters:

  • in_HardwareIdentifier The ID of the module from which the Update event is generated.
  • in_Specifier The 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 ERuntimeErrorCode IInstance::UpdateTagList (
    ETagListDetails in_TagListDetails,
    bool in_IsHMIVisibleOnly
) = 0

Parameters:

  • in_TagListDetails Any 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_IsHMIVisibleOnly If "true", only tags marked as "HMI Visible" will be read. The default value is "false".

function UpdateTagList [2/4]

Reads the tags from the VPLC and writes them into the shared memory ordered by name.

virtual ERuntimeErrorCode IInstance::UpdateTagList (
    ETagListDetails in_TagListDetails
) = 0

Parameters:

  • in_TagListDetails Any 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 ERuntimeErrorCode IInstance::UpdateTagList () = 0

function UpdateTagList [4/4]

Reads the tags from the VPLC and writes them into the shared memory ordered by name.

virtual ERuntimeErrorCode IInstance::UpdateTagList (
    ETagListDetails in_TagListDetails,
    bool in_IsHMIVisibleOnly,
    WCHAR * in_DataBlockFilterList
) = 0

Parameters:

  • in_TagListDetails Any 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_IsHMIVisibleOnly If "true", only tags marked as "HMI Visible" will be read. The default value is "false".
  • in_DataBlockFilterList A 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 IInstance::WaitForOnDisplayDataChangedEvent () = 0

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 IInstance::WaitForOnDisplayDataChangedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms The 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 IInstance::WaitForOnHardwareConfigChangedEvent () = 0

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 IInstance::WaitForOnHardwareConfigChangedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms The 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 IInstance::WaitForOnIPAddressChangedEvent () = 0

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 IInstance::WaitForOnIPAddressChangedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms The 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 IInstance::WaitForOnLedChangedEvent () = 0

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 IInstance::WaitForOnLedChangedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms The 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 IInstance::WaitForOnOperatingStateChangedEvent () = 0

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 IInstance::WaitForOnOperatingStateChangedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms The value for the timeout limit in milliseconds.

function WaitForOnSoftwareConfigurationChangedEvent [½]

Wait for software changed event to be signaled.

virtual bool IInstance::WaitForOnSoftwareConfigurationChangedEvent () = 0

function WaitForOnSoftwareConfigurationChangedEvent [2/2]

Wait for software changed event to be signaled.

virtual bool IInstance::WaitForOnSoftwareConfigurationChangedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms [in] Timeout in milliseconds. If INFINITE, no timeout can occur.

function WaitForOnSyncPointReachedEvent [½]

The function will block until the registered event object is in the signaled state or the timeout interval elapses.

virtual SOnSyncPointReachedResult IInstance::WaitForOnSyncPointReachedEvent () = 0

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 IInstance::WaitForOnSyncPointReachedEvent (
    UINT32 in_Time_ms
) = 0

Parameters:

  • in_Time_ms The value for the timeout limit in milliseconds.

function Write

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::Write (
    WCHAR * in_SymbolTag,
    SDataValue in_Value
) = 0

Parameters:

  • in_SymbolTag The name of the PLC variable to write.
  • in_Value Contains the value and the expected type of the PLC variable to write. The types UNSPECIFIC and STRUCT are not supported.

function WriteBit

Writes a single bit to the area.

virtual ERuntimeErrorCode IInstance::WriteBit (
    EArea in_Area,
    UINT32 in_Offset,
    UINT8 in_Bit,
    bool in_Value
) = 0

Parameters:

  • in_Area The area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • in_Offset The byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().
  • in_Bit The bit offset inside the byte. Must be a value between 0 and 7.
  • in_Value The value of the bit.

function WriteBool

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteBool (
    WCHAR * in_Tag,
    bool in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteByte

Writes a single byte to the area.

virtual ERuntimeErrorCode IInstance::WriteByte (
    EArea in_Area,
    UINT32 in_Offset,
    BYTE in_Value
) = 0

Parameters:

  • in_Area The area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • in_Offset The byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().
  • in_Value The value of the byte.

function WriteBytes

Writes an array of bytes to the area.

virtual ERuntimeErrorCode IInstance::WriteBytes (
    EArea in_Area,
    UINT32 in_Offset,
    UINT32 in_BytesToWrite,
    UINT32 * out_BytesWritten,
    BYTE in_Values
) = 0

Parameters:

  • in_Area The area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • in_Offset The byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().
  • in_BytesToWrite Contains the size of the value array to be written.
  • out_BytesWritten Contains the amount of bytes that have actually been written.
  • in_Values Array of bytes to be written to the area.

function WriteChar

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteChar (
    WCHAR * in_Tag,
    char in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteDouble

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteDouble (
    WCHAR * in_Tag,
    double in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteFloat

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteFloat (
    WCHAR * in_Tag,
    float in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteInt16

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteInt16 (
    WCHAR * in_Tag,
    INT16 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteInt32

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteInt32 (
    WCHAR * in_Tag,
    INT32 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteInt64

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteInt64 (
    WCHAR * in_Tag,
    INT64 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteInt8

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteInt8 (
    WCHAR * in_Tag,
    INT8 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteRecordDone

Completion of asynchronous writing of data record.

virtual ERuntimeErrorCode IInstance::WriteRecordDone (
    SDataRecordInfo in_RecordInfo,
    UINT32 in_Status
) = 0

Parameters:

  • in_RecordInfo Struct SDataRecordInfo which provides the DataRecord info.
  • in_Status Status of the job execution.

function WriteSignals [½]

Writes 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 ERuntimeErrorCode IInstance::WriteSignals (
    EArea in_Area,
    SDataValueByAddress * inout_Signals,
    UINT32 in_SignalCount,
    bool in_ValidateAddressTag=false
) = 0

Parameters:

  • in_Area The area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
  • inout_Signals The list of the signals to write.
  • in_SignalCount The amount of signals in the list.

function WriteSignals [2/2]

Writes multiple signals within a single API call.

virtual ERuntimeErrorCode IInstance::WriteSignals (
    SDataValueByName * inout_Signals,
    UINT32 in_SignalCount
) = 0

Parameters:

  • inout_Signals Contains the name, value and the expected type of the PLC variable to write. The type UNSPECIFIC and STRUCT are not supported.
  • in_SignalCount The amount of signals to write.

function WriteString

virtual ERuntimeErrorCode IInstance::WriteString (
    const WCHAR * in_Tag,
    const CHAR * in_Value,
    const int in_CharsToWrite
) = 0

Writes the value of a PLC string variable.

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.
  • in_CharsToWrite Number of characters to be written.

function WriteUInt16

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteUInt16 (
    WCHAR * in_Tag,
    UINT16 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteUInt32

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteUInt32 (
    WCHAR * in_Tag,
    UINT32 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteUInt64

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteUInt64 (
    WCHAR * in_Tag,
    UINT64 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteUInt8

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteUInt8 (
    WCHAR * in_Tag,
    UINT8 in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteWChar

Writes the value of a PLC variable.

virtual ERuntimeErrorCode IInstance::WriteWChar (
    WCHAR * in_Tag,
    WCHAR in_Value
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.

function WriteWString

Writes the value of a PLC wstring variable.

virtual ERuntimeErrorCode IInstance::WriteWString (
    const WCHAR * in_Tag,
    const WCHAR * in_Value,
    const int in_CharsToWrite
) = 0

Parameters:

  • in_Tag The name of the PLC variable to write.
  • in_Value Contains the value of the PLC variable to write.
  • in_CharsToWrite Number of characters to be written.

function ~IInstance

inline virtual IInstance::~IInstance ()