Siemens Simatic S7-1500 Function Manual page 131

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

Advertisement

GetName() / Name { get; }
Returns the name of the instance.
Table 7- 92
Syntax
Parameters
Return values
Example C++
Table 7- 93
Syntax
Parameters
Return values
Exceptions
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB
GetName() - Native C++
ERuntimeErrorCode GetName(
WCHAR inout_Name[],
UINT32 in_ArrayLength
);
WCHAR inout_Name[]:
A user-allocated storage for the name of the instance. The field length should
be at least as long as
See Definitions and constants (Page 306).
UINT32 in_ArrayLength:
Field length (Wide character)
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVED
SREC_WRONG_ARGUMENT
ISimulationRuntimeManager * api = NULL;
ERuntimeErrorCode result = Initialize(&api);
IInstance* psa = NULL;
if (result == SREC_OK)
{
result = api->RegisterInstance(&psa);
}
WCHAR name[DINSTANCE_NAME_MAX_LENGTH];
if (result == SREC_OK)
{
GetName
result = psa->
}
Name { get; } - .NET (C#)
string Name { get; }
None
Name of the instance.
Siemens.Simatic.Simulation.Runtime.SimulationRuntimeException
Runtime error code
ERuntimeError-
Code.InterfaceRemoved
DINSTANCE_NAME_MAX_LENGTH
Condition
The function is successful.
The instance is not registered in Runtime
Manager.
The name does not fit in the storage.
(name, DINSTANCE_NAME_MAX_LENGTH);
Condition
The instance is not registered in Runtime
Manager.
User interfaces (API)
7.6 API IInstances
.
131

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents