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

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

Advertisement

ReadSignals()
Reads multiple signals within an API call. When the function is called for the first time, it
stores internal information in the structures
the subsequent calls.
Note
To simulate a regular exchange of signals, create a signal list for each set of signals. Use
this signal list for all further accesses. Create a new list as soon as the set of signals
changes.
Table 7- 190 ReadSignals() - Native C++
Syntax
Parameters
Signal error
Return values
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB
ERuntimeErrorCode ReadSignals(
SDataValueByName* inout_Signals,
UINT32 in_SignalCount
);
ERuntimeErrorCode ReadSignals(
SDataValueByNameWithCheck* inout_Signals,
UINT32 in_SignalCount
bool* out_SignalsHaveChanged
);
SDataValueByName* inout_Signals:
Contains the name, the value and the expected type of the PLC tag. If the ex-
pected type is
UNSPECIFIC
successful. The
STRUCT
SDataValueByNameWithCheck* inout_Signals:
Contains the name, the value and the expected type of the PLC tag. If the ex-
pected type is
UNSPECIFIC
successful. The
STRUCT
if the value of the signal has changed since the preceding call.
true
UINT32 in_SignalCount:
The number of signals to be read.
bool* out_SignalsHaveChanged:
Returns
if the value of at least one signal has changed since the preced-
true
ing call.
Runtime error code
SREC_OK
SREC_DOES_NOT_EXIST
SREC_NOT_SUPPORTED
SREC_TYPE_MISMATCH
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVED
SREC_TIMEOUT
SREC_INSTANCE_NOT_RUNNING
SREC_NOT_UP_TO_DATE
SREC_SIGNAL_CONFIGURATION_ERROR
* to improve the performance of
SDataValueByName
, it is set to the stored type when the function was
type is not supported.
, it is set to the stored type when the function was
type is not supported.
"ValueHasChanged"
Condition
The signal operation is successful.
The entry does not exist in the stored tag
table.
Access to entire structures or arrays is
not supported.
The expected type does not match the
stored type. See Compatible primitive
data types (Page 335).
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 stored tag list must be updated.
At least one signal error is in the list.
User interfaces (API)
7.6 API IInstances
is set to
189

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents