Communication processor and Modbus TCP
13.3 Point-to-point (PtP) communication
S7-1200 Programmable controller
1122 System Manual, V4.2, 09/2016, A5E02486680-AK
Send_P2P (Transmit send buffer data)
Table 13- 22 Send_P2P (Send Point-to-Point data) instruction
REQ:=_bool_in_,
PORT:=_word_in_,
BUFFER:=_variant_in_,
LENGTH:=_uint_in_,
DONE=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_);
Send_P2P initiates the transmis-
sion of the data and transfers the
assigned buffer to the communica-
tion interface. The CPU program
continues while the CM or CB
sends the data at the assigned
baud rate. Only one send operation
can be pending at a given time.
The CM or CB returns an error if a
second Send_P2P is executed
while the CM or CB is already
1
STEP 7 automatically creates the DB when you insert the instruction.
Table 13- 23 Data types for the parameters
REQ IN Bool Activates the requested transmission on the rising edge of this transmission
enable input. This initiates transfer of the contents of the buffer to the Point-to-
Point communication interface. (Default value: False)
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 transmit buffer. (Default
value: 0)
Boolean data or Boolean arrays are not supported.
LENGTH IN UInt Transmitted frame length in bytes (Default value: 0)
When transmitting a complex structure, always use a length of 0. When the
length is 0, the instruction transmits the entire frame.
TRUE for one scan, after the last request was completed with no error
TRUE for one scan, after the last request was completed with an error
Execution condition code (Default value: 0)
While a transmit operation is in progress, the DONE and ERROR outputs are FALSE. When
a transmit operation is complete, either the DONE or the ERROR output will be set TRUE to
show the status of the transmit operation. While DONE or ERROR is TRUE, the STATUS
output is valid.
The instruction returns a status of 16#7001 if the communication interface accepts the
transmit data. Subsequent Send_P2P executions return 16#7002, if the CM or CB is still
busy transmitting. When the transmit operation is complete, the CM or CB returns the status
of the transmit operation as 16#0000 (if no errors occurred). Subsequent executions of
Send_P2P with REQ low return a status of 16#7000 (not busy).