Siemens Simatic S7-1500 Function Manual page 116

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

Advertisement

User interfaces (API)
7.5 API ISimulationRuntimeManager
RegisterCustomInstance()
Registers a new instance of a virtual controller in Runtime Manager. Creates and returns an
interface of this instance.
Table 7- 55
Syntax
Parameters
Return values
Example C++
Note
Native C++
If you no longer require the interface, delete it.
See DestroyInterface() (Page 101).
116
RegisterCustomInstance() - Native C++
ERuntimeErrorCode RegisterCustomInstance(
WCHAR* in_VplcDll,
IInstance** out_InstanceInterface
);
ERuntimeErrorCode RegisterCustomInstance(
WCHAR* in_VplcDll,
WCHAR* in_InstanceName,
IInstance** out_InstanceInterface
);
WCHAR* in_VplcDll:
The complete path to the DLL of the virtual controller that Sie-
mens.Simatic.Simulation.Runtime.Instance.exe loads at PowerOn.
WCHAR* in_InstanceName:
Name to be assigned to the instance. Every instance must have a unique
name. If no name is assigned when registering a new instance, the instance is
given the name
"Instance_#"
exists, the name
that is incremented until the name is unique. The length of the name must be
less than
DINSTANCE_NAME_LENGTH
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_LIMIT_REACHED
SREC_ALREADY_EXISTS
ISimulationRuntimeManager * api = ZERO;
ERuntimeErrorCode result = Initialize(&api);
// Example: How To Create And Register An Instance
IInstance* psa = ZERO;
if (result == SREC_OK)
{
RegisterCustomInstance
result = api->
}
(# is the ID of the instance). If this name already
is used, in which the second # is a counter
"Instance_#.#"
. See Data types (Page 306).
Condition
The function is successful.
The function does not return on time.
The DLL name, the instance name or the
IInstance pointer is invalid.
There are already 16 instances regis-
tered in Runtime Manager.
An instance with this name already ex-
ists.
("C:\\Temp\\vplc.dll");
Function Manual, 12/2017, A5E37039512-AB
S7-PLCSIM Advanced

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents