Class IInstance¶
#include <SimulationRuntimeApi.h>
Inherits the following classes: IBaseInterface
Public Functions¶
| Type | Name |
|---|---|
| virtual ERuntimeErrorCode | AlarmNotification (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 ERuntimeErrorCode | ArchiveStorage (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 ERuntimeErrorCode | CheckNetInterfaceMapping () = 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 ERuntimeErrorCode | CleanupStoragePath () = 0 Cleans up the storage folder. The controller must be in operational state OFF. |
| virtual ERuntimeErrorCode | CreateConfigurationFile (WCHAR * in_FullFileName) = 0 Writes all taglist entries from the taglist storage into an XML file. |
| virtual ERuntimeErrorCode | DisplayKeyPress (EDisplayKey keyId) = 0 Interacts with the selected button on the display. |
| virtual UINT32 | GetAreaSize (EArea in_Area) = 0 Returns the size in bytes of the area. Returns 0 if the function fails. |
| virtual void | GetArticleNumber (WCHAR * out_ArticleNumber) = 0 Returns the article number type of the instance. |
| virtual ECPUType | GetCPUType () = 0 Returns the CPU type of the instance. |
| virtual ECommunicationInterface | GetCommunicationInterface () = 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 ERuntimeErrorCode | GetConfiguredProcessEvents (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 UIP | GetControllerIP () = 0 Returns a configured IP address of the instance. |
| virtual UIP | GetControllerIP (UINT32 in_Index) = 0 Returns a configured IP address of the instance. |
| virtual UINT32 | GetControllerIPCount () = 0 Returns the amount of configured IP addresses of the virtual controller. Returns 0 if the function fails. |
| virtual SIPSuite4 | GetControllerIPSuite4 () = 0 Returns the IP suite instance. If the "Softbus" communication interface is used, the subnet mask and default gateway are 0. |
| virtual SIPSuite4 | GetControllerIPSuite4 (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 ERuntimeErrorCode | GetControllerName (WCHAR inout_Name, UINT32 in_ArrayLength) = 0 Returns the downloaded controller name of the virtual controller. |
| virtual ERuntimeErrorCode | GetControllerShortDesignation (WCHAR inout_ShortDesignation, UINT32 in_ArrayLength) = 0 Returns the downloaded short designation of the virtual controller. |
| virtual ERuntimeErrorCode | GetCycleTimeMonitoringMode (ECycleTimeMonitoringMode * out_CycleTimeMonitoringMode, INT64 * out_MaxCycleTime_ns) = 0 Gets the operating mode of the virtual controller. |
| virtual ERuntimeErrorCode | GetDisplayData (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 INT32 | GetID () = 0 Returns the ID of the instance. The ID is assigned by the Runtime Manager when registering the instance. |
| virtual SInstanceInfo | GetInfo () = 0 Returns a struct providing information about the instance. |
| virtual ERuntimeErrorCode | GetLicenseStatus () = 0 Returns information about whether a Trial License is currently in use. |
| virtual ERuntimeErrorCode | GetName (WCHAR inout_Name, UINT32 in_ArrayLength) = 0 Returns the name of the instance. |
| virtual INT32 | GetNetInterfaceMapping (EPLCInterface in_PLCInterfaceID) = 0 Get the interface index of PC interface to which specified PLC interface is mapped. |
| virtual EOperatingMode | GetOperatingMode () = 0 Gets the operating mode of the virtual controller. |
| virtual EOperatingState | GetOperatingState () = 0 Returns the operating state of the virtual controller. |
| virtual INT64 | GetOverwrittenMinimalCycleTime_ns () = 0 Gets the overwritten minimal cycle time in nanoseconds used in the extended single-step operating mode. |
| virtual double | GetScaleFactor () = 0 Gets the scale factor of the virtual clock. |
| virtual ERuntimeErrorCode | GetStoragePath (WCHAR inout_StoragePath, UINT32 in_ArrayLength) = 0 Returns the full path of the directory the instance is storing its data. |
| virtual ERuntimeErrorCode | GetStrictMotionTiming (bool * enabled) = 0 Get instance's current strict motion timing setting. |
| virtual SYSTEMTIME | GetSystemTime () = 0 Returns the virtual system time of the virtual controller. Returns an empty struct if the function fails. |
| virtual UINT32 | GetTagInfoCount () = 0 Returns the amount of entries of the taglist storage. Returns 0 if the function fails. |
| virtual ERuntimeErrorCode | GetTagInfos (UINT32 in_BufferLength, STagInfo * inout_TagInfos, UINT32 * out_TagCount) = 0 Get a list of all tags. |
| virtual ERuntimeErrorCode | GetTagListStatus (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 ERuntimeErrorCode | HasDisplay (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 bool | IsSendSyncEventInDefaultModeEnabled () = 0 Returns the status of the SendSyncEventInDefaultMode flag. Returns false if the function fails. |
| virtual ERuntimeErrorCode | MemoryReset () = 0 Shuts down the virtual controller, closes its process and restarts it. |
| virtual ERuntimeErrorCode | MemoryReset (UINT32 in_TimeOut_ms) = 0 Shuts down the virtual controller, closes its process and restarts it. |
| virtual ERuntimeErrorCode | PowerOff () = 0 Shuts down the virtual controller and closes its process. |
| virtual ERuntimeErrorCode | PowerOff (UINT32 in_TimeOut_ms) = 0 Shuts down the virtual controller and closes its process. |
| virtual ERuntimeErrorCode | PowerOn () = 0 Creates the process of the simulation runtime instance and starts the firmware of the virtual controller. |
| virtual ERuntimeErrorCode | PowerOn (UINT32 in_TimeOut_ms) = 0 Creates the process of the simulation runtime instance and starts the firmware of the virtual controller. |
| virtual ERuntimeErrorCode | ProcessEvent (UINT16 in_HardwareIdentifier, UINT16 in_Channel, EProcessEventType in_ProcessEventType, UINT16 * out_SequenceNumber) = 0 This API is used to trigger the process event interrupt. |
| virtual ERuntimeErrorCode | ProfileEvent (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 ERuntimeErrorCode | PullOrPlugEvent (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 ERuntimeErrorCode | RackOrStationFaultEvent (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 ERuntimeErrorCode | Read (WCHAR * in_Tag, SDataValue * inout_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadBit (EArea in_Area, UINT32 in_Offset, UINT8 in_Bit, bool * out_Value) = 0 Reads a single bit from the area. |
| virtual ERuntimeErrorCode | ReadBool (WCHAR * in_Tag, bool * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadByte (EArea in_Area, UINT32 in_Offset, BYTE * out_Value) = 0 Reads a single byte from the area. |
| virtual ERuntimeErrorCode | ReadBytes (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 ERuntimeErrorCode | ReadChar (WCHAR * in_Tag, char * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadDouble (WCHAR * in_Tag, double * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadFloat (WCHAR * in_Tag, float * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadInt16 (WCHAR * in_Tag, INT16 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadInt32 (WCHAR * in_Tag, INT32 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadInt64 (WCHAR * in_Tag, INT64 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadInt8 (WCHAR * in_Tag, INT8 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadRecordDone (SDataRecordInfo in_RecordInfo, BYTE * in_Data, UINT32 in_Status) = 0 Completion of asynchronous reading of data record. |
| virtual ERuntimeErrorCode | ReadSignals (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 ERuntimeErrorCode | ReadSignals (SDataValueByName * inout_Signals, UINT32 in_SignalCount) = 0 Reads multiple signals within a single API call. |
| virtual ERuntimeErrorCode | ReadSignals (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 ERuntimeErrorCode | ReadSignals (SDataValueByNameWithCheck * inout_Signals, UINT32 in_SignalCount, bool * out_SignalsHaveChanged) = 0 Reads multiple signals within a single API call. |
| virtual ERuntimeErrorCode | ReadString (const WCHAR * in_Tag, CHAR * out_Value, const int in_BufferSize, int * out_CharsRead) = 0 Reads the value of a PLC string variable. |
| virtual ERuntimeErrorCode | ReadUInt16 (WCHAR * in_Tag, UINT16 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadUInt32 (WCHAR * in_Tag, UINT32 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadUInt64 (WCHAR * in_Tag, UINT64 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadUInt8 (WCHAR * in_Tag, UINT8 * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadWChar (WCHAR * in_Tag, WCHAR * out_Value) = 0 Reads the value of a PLC variable. |
| virtual ERuntimeErrorCode | ReadWString (const WCHAR * in_Tag, WCHAR * out_Value, const int in_BufferSize, int * out_CharsRead) = 0 Reads the value of a PLC wstring variable. |
| virtual void | RegisterOnAlarmNotificationDoneCallback (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 void | RegisterOnDataRecordReadCallback (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 void | RegisterOnDataRecordWriteCallback (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 void | RegisterOnDisplayDataChangedCallback (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 void | RegisterOnDisplayDataChangedEvent () = 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 void | RegisterOnDisplayDataChangedEvent (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 void | RegisterOnHardwareConfigChangedCallback (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 void | RegisterOnHardwareConfigChangedEvent (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 void | RegisterOnHardwareConfigChangedEvent () = 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 void | RegisterOnIPAddressChangedCallback (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 void | RegisterOnIPAddressChangedEvent () = 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 void | RegisterOnIPAddressChangedEvent (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 void | RegisterOnLedChangedCallback (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 void | RegisterOnLedChangedEvent (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 void | RegisterOnLedChangedEvent () = 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 void | RegisterOnOperatingStateChangedCallback (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 void | RegisterOnOperatingStateChangedEvent (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 void | RegisterOnOperatingStateChangedEvent () = 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 void | RegisterOnProcessEventDoneCallback (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 void | RegisterOnProfileEventDoneCallback (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 void | RegisterOnPullOrPlugEventDoneCallback (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 void | RegisterOnRackOrStationFaultEventCallback (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 void | RegisterOnSoftwareConfigurationChangedCallback (EventCallback_II_SSCCP in_CallbackFunction) = 0 Registers callback called whenever a software changed event becomes signaled. |
| virtual void | RegisterOnSoftwareConfigurationChangedEvent () = 0 |
| virtual void | RegisterOnSoftwareConfigurationChangedEvent (HANDLE * in_Event) = 0 Registers event signaled whenever a software changed event becomes signaled. |
| virtual void | RegisterOnStatusEventDoneCallback (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 void | RegisterOnSyncPointReachedCallback (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 void | RegisterOnSyncPointReachedEvent () = 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 void | RegisterOnSyncPointReachedEvent (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 void | RegisterOnUpdateEventDoneCallback (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 ERuntimeErrorCode | RetrieveStorage (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 ERuntimeErrorCode | Run () = 0 Requests the virtual controller to switch into run mode. |
| virtual ERuntimeErrorCode | Run (UINT32 in_TimeOut_ms) = 0 Requests the virtual controller to switch into run mode. |
| virtual ERuntimeErrorCode | RunToNextSyncPoint () = 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 ERuntimeErrorCode | RunToNextSyncPoint (UINT32 in_IoSystemId, UINT64 in_BusTimeStamp_ns) = 0 Extension to IInstance::RunToNextSyncPoint for bus synchronous mode. |
| virtual void | SetCPUType (ECPUType in_CPUType) = 0 Sets the CPU type of the instance. |
| virtual ERuntimeErrorCode | SetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode, INT64 in_MaxCycleTime_ns) = 0 Sets the max cycle time based on the ECycleTimeMonitoringMode value |
| virtual ERuntimeErrorCode | SetCycleTimeMonitoringMode (ECycleTimeMonitoringMode in_CycleTimeMonitoringMode) = 0 Sets the ECycleTimeMonitoringMode value |
| virtual ERuntimeErrorCode | SetIPSuite (UINT32 in_InterfaceID, SIPSuite4 in_IPSuite, bool in_IsRemanent) = 0 Sets the IP suite of a network interface of the virtual controller. |
| virtual ERuntimeErrorCode | SetNetInterfaceMapping (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 ERuntimeErrorCode | SetNetInterfaceMapping (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 ERuntimeErrorCode | SetNetInterfaceMapping (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 void | SetOperatingMode (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 ERuntimeErrorCode | SetOverwrittenMinimalCycleTime_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 ERuntimeErrorCode | SetScaleFactor (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 ERuntimeErrorCode | SetSendSyncEventInDefaultModeEnabled (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 ERuntimeErrorCode | SetStoragePath (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 ERuntimeErrorCode | SetStrictMotionTiming (bool enable) = 0 Enable or disable strict motion timing. |
| virtual ERuntimeErrorCode | SetSystemTime (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 ERuntimeErrorCode | StartProcessing (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 ERuntimeErrorCode | StatusEvent (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 ERuntimeErrorCode | Stop () = 0 Requests the virtual controller to switch into stop mode. |
| virtual ERuntimeErrorCode | Stop (UINT32 in_TimeOut_ms) = 0 Requests the virtual controller to switch into stop mode. |
| virtual ERuntimeErrorCode | UnregisterInstance () = 0 Unregisters this instance from the Runtime Manager. |
| virtual void | UnregisterOnAlarmNotificationDoneCallback (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 void | UnregisterOnDataRecordReadCallback (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 void | UnregisterOnDataRecordWriteCallback (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 void | UnregisterOnDisplayDataChangedCallback (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 void | UnregisterOnDisplayDataChangedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnHardwareConfigChangedCallback (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 void | UnregisterOnHardwareConfigChangedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnIPAddressChangedCallback (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 void | UnregisterOnIPAddressChangedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnLedChangedCallback (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 void | UnregisterOnLedChangedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnOperatingStateChangedCallback (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 void | UnregisterOnOperatingStateChangedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnProcessEventDoneCallback (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 void | UnregisterOnProfileEventDoneCallback (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 void | UnregisterOnPullOrPlugEventDoneCallback (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 void | UnregisterOnRackOrStationFaultEventCallback (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 void | UnregisterOnSoftwareConfigurationChangedCallback (EventCallback_II_SSCCP in_CallbackFunction=nullptr) = 0 Unregisters software changed callback. |
| virtual void | UnregisterOnSoftwareConfigurationChangedEvent () = 0 Unregisters the software changed event. |
| virtual void | UnregisterOnStatusEventDoneCallback (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 void | UnregisterOnSyncPointReachedCallback (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 void | UnregisterOnSyncPointReachedEvent () = 0 Unregisters the event object. |
| virtual void | UnregisterOnUpdateEventDoneCallback (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 ERuntimeErrorCode | UpdateEvent (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 ERuntimeErrorCode | UpdateTagList (ETagListDetails in_TagListDetails, bool in_IsHMIVisibleOnly) = 0 Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual ERuntimeErrorCode | UpdateTagList (ETagListDetails in_TagListDetails) = 0 Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual ERuntimeErrorCode | UpdateTagList () = 0 Reads the tags from the VPLC and writes them into the shared memory ordered by name. |
| virtual ERuntimeErrorCode | UpdateTagList (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 bool | WaitForOnDisplayDataChangedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnDisplayDataChangedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnHardwareConfigChangedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnHardwareConfigChangedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnIPAddressChangedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnIPAddressChangedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnLedChangedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnLedChangedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnOperatingStateChangedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnOperatingStateChangedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual bool | WaitForOnSoftwareConfigurationChangedEvent () = 0 Wait for software changed event to be signaled. |
| virtual bool | WaitForOnSoftwareConfigurationChangedEvent (UINT32 in_Time_ms) = 0 Wait for software changed event to be signaled. |
| virtual SOnSyncPointReachedResult | WaitForOnSyncPointReachedEvent () = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual SOnSyncPointReachedResult | WaitForOnSyncPointReachedEvent (UINT32 in_Time_ms) = 0 The function will block until the registered event object is in the signaled state or the timeout interval elapses. |
| virtual ERuntimeErrorCode | Write (WCHAR * in_SymbolTag, SDataValue in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteBit (EArea in_Area, UINT32 in_Offset, UINT8 in_Bit, bool in_Value) = 0 Writes a single bit to the area. |
| virtual ERuntimeErrorCode | WriteBool (WCHAR * in_Tag, bool in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteByte (EArea in_Area, UINT32 in_Offset, BYTE in_Value) = 0 Writes a single byte to the area. |
| virtual ERuntimeErrorCode | WriteBytes (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 ERuntimeErrorCode | WriteChar (WCHAR * in_Tag, char in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteDouble (WCHAR * in_Tag, double in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteFloat (WCHAR * in_Tag, float in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteInt16 (WCHAR * in_Tag, INT16 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteInt32 (WCHAR * in_Tag, INT32 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteInt64 (WCHAR * in_Tag, INT64 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteInt8 (WCHAR * in_Tag, INT8 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteRecordDone (SDataRecordInfo in_RecordInfo, UINT32 in_Status) = 0 Completion of asynchronous writing of data record. |
| virtual ERuntimeErrorCode | WriteSignals (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 ERuntimeErrorCode | WriteSignals (SDataValueByName * inout_Signals, UINT32 in_SignalCount) = 0 Writes multiple signals within a single API call. |
| virtual ERuntimeErrorCode | WriteString (const WCHAR * in_Tag, const CHAR * in_Value, const int in_CharsToWrite) = 0 |
| virtual ERuntimeErrorCode | WriteUInt16 (WCHAR * in_Tag, UINT16 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteUInt32 (WCHAR * in_Tag, UINT32 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteUInt64 (WCHAR * in_Tag, UINT64 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteUInt8 (WCHAR * in_Tag, UINT8 in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteWChar (WCHAR * in_Tag, WCHAR in_Value) = 0 Writes the value of a PLC variable. |
| virtual ERuntimeErrorCode | WriteWString (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
| Type | Name |
|---|---|
| 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_HardwareIdentifierThe ID of the module or submodule from which the diagnosis item is sent.in_ModuleStateState of the Module. Accepted states are:DMODULE_STATE_OK,DMODULE_STATE_ERROR,DMODULE_STATE_MAINT_DEMANDED,DMODULE_STATE_MAINT_REQUIRED.in_NumberOfDiagnosisEventsNumber of Diagnosis Events sent to the CPU.in_ArrayOfDiagnosisEventsPointer to an array of diagnosis items. The array must match with the number of diagnosis items. It may be NULL-Pointer.out_SequenceNumberUnique consecutive number assigned to every single alarm event.
function ArchiveStorage¶
Stores the virtual memory card in a .zip file. The virtual controller has to be in the operating state off.
virtual ERuntimeErrorCode IInstance::ArchiveStorage (
WCHAR * in_ArchiveStorageFile
) = 0
Parameters:
in_ArchiveStorageFileThe 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_FullFileNameThe 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:
keyIdThe 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_AreaThe 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_ProcessEventsPointer or reference to user-allocated memory which provides the array of downloaded Configured Process events.out_EventsCountPointer 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_IndexThe 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_IndexThe 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_NameA user allocated buffer for the device name.in_ArrayLengthThe 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_ShortDesignationA user allocated buffer for the short designation.in_ArrayLengthThe 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:
displayDataThe 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_NameA user allocated buffer for the instance name. The array length should be at least as big as DINSTANCE_NAME_MAX_LENGTH.in_ArrayLengthThe 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_PLCInterfaceIDID 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_StoragePathA user allocated buffer for the storage path. The array length should be at least as big as DSTARTUP_PATH_MAX_LENGTH.in_ArrayLengthThe 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:
enabledReceives 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_BufferLengthThe length of the user allocated buffer to take the tags.inout_TagInfosThe user allocated buffer to take the tags.out_TagCountReturns 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_TagListDetailsThe status of the tag list details. SRTLD_NONE if the list needs to be updated.out_IsHMIVisibleOnlyIf "true", only tags marked as "HMI Visible" are available in the list.
function HasDisplay¶
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:
hasDisplayThe 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_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get informed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_STOP, SROS_RUN }
function 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_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get informed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_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_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get informed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_STOP, SROS_RUN }
function ProcessEvent¶
This API is used to trigger the process event interrupt.
virtual ERuntimeErrorCode IInstance::ProcessEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Channel,
EProcessEventType in_ProcessEventType,
UINT16 * out_SequenceNumber
) = 0
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the process event is sent.in_ChannelThe channel of the I/O module from which the process event is generated.in_ProcessEventTypeOne value from the list of pre-defined process event types for S7-Modules. The event types are defined in the enumeration EProcessEventType.out_SequenceNumberUnique consecutive number assigned to every single alarm event.
function ProfileEvent¶
This API is used to trigger the Profile event OB (OB 57). Profile-Events are supported only for modules on a decentral IO-system.
virtual ERuntimeErrorCode IInstance::ProfileEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Specifier
) = 0
Parameters:
in_HardwareIdentifierThe ID of the module from which the Profile event is generated.in_SpecifierThe parameter is transmitted as alarm specifier in the alarm telegram and is available as input parameter of the OB 57 call.
function PullOrPlugEvent¶
This API is used to trigger the Pull and Plug events. For Pull and Plug Events, the interrupt OB 83 “Pull or plug of modules” is executed.
virtual ERuntimeErrorCode IInstance::PullOrPlugEvent (
UINT16 in_HardwareIdentifier,
EPullOrPlugEventType in_PullOrPlugEventType,
UINT16 * out_SequenceNumber
) = 0
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the Pull and Plug event is generated.in_PullOrPlugEventTypeOne value from the list of pre-defined pull or plug event types. The event types are defined in the enumeration EPullOrPlugEventType.out_SequenceNumberUnique consecutive number assigned to every single alarm event.
function RackOrStationFaultEvent¶
This API is used to trigger the RackOrStationFault event OB (OB 86). This event is only supported for Decentral devices.
virtual ERuntimeErrorCode IInstance::RackOrStationFaultEvent (
UINT16 in_HardwareIdentifier,
ERackOrStationFaultType in_EventType
) = 0
Parameters:
in_HardwareIdentifierThe HW ID of the device from which the RackOrStationFault event is generated.in_EventTypeThe event Type value from the list of pre-defined RackOrStationFault types. The event types are defined in the ERackOrStationFaultType.
function Read¶
Reads the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::Read (
WCHAR * in_Tag,
SDataValue * inout_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to read.inout_ValueContains 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_AreaThe area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.in_OffsetThe byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().in_BitThe bit offset inside the byte. Must be a value between 0 and 7.out_ValueReturns 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_TagThe name of the PLC variable to read.out_ValueContains 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_AreaThe area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.in_OffsetThe byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().out_ValueReturns 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_AreaThe area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.in_OffsetThe byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().in_BytesToReadContains the size of the value buffer.out_BytesReadContains the amount of bytes that have actually been written into the value buffer.inout_ValuesThe 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_RecordInfoStruct SDataRecordInfo which provides the DataRecord info.in_DataByte array of the Data Record read with the length specified by DataSize value of SDataRecordInfo.in_StatusStatus of the job execution.
function ReadSignals [¼]¶
Reads a list of signals at once. Only signals of the primitive data type are supported but the function is not type safe. The function is also taking care of the endianness.
virtual ERuntimeErrorCode IInstance::ReadSignals (
EArea in_Area,
SDataValueByAddress * inout_Signals,
UINT32 in_SignalCount,
bool in_ValidateAddressTag=false
) = 0
Parameters:
in_AreaThe area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.inout_SignalsThe list of the signals to read. The result will be stored in the struct.in_SignalCountThe 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_SignalsContains name, the value and the expected type of the PLC variable. If the expected type is UNSPECIFIC the expected type will be set to the stored type when the function returns successfully. The type STRUCT is not supported.in_SignalCountThe 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_AreaThe area to read from. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.inout_SignalsThe list of the signals to read.in_SignalCountThe amount of signals in the list.out_SignalsHaveChangedWill 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_SignalsContains name, the value and the expected type of the PLC variable. If the expected type is UNSPECIFIC the expected type will be set to the stored type when the function returns successfully. The type STRUCT is not supported.in_SignalCountThe amount of signals to read.out_SignalsHaveChangedWill return "true", if the value of at least one signal changed since the previous call.
function ReadString¶
Reads the value of a PLC string variable.
virtual ERuntimeErrorCode IInstance::ReadString (
const WCHAR * in_Tag,
CHAR * out_Value,
const int in_BufferSize,
int * out_CharsRead
) = 0
Parameters:
in_TagThe name of the PLC variable to read.out_ValueContains the value of the PLC variable.
Parameters:
in_BufferSizeSize of the input buffer.
///
Parameters:
out_CharsReadNumber 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains 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_TagThe name of the PLC variable to read.out_ValueContains the value of the PLC variable.
Parameters:
in_BufferSizeSize of the input buffer.
///
Parameters:
out_CharsReadNumber 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_CallbackFunctionA 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_CallbackFunctionA 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_CallbackFunctionA 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_CallbackFunctionA 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_EventThe 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_CallbackFunctionA 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_EventThe 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_CallbackFunctionA 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_EventThe 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_CallbackFunctionA 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_EventThe 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_CallbackFunctionA 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_EventThe 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_CallbackFunctionA 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_CallbackFunctionA 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_CallbackFunctionA 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_CallbackFunctionA 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_CallbackFunctionA 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_CallbackFunctionA 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_EventThe 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_CallbackFunctionA 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_ArchiveFileThe 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_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get informed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_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_IoSystemIdBus ID.in_BusTimeStamp_nsTimestamp 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_CPUTypeDefines 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_CycleTimeMonitoringModeThe CycleMonitoringMode mode of the virtual controller.in_MaxCycleTime_nsThe maximum cycle value in nano seconds.
function SetCycleTimeMonitoringMode [2/2]¶
Sets the ECycleTimeMonitoringMode value
virtual ERuntimeErrorCode IInstance::SetCycleTimeMonitoringMode (
ECycleTimeMonitoringMode in_CycleTimeMonitoringMode
) = 0
Parameters:
in_CycleTimeMonitoringModeThe 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_InterfaceIDThe ID of the network interface.in_IPSuiteThe IP suite to be set to the network interface. The IP suite is containing the IP address, the subnet mask and the default gateway. If the communication interface is set to Softbus, subnet mask and default gateway will be ignored.in_IsRemanentIf set to true, the IP suite will be restored after restarting the virtual controller. If the communication interface is set to Softbus this flag will be ignored.
function SetNetInterfaceMapping [⅓]¶
Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface.
virtual ERuntimeErrorCode IInstance::SetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID,
DWORD in_PCInterfaceIndex
) = 0
Parameters:
in_PLCInterfaceIDID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)in_PCInterfaceIndexIndex of computer interface. If this value is 0, mapping will be deleted.
function SetNetInterfaceMapping [⅔]¶
Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface.
virtual ERuntimeErrorCode IInstance::SetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID,
const WCHAR * in_PCInterfaceName
) = 0
Parameters:
in_PLCInterfaceIDID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)in_PCInterfaceNameA user-friendly name for the computer interface.
function SetNetInterfaceMapping [3/3]¶
Set interface mappings between PLC interface and computer interface. Ethernet packets received by specified computer interface will be forwarded to the associated PLC interface.
virtual ERuntimeErrorCode IInstance::SetNetInterfaceMapping (
EPLCInterface in_PLCInterfaceID,
const SMACAddress * in_MACAddressParam
) = 0
Parameters:
in_PLCInterfaceIDID of the PLC interface for which MAC address should be set. Fixed range 0 - 2 (IE1 - IE3)in_MACAddressParamHardware MAC address of the computer interface.
function 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_OperatingModeThe 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_nsThe 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_ValueThe 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_EnableIf 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_StoragePathThe 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:
enabletrue 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_SystemTimeThe 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_nsThe minimal virtual time in nanoseconds the virtual controller will run before going into freeze state.
function StatusEvent¶
This API is used to trigger the Status event OB (OB 55). Status-Events are supported only for modules on a decentral IO-system.
virtual ERuntimeErrorCode IInstance::StatusEvent (
UINT16 in_HardwareIdentifier,
UINT16 in_Specifier
) = 0
Parameters:
in_HardwareIdentifierThe ID of the module or submodule from which the Status event is sent.in_SpecifierThe parameter is transmitted as alarm specifier in the alarm telegram and is available as input parameter of the OB 55 call.
function Stop [½]¶
Requests the virtual controller to switch into stop mode.
virtual 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_msA timeout value in milliseconds.- If no timeout is set the function returns immediately. Subscribe to the OnOperatingStateChanged() event to get informed when the operation is done.
- If set to a value greater than 0 (recommended is a value of 60000) the function will return after the operation is done or after the timeout value. Expected operating states for this function to return successfully are: { SROS_STOP }
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_HardwareIdentifierThe ID of the module from which the Update event is generated.in_SpecifierThe parameter is transmitted as alarm specifier in the alarm telegram and is available as input parameter of the OB 56 call.
function UpdateTagList [¼]¶
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual ERuntimeErrorCode IInstance::UpdateTagList (
ETagListDetails in_TagListDetails,
bool in_IsHMIVisibleOnly
) = 0
Parameters:
in_TagListDetailsAny combination of the following four areas: IO: Inputs and Outputs M: Marker CT: Counter and Timer DB: Data blocks e.g. IOM will only read the tags from the input/output and marker area. The default value is IOMCTDB.in_IsHMIVisibleOnlyIf "true", only tags marked as "HMI Visible" will be read. The default value is "false".
function UpdateTagList [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_TagListDetailsAny combination of the following four areas: IO: Inputs and Outputs M: Marker CT: Counter and Timer DB: Data blocks e.g. IOM will only read the tags from the input/output and marker area. The default value is IOMCTDB.
function UpdateTagList [¾]¶
Reads the tags from the VPLC and writes them into the shared memory ordered by name.
virtual 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_TagListDetailsAny combination of the following four areas: IO: Inputs and Outputs M: Marker CT: Counter and Timer DB: Data blocks e.g. IOM will only read the tags from the input/output and marker area. The default value is IOMCTDB.in_IsHMIVisibleOnlyIf "true", only tags marked as "HMI Visible" will be read. The default value is "false".in_DataBlockFilterListA string including the names of all data blocks that should be available in the tag entry storage.
function WaitForOnDisplayDataChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool 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_msThe value for the timeout limit in milliseconds.
function WaitForOnHardwareConfigChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool 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_msThe value for the timeout limit in milliseconds.
function WaitForOnIPAddressChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool 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_msThe value for the timeout limit in milliseconds.
function WaitForOnLedChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool 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_msThe value for the timeout limit in milliseconds.
function WaitForOnOperatingStateChangedEvent [½]¶
The function will block until the registered event object is in the signaled state or the timeout interval elapses.
virtual bool 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_msThe 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. IfINFINITE, 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_msThe 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_SymbolTagThe name of the PLC variable to write.in_ValueContains 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_AreaThe area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.in_OffsetThe byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().in_BitThe bit offset inside the byte. Must be a value between 0 and 7.in_ValueThe 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_TagThe name of the PLC variable to write.in_ValueContains 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_AreaThe area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.in_OffsetThe byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().in_ValueThe 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_AreaThe area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.in_OffsetThe byte offset inside the area. The value must be between 0 and the value returned by GetAreaSize().in_BytesToWriteContains the size of the value array to be written.out_BytesWrittenContains the amount of bytes that have actually been written.in_ValuesArray 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_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteDouble¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteDouble (
WCHAR * in_Tag,
double in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteFloat¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteFloat (
WCHAR * in_Tag,
float in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt16¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteInt16 (
WCHAR * in_Tag,
INT16 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt32¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteInt32 (
WCHAR * in_Tag,
INT32 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt64¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteInt64 (
WCHAR * in_Tag,
INT64 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteInt8¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteInt8 (
WCHAR * in_Tag,
INT8 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteRecordDone¶
Completion of asynchronous writing of data record.
virtual ERuntimeErrorCode IInstance::WriteRecordDone (
SDataRecordInfo in_RecordInfo,
UINT32 in_Status
) = 0
Parameters:
in_RecordInfoStruct SDataRecordInfo which provides the DataRecord info.in_StatusStatus 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_AreaThe area to write to. Allowed values are: {SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.inout_SignalsThe list of the signals to write.in_SignalCountThe 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_SignalsContains the name, value and the expected type of the PLC variable to write. The type UNSPECIFIC and STRUCT are not supported.in_SignalCountThe 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_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.in_CharsToWriteNumber 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_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteUInt32¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteUInt32 (
WCHAR * in_Tag,
UINT32 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteUInt64¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteUInt64 (
WCHAR * in_Tag,
UINT64 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteUInt8¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteUInt8 (
WCHAR * in_Tag,
UINT8 in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteWChar¶
Writes the value of a PLC variable.
virtual ERuntimeErrorCode IInstance::WriteWChar (
WCHAR * in_Tag,
WCHAR in_Value
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.
function WriteWString¶
Writes the value of a PLC wstring variable.
virtual ERuntimeErrorCode IInstance::WriteWString (
const WCHAR * in_Tag,
const WCHAR * in_Value,
const int in_CharsToWrite
) = 0
Parameters:
in_TagThe name of the PLC variable to write.in_ValueContains the value of the PLC variable to write.in_CharsToWriteNumber of characters to be written.
function ~IInstance¶
inline virtual IInstance::~IInstance ()