Writebytes() - Native C - Siemens Simatic S7-1500 Function Manual

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

Advertisement

User interfaces (API)
7.6 API IInstances
WriteBytes()
Writes a byte array to the area.
Note
Data can be overwritten
The function allows access to the entire storage area of the virtual controller.
In particular, do not write to bytes that belong to other applications or contain internal data,
for example, qualifier bits for fail-safe I/O modules.
Therefore, use access via the tag name (Page 191) and not via the address areas.
Table 7- 158 WriteBytes() - Native C++
Syntax
Parameters
Return values
170
ERuntimeErrorCode WriteBytes(
EArea in_Area,
UINT32 in_Offset,
UINT32 in_BytesToWrite,
UINT32* out_BytesWritten,
BYTE in_Values[])
;
EArea in_Area:
The area that is to be written.
Permissible values:
{SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
See EArea (Page 330).
UINT32 in_Offset:
The byte offset within the area. The value must be between 0 and the value
that
returns.
GetAreaSize()
UINT32 in_BytesToWrite:
Contains the size of the array value to be written.
UINT32* out_BytesWritten:
Contains the number of bytes that were just written.
BYTE in_Values[]:
Byte array that is to be written to the area.
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVED
SREC_TIMEOUT
SREC_INSTANCE_NOT_RUNNING
SREC_INDEX_OUT_OF_RANGE
SREC_WRONG_ARGUMENT
Condition
The function is successful.
The instance is not registered in Runtime
Manager.
The function does not return on time.
The process of the virtual controller is not
running.
The offset is outside the area size. No
byte could be written.
The area is invalid.
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents