Rcv_Ptp Instruction - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

105BCommunication processor
12.3 Point-to-Point (PtP) communication
You can always set the LENGTH parameter to 0 and ensure that SEND_PTP sends the
entire data structure represented by the BUFFER parameter. If you only want to send part of
a data structure in the BUFFER parameter, you can set LENGTH as follows:
Table 12- 22 LENGTH and BUFFER parameters
LENGTH
BUFFER
= 0
Not used
> 0
Elementary data type
Structure
Array
String
12.3.1.6

RCV_PTP instruction

Table 12- 23 RCV_PTP (Receive Point-to-Point) instruction
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
544
Description
The complete data is sent as defined at the BUFFER parameter. You do not
need to specify the number of transmitted bytes when LENGTH = 0.
The LENGTH value must contain the byte count of this data type. For
example, for a Word value, the LENGTH must be two. For a Dword or Real,
the LENGTH must be four. Otherwise, nothing is transferred and the error
8088H is returned.
The LENGTH value can contain a byte count less than the complete byte
length of the structure, in which case only the first LENGTH bytes of the
structure are sent from the BUFFER. Since the internal byte organization of
a structure cannot always be determined, you might get unexpected results.
In this case, use a LENGTH of 0 to send the complete structure.
The LENGTH value must contain a byte count that is less than the complete
byte length of the array and which must be a multiple of the data element
byte count. For example, the LENGTH parameter for an array of Words
must be a multiple of two and for an array of Reals, a multiple of four. When
LENGTH is specified, the number of array elements which are contained in
LENGTH bytes is transferred. If your BUFFER, for example, contains an
array of 15 Dwords (60 total bytes), and you specify a LENGTH of 20, then
the first five Dwords in the array are transferred.
The LENGTH value must be a multiple of the data element byte count.
Otherwise, STATUS = 8088H, ERROR = 1, and no transmission occurs.
The LENGTH parameter contains the number of characters to be
transmitted. Only the characters of the String are transmitted. The maximum
and actual length bytes of the String are not transmitted.
SCL
"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_);
Description
RCV_PTP checks for messages that have been
received 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.
System Manual, 11/2011, A5E02486680-05
S7-1200 Programmable controller

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents