User interfaces (API)
7.6 API IInstances
7.6.8.2
ReadRecordDone / WriteRecordDone
ReadRecordDone()
With this API method, the simulation of an I/O module signals to the CPU that the
asynchronous reading of a data record has been completed. The simulation hereby makes
the read information available.
Table 7- 242 ReadRecordDone() - Native C++
Syntax
Parameters
Return values
Table 7- 243 ReadRecordDone() - .NET (C#)
Syntax
Parameters
Return values
Exceptions
230
ERuntimeErrorCode ReadRecordDone(
SDataRecordInfo in_RecordInfo,
BYTE* in_Data,
UINT32 in_Status
);
•
SDataRecordInfo in_RecordInfo:
Structure which contains the data record information.
See SDataRecordInfo (Page 321).
•
BYTE* in_Data:
Byte array of the read data record with the length defined by
structure
SDataRecordInfo
•
UINT32 in_Status:
Status of the job execution
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVED
SREC_DOES_NOT_EXIST
SREC_TIMEOUT
void ReadRecordDone(
SDataRecordInfo in_RecordInfo,
BYTE[] in_Data,
UInt32 in_Status
);
•
SDataRecordInfo in_RecordInfo:
Structure which contains the data record information.
See SDataRecordInfo (Page 321).
•
BYTE[] in_Data:
Byte array of the read data record with the length defined by
structure
SDataRecordInfo
•
UInt32 in_Status:
Status of the job execution
None
Siemens.Simatic.Simulation.Runtime.SimulationRuntimeException
Runtime error code
ERuntimeError-
Code.InterfaceRemoved
ERuntimeErrorCode.DoesNotExist
ERuntimeErrorCode.Timeout
.
Condition
The function is successful.
The instance is not registered in Runtime
Manager.
No hardware identifier of the module.
The function does not return on time.
.
Condition
The instance is not registered in Runtime
Manager.
No hardware identifier of the module.
The function does not return on time.
Function Manual, 12/2017, A5E37039512-AB
in the
DataSize
in the
DataSize
S7-PLCSIM Advanced