I/O Access Via Tag Name - Writing - Siemens Simatic S7-1500 Function Manual

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

Advertisement

7.6.5.5

I/O access via tag name - Writing

Individual access to IO data is used for displaying and writing values that are not refreshed
regularly in a graphical user interface (GUI).
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.
For the signal lists use the functions
Write()
Writes the value of a PLC tag.
Table 7- 192 Write() - Native C++
Syntax
Parameters
Return values
S7-PLCSIM Advanced
Function Manual, 12/2017, A5E37039512-AB
ReadSignals()
ERuntimeErrorCode Write(
WCHAR* in_Tag,
SDataValue* in_Value
);
WCHAR* in_Tag:
The name of the PLC tag that is to be written.
SDataValue* in_Value:
Contains the value and the expected type of the PLC tag. The
types are not supported.
STRUCT
Structures and fields can be emulated through signal lists and then be read by
using the
ReadSignals()
function.
Runtime error code
SREC_OK
SREC_INTERFACE_REMOVED
SREC_TIMEOUT
SREC_INSTANCE_NOT_RUNNING
SREC_DOES_NOT_EXIST
SREC_NOT_SUPPORTED
SREC_TYPE_MISMATCH
SREC_NOT_UP_TO_DATE
SREC_WRONG_ARGUMENT
and
WriteSignals()
function and written by using the
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 entry does not exist in the stored tag
list.
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).
The stored tag list must be updated.
The expected type is
User interfaces (API)
7.6 API IInstances
.
and
UNSPECIFIC
WriteSignals()
.
UNSPECIFIC
191

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents