Professional Documents
Culture Documents
SIEMENS Put-Get
SIEMENS Put-Get
Classification
The parameters of the instructions for S7 communication can be divided into the following five catego‐
ries according to their functions:
Control parameter
Data exchange will only be activated if the appropriate control parameters have a defined value (for
example, are set) when the instruction is called or when the value has undergone a specific change
since the previous call (for example, a positive edge).
Addressing parameters
Parameter Description
Reference to the local connection description (specified by the configuration of the con‐
ID
nection).
With the R_ID parameter, you specify that a send and a receive instruction belong to‐
gether: The R_ID parameter must match in the instruction at the sending end and the
instruction at the receiving end.
This allows the communication of several instruction pairs via the same logic connec‐
R_ID tion.
• R_ID must be specified in the form DW#16#wxyzWXYZ.
• The instruction pairs of a logical connection specified in R_ID must be unique for this
connection.
Note
Addressing parameters ID and R_ID
You can reassign the addressing parameters ID and R_ID during runtime. The new parameters are
validated with each new job after the previous job has been closed.
You can use the following options to reduce the number of instance DBs and therefore the work
memory required:
1. With tag IDs, you can use several connections via one data instance block.
2. With tag R_IDs, you can define several pairs of sending and receiving instructions for one job
with a single instance.
3. You can combine cases 1 and 2.
-1-
Common parameters of instructions for S7 communication (S7-1200, S7-1500)
Please note that the new parameters are valid after the last job is executed. When you activate the
sending operation, the R_ID parameter in the instruction at the sending end must match its counter‐
part at the receiving end.
Status parameter
With the status parameters, you monitor whether the instruction has completed its task correctly or
whether it is still active. The status parameters also indicate errors.
Note
The status parameters are valid for one cycle only, namely from the first command following the
call until the next call. As a result, you must evaluate these parameters after each instruction cycle.
Note
Supplying the send and receive parameters
With the VARIANT data type, send and receive parameters must always be supplied any time a
communication instruction is called. It is not possible, for example, to supply the send parameters
of the communication instructions at startup and to only trigger the send job in cyclic operation.
The guaranteed minimum size of the user data for an instruction with 1-4 tags is listed in the following
table:
-2-
Common parameters of instructions for S7 communication (S7-1200, S7-1500)
Use this value in the following table to read the maximum possible user data length in bytes as total of
the parameters used. It applies for even lengths of the areas SD_i, RD_i, and ADDR_i.
For each range of uneven length the maximum possible user data length is reduced by one byte.
-3-