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

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

Class IBaseRuntimeManager

ClassList > IBaseRuntimeManager

  • #include <SimulationRuntimeApi.h>

Inherits the following classes: IBaseInterface

Inherited by the following classes: IRemoteRuntimeManager, ISimulationRuntimeManager

Public Functions

TypeName
virtual ERuntimeErrorCodeCreateInterface (INT32 in_InstanceID, IInstance ** out_InstanceInterface) = 0
Creates and returns an interface of an already registered virtual controller instance.
virtual ERuntimeErrorCodeCreateInterface (WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0
Creates and returns an interface of an already registered virtual controller instance.
virtual ERuntimeErrorCodeGetDefaultStoragePath (WCHAR * out_DefaultStoragePath) = 0
Get default storage path for instances.
virtual ERuntimeErrorCodeGetNetInterfaces (SNetInterfaceInfo * inout_InterfaceInfo, UINT * inout_InterfaceCount) = 0
Retrieve info about computer network interfaces, which can be used by the SetInterfaceMapping function
virtual ERuntimeErrorCodeGetNetworkMode (ENetworkMode * out_mode) = 0
Get the current network mode setting that will be used on the network adapter for distributed communication.
virtual UINT16GetPort () = 0
Returns the open port. Returns 0 if no port is open or if the function fails.
virtual ERuntimeErrorCodeGetRegisteredInstanceInfoAt (UINT32 in_Index, SInstanceInfo * out_InstanceInfo) = 0
Returns the info about an already registered instance. You can use its ID or name to create an interface of this instance.
virtual UINT32GetRegisteredInstancesCount () = 0
Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails.
virtual enum ERuntimeErrorCodeGetStrictMotionTiming (bool * enabled) = 0
Get the current default strict motion timing setting for newly created instances.
virtual UINT32GetVersion () = 0
Returns the version of the Runtime Manager. If the function fails, the version returned is 0.
virtual ERuntimeErrorCodeRegisterCustomInstance (WCHAR * in_VplcDll, IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeRegisterCustomInstance (WCHAR * in_VplcDll, WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeRegisterInstance (IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeRegisterInstance (WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeRegisterInstance (ECPUType in_CPUType, IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeRegisterInstance (ECPUType in_CPUType, WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeRegisterInstance (const WCHAR * in_ArticleNumber, const WCHAR * in_InstanceName, IInstance ** out_InstanceInterface) = 0
Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.
virtual ERuntimeErrorCodeResetNetInterfaceBindings () = 0
Resets bindings to the default state.
virtual ERuntimeErrorCodeSetDefaultStoragePath (const WCHAR * in_DefaultStoragePath) = 0
Set the default storage path.
virtual ERuntimeErrorCodeSetNetInterfaceBindings (DWORD in_PCInterfaceIndex=0) = 0
Sets bindings of PLCSIM Virtual Switch to PC interfaces according to networking mode and network interface mapping configuration for the instance. This function must be called from an elevated session (admin mode).
virtual ERuntimeErrorCodeSetNetworkMode (const ENetworkMode in_mode) = 0
Set the network mode that will be used on the network adapter for distributed communication. User has to check if bindings on network interfaces are correct.
virtual enum ERuntimeErrorCodeSetStrictMotionTiming (bool enable) = 0
Enable or disable default strict motion timing for newly created instances.
virtual~IBaseRuntimeManager ()

Public Functions inherited from IBaseInterface

See IBaseInterface

TypeName
virtual~IBaseInterface ()

Public Functions Documentation

function CreateInterface [½]

Creates and returns an interface of an already registered virtual controller instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::CreateInterface (
    INT32 in_InstanceID,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_InstanceID The name of the registered instance you would like to get the interface from.
  • out_InstanceInterface The ID of the registered instance you would like to get the interface from.

function CreateInterface [2/2]

Creates and returns an interface of an already registered virtual controller instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::CreateInterface (
    WCHAR * in_InstanceName,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_InstanceName The name of the registered instance you would like to get the interface from.
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The pointer must be initialized with NULL. The interface will be created inside the function.

function GetDefaultStoragePath

Get default storage path for instances.

virtual ERuntimeErrorCode IBaseRuntimeManager::GetDefaultStoragePath (
    WCHAR * out_DefaultStoragePath
) = 0

Parameters:

  • out_DefaultStoragePath Output parameter which is filled with the default storage path

function GetNetInterfaces

Retrieve info about computer network interfaces, which can be used by the SetInterfaceMapping function.

virtual ERuntimeErrorCode IBaseRuntimeManager::GetNetInterfaces (
    SNetInterfaceInfo * inout_InterfaceInfo,
    UINT * inout_InterfaceCount
) = 0

Parameters:

  • inout_InterfaceInfo Address of first item of SNetInterfaceInfo array, which will get information about computer network adapters. Or NULL if only number of network adapters is requested.
  • inout_InterfaceCount At input, number of SNetInterfaceInfo items allocated by user, at the output real number of computer adapters (array items).

Returns:

SREC_OK or SREC_INDEX_OUT_OF_RANGE if number of array items provided is lower than number of computer adapters.

function GetNetworkMode

Get the current network mode setting that will be used on the network adapter for distributed communication.

virtual ERuntimeErrorCode IBaseRuntimeManager::GetNetworkMode (
    ENetworkMode * out_mode
) = 0

Parameters:

  • out_mode Type of network communication mode to set

function GetPort

Returns the open port. Returns 0 if no port is open or if the function fails.

virtual UINT16 IBaseRuntimeManager::GetPort () = 0

function GetRegisteredInstanceInfoAt

Returns the info about an already registered instance. You can use its ID or name to create an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::GetRegisteredInstanceInfoAt (
    UINT32 in_Index,
    SInstanceInfo * out_InstanceInfo
) = 0

Parameters:

  • in_Index Index of the created instance you want to get the info from. Must be smaller than the value you get from calling GetRegisteredInstanceCount().
  • out_InstanceInfo The info of the instance containing its name and ID.

function GetRegisteredInstancesCount

Returns the number of instances registered at the RuntimeManager. Returns 0 if the function fails.

virtual UINT32 IBaseRuntimeManager::GetRegisteredInstancesCount () = 0

function GetStrictMotionTiming

Get the current default strict motion timing setting for newly created instances.

virtual enum ERuntimeErrorCode IBaseRuntimeManager::GetStrictMotionTiming (
    bool * enabled
) = 0

Parameters:

  • enabled true for enabled, false for disabled.

Returns:

ERuntimeErrorCode::SREC\_OK - Success. #ERuntimeErrorCode::SREC\_CONFIG\_FILE\_ERROR - Could not load the value from the configuration file UserInterfaceConfiguration.xml

function GetVersion

Returns the version of the Runtime Manager. If the function fails, the version returned is 0.

virtual UINT32 IBaseRuntimeManager::GetVersion () = 0

function RegisterCustomInstance [½]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterCustomInstance (
    WCHAR * in_VplcDll,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_VplcDll The complete path to the DLL of the virtual controller the Siemens.Simatic.Simulation.Runtime.Instance.exe will load when powering on.
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function RegisterCustomInstance [2/2]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterCustomInstance (
    WCHAR * in_VplcDll,
    WCHAR * in_InstanceName,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_VplcDll The complete path to the DLL of the virtual controller the Siemens.Simatic.Simulation.Runtime.Instance.exe will load when powering on.
  • in_InstanceName This will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
    If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller than DINSTANCE_NAME_LENGTH.
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function RegisterInstance [⅕]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function RegisterInstance [⅖]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
    WCHAR * in_InstanceName,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_InstanceName This will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
    If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller than DINSTANCE_NAME_LENGTH.
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function RegisterInstance [⅗]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
    ECPUType in_CPUType,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_CPUType Defines which type of CPU will be simulated when starting the instance. The default value is "SRCT_1500_Unspecified".
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function RegisterInstance [⅘]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
    ECPUType in_CPUType,
    WCHAR * in_InstanceName,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_CPUType Defines which type of CPU will be simulated when starting the instance. The default value is "SRCT_1500_Unspecified".
  • in_InstanceName This will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
    If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller than DINSTANCE_NAME_LENGTH.
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function RegisterInstance [5/5]

Registers a new instance of a virtual controller at the Runtime Manager. Also creates and returns an interface of this instance.

virtual ERuntimeErrorCode IBaseRuntimeManager::RegisterInstance (
    const WCHAR * in_ArticleNumber,
    const WCHAR * in_InstanceName,
    IInstance ** out_InstanceInterface
) = 0

Parameters:

  • in_ArticleNumber Defines which article number CPU will be simulated when starting the instance. The default value is "6ES7 SIM-01500-APLC".
  • in_InstanceName This will be the name of the instance. Each instance must have a unique name. If no name is given when registering a new instance, the instance is named "Instance_#" where # is the ID of the instance.
    If this name already exists, the name will be "Instance_#.#" where the second # is a counter that will be increased until the name is unique. The length of the name must be smaller than DINSTANCE_NAME_LENGTH.
  • out_InstanceInterface Pointer to a SimulationRuntime interface pointer. The Pointer must be initialized with NULL. The interface will be created inside the function.

function ResetNetInterfaceBindings

Resets bindings to the default state.

virtual ERuntimeErrorCode IBaseRuntimeManager::ResetNetInterfaceBindings () = 0

function SetDefaultStoragePath

Set the default storage path.

virtual ERuntimeErrorCode IBaseRuntimeManager::SetDefaultStoragePath (
    const WCHAR * in_DefaultStoragePath
) = 0

Parameters:

  • in_DefaultStoragePath Input parameter which specifies the default storage path

function SetNetInterfaceBindings

Sets bindings of PLCSIM Virtual Switch to PC interfaces according to networking mode and network interface mapping configuration for the instance. This function must be called from an elevated session (admin mode).

virtual ERuntimeErrorCode IBaseRuntimeManager::SetNetInterfaceBindings (
    DWORD in_PCInterfaceIndex=0
) = 0

Parameters:

  • in_PCInterfaceIndex If promiscuous mode is set, then PC interface index can be specified, which will be used for communication over the network. To enable only local PC communication, provide zero (0) value. In non-promiscuous mode, this parameter is ignored and binding is set according to configured interface mappings.

function SetNetworkMode

Set the network mode that will be used on the network adapter for distributed communication. User has to check if bindings on network interfaces are correct.

virtual ERuntimeErrorCode IBaseRuntimeManager::SetNetworkMode (
    const ENetworkMode in_mode
) = 0

Parameters:

  • in_mode Type of network communication mode to set

function SetStrictMotionTiming

Enable or disable default strict motion timing for newly created instances.

virtual enum ERuntimeErrorCode IBaseRuntimeManager::SetStrictMotionTiming (
    bool enable
) = 0

Parameters:

  • enable true to enable, false to disable.

Returns:

ERuntimeErrorCode::SREC\_OK - Success. #ERuntimeErrorCode::SREC\_ALREADY\_EXISTS - An instance is already registered. Remove all instances before calling this method. #ERuntimeErrorCode::SREC\_ACCESS\_DENIED - Missing write permission for the configuration file. #ERuntimeErrorCode::SREC\_CONFIG\_FILE\_ERROR - Could not save the value into the configuration file UserInterfaceConfiguration.xml

function ~IBaseRuntimeManager

inline virtual IBaseRuntimeManager::~IBaseRuntimeManager ()