Readbytes() - .Net (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
Table 7- 151 ReadBytes() - .NET (C#)
Syntax
Parameters
Return values
Exceptions
ReadSignals()
Structures and fields can be emulated through signal lists and be read by using the
ReadSignals()
The function also takes into consideration the byte order (Endianness).
Only primitive data type signals are supported, but the function is not type-safe.
Note
The function allows access to the entire storage area of the virtual controller.
Therefore, use access via the tag name (Page 173) and not via the address areas.
164
Byte[] InputArea.ReadBytes(
UInt32 in_Offset,
UInt32 in_BytesToRead
);
Byte[] MarkerArea.ReadBytes(
UInt32 in_Offset,
UInt32 in_BytesToRead
);
Byte[] OutputArea.ReadBytes(
UInt32 in_Offset,
UInt32 in_BytesToRead
);
UInt32 in_Offset:
The byte offset within the area. The value must be between 0 and the value
that
returns.
AreaSize
UInt32 in_BytesToRead:
The number of bytes to be read.
The read bytes.
Byte[]:
Siemens.Simatic.Simulation.Runtime.SimulationRuntimeException
Runtime error code
ERuntimeError-
Code.InterfaceRemoved
ERuntimeErrorCode.Timeout
ERuntimeError-
Code.InstanceNotRunning
ERuntimeError-
Code.IndexOutOfRange
function.
Condition
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 read.
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents