Hide thumbs Also See for S7-1200:
Table of Contents
Communication processor and Modbus TCP
12.3 Point-to-point (PtP) communication
Interaction of the LENGTH and BUFFER parameters
The minimum size of data that can be transmitted by the SEND_PTP instruction is one byte.
The BUFFER parameter determines the size of the data to be transmitted. You cannot use
the data type Bool or arrays of Bool for the BUFFER parameter.
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
696
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.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Table of Contents
loading

Table of Contents