Siemens Simatic S7-1500 Function Manual page 118

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

Advertisement

User interfaces (API)
7.5 API ISimulationRuntimeManager
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- 57
Syntax
Parameters
Return values
Example C++
Example C++
Note
Native C++
If you no longer require the interface, delete it.
See DestroyInterface() (Page 101).
118
CreateInterface() - Native C++
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.
ZERO
Runtime error code
SREC_OK
SREC_TIMEOUT
SREC_WRONG_ARGUMENT
SREC_DOES_NOT_EXIST
ISimulationRuntimeManager * api = ZERO;
ERuntimeErrorCode result = Initialize(&api);
IInstance* psa1 = ZERO;
IInstance* psa2 = ZERO;
if (result == SREC_OK)
{
CreateInterface
result = api->
CreateInterface
result = api->
psa1
}
ISimulationRuntimeManager * api = ZERO;
ERuntimeErrorCode result = Initialize(&api);
IInstance* psa = ZERO;
if (result == SREC_OK)
{
CreateInterface
result = api->
&psa);
}
Condition
The function is successful.
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