Readbit() - 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
Table 7- 146 ReadBit() - Native C++
Syntax
Parameters
Return values
Table 7- 147 ReadBit() - .NET (C#)
Syntax
Parameters
Return values
Exceptions
160
ERuntimeErrorCode ReadBit(
EArea in_Area,
UINT32 in_Offset,
UINT8 in_Bit,
bool* out_Value
);
EArea in_Area:
The area from which you want to read. Permissible values:
{SRA_INPUT, SRA_MARKER, SRA_OUTPUT}.
UINT32 in_Offset:
The byte offset within the area. The value must be between 0 and the value
that
returns.
GetAreaSize()
UINT8 in_Bit:
The bit offset within the byte. The value must be between 0 and 7.
bool* out_Value:
Returns the bit value.
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVED
SREC_TIMEOUT
SREC_INSTANCE_NOT_RUNNING
SREC_INDEX_OUT_OF_RANGE
SREC_WRONG_ARGUMENT
bool InputArea.ReadBit(
UInt32 in_Offset,
Byte in_Bit
);
bool MarkerArea.ReadBit(
UInt32 in_Offset,
Byte in_Bit
);
bool OutputArea.ReadBit(
UInt32 in_Offset,
Byte in_Bit
);
UInt32 in_Offset:
The byte offset within the area. The value must be between 0 and the value
that
returns.
AreaSize
Byte in_Bit:
The bit offset within the byte. The value must be between 0 and 7.
Bit value
bool:
Siemens.Simatic.Simulation.Runtime.SimulationRuntimeException
Runtime error code
ERuntimeError-
Code.InterfaceRemoved
ERuntimeErrorCode.Timeout
ERuntimeError-
Code.InstanceNotRunning
ERuntimeError-
Code.IndexOutOfRange
See EArea (Page 330).
Condition
The function is successful.
The instance is not registered in Runtime Man-
ager.
The function does not return on time.
The process of the virtual controller is not run-
ning.
Offset or bits are invaid.
The area is invalid.
Condition
The instance is not registered in Runtime Man-
ager.
The function does not return on time.
The process of the virtual controller is not run-
ning.
Offset or bits are invaid.
Function Manual, 12/2017, A5E37039512-AB
S7-PLCSIM Advanced

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents