Table 7- 346 Createinterface() - Native C - Siemens Simatic S7-1500 Function Manual

Hide thumbs Also See for Simatic S7-1500:
Table of Contents

Advertisement

User interfaces (API)
7.7 API IRemoteRuntimeManager
CreateInterface()
Creates and returns an interface of an already registered instance of a virtual controller.
The instance could have been registered via the application or another application that uses
the Simulation Runtime API.

Table 7- 346 CreateInterface() - Native C++

Syntax
Parameters
Return values
Example C++
Example C++
Note
Native C++
If you no longer require the interface, delete it.
See DestroyInterface() (Page 101)
274
ERuntimeErrorCode CreateInterface(
WCHAR* in_InstanceName,
IInstance** out_InstanceInterface
);
ERuntimeErrorCode CreateInterface(
INT32 in_InstanceID,
IInstance** out_InstanceInterface
);
INT32 in_InstanceID:
The ID of the registered instance from which you want to receive the interface.
WCHAR* in_InstanceName:
The name of the registered instance from which you want to receive the inter-
face.
IInstance** out_InstanceInterface:
Pointer to a Simulation Runtime interface pointer. The pointer must be initial-
ized with
. The interface is created within the function.
NULL
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVE
D
SREC_TIMEOUT
SREC_WRONG_ARGUMENT
SREC_DOES_NOT_EXIST
ISimulationRuntimeManager * api = NULL;
ERuntimeErrorCode result = Initialize(&api);
IInstance* psa1 = NULL;
IInstance* psa2 = NULL;
if (result == SREC_OK)
{
CreateInterface
result = api->
CreateInterface
result = api->
psa1
}
ISimulationRuntimeManager * api = NULL;
ERuntimeErrorCode result = Initialize(&api);
IInstance* psa = NULL;
if (result == SREC_OK)
{
CreateInterface
result = api->
&psa);
}
Condition
The function is successful.
The interface is disconnected from the remote Runtime
Manager.
The function does not return on time.
The name, the ID or the IInstance- pointer is invalid.
The instance is not registered in Runtime Manager.
(0, &psa1);
(0, &psa2); // psa2 will be the same as
(L"My SimulationRuntime Instance",
Function Manual, 12/2017, A5E37039512-AB
S7-PLCSIM Advanced

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents