EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication processor and Modbus TCP
13.6 Legacy PtP communication (CM/CB 1241 only)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1229
13.6.1.5
RCV_PTP (Enable receive messages)
Table 13- 107 RCV_PTP (Receive Point-to-Point) instruction
LAD / FBD
SCL
Description
"RCV_PTP_DB"(
EN_R:=_bool_in_,
PORT:=_uint_in_,
BUFFER:=_variant_in_,
NDR=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
LENGTH=>_uint_out_);
RCV_PTP checks for messages that have been re-
ceived in the CM or CB. If a message is available, it
will be transferred from the CM or CB to the CPU. An
error returns the appropriate STATUS value.
1
STEP 7 automatically creates the DB when you insert the instruction.
Table 13- 108 Data types for the parameters
Parameter and type
Data type
Description
EN_R IN Bool When this input is TRUE and a message is available, the message is trans-
ferred from the CM or CB to the BUFFER. When EN_R is FALSE, the CM or
CB is checked for messages and NDR, ERROR and STATUS output are up-
dated, but the message is not transferred to the BUFFER. (Default value: 0)
PORT IN PORT After you install and configure a CM or CB communication device, the port
identifier appears in the parameter helper drop-list available at the PORT box
connection. The assigned CM or CB port value is the device configuration
property "hardware identifier". The port symbolic name is assigned in the "Sys-
tem constants" tab of the PLC tag table. (Default value: 0)
BUFFER IN Variant This parameter points to the starting location of the receive buffer. This buffer
should be large enough to receive the maximum length message.
Boolean data or Boolean arrays are not supported. (Default value: 0)
NDR OUT Bool TRUE for one execution when new data is ready and operation is complete
with no errors.
ERROR
OUT
Bool
TRUE for one execution after the operation was completed with an error.
STATUS
OUT
Word
Execution condition code (Default value: 0)
LENGTH
OUT
UInt
Length of the returned message in bytes (Default value: 0)
Note the following correlation between the EN_R input and the message buffer of the
RCV_PTP instruction:
Input EN_R controls the copy of a received message to the BUFFER.
When the EN_R input is TRUE and a message is available, the CPU transfers the message
from the CM or CB to the BUFFER and updates the NDR, ERROR, STATUS, and LENGTH
outputs.
When EN_R is FALSE, the CPU checks the CM or CB for messages and updates the NDR,
ERROR, and STATUS outputs, but does not transfer the message to the BUFFER. (Note
that the default value of EN_R is FALSE.)
The recommended practice is to set EN_R to TRUE and control execution of the RCV_PTP
instruction with the EN input.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals