Receiving Data With 3964(R) - Siemens SIMATIC CP 340 User Manual

Ptp coupling and configuration
Hide thumbs Also See for SIMATIC CP 340:
Table of Contents

Advertisement

Basic Principles of Serial Data Transmission
2.4 Data Transmission with the 3964(R) Procedure
2.4.4

Receiving Data with 3964(R)

Process of Data Transmission when Receiving
The figure below illustrates the transmission sequence when data is received with the
3964(R) procedure.
Figure 2-8
Establishing a Receive Connection
In idle mode, when there is no send request to be processed, the procedure waits for the
communication partner to establish the connection.
If the idle procedure receives any control code except for STX or NAK, it waits for the
character delay time to expire, then sends the code NAK.
receiving data
If the procedure receives the STX code and an empty receive buffer is available, it responds
with DLE. Incoming receive characters are now stored in the receive buffer. If two
consecutive DLE codes are received, only one of these is stored in the receive buffer.
After each receive character, the procedure waits out the character delay time for the next
character. If this period expires before another character is received, an NAK is sent to the
communication partner. The system program then reports the error to the function block
P_RCV (output parameter STATUS).
If no empty receive buffer is available during a connection setup with STX, a wait time of 400
ms is started. If there is still no empty receive buffer after this time has expired, the system
program reports the error (error message in STATUS output of FB), and the procedure
sends a NAK and returns to idle mode. Otherwise, the procedure sends a DLE and receives
the data as described above.
38
Data Traffic when Receiving with the 3964(R) Procedure
PtP coupling and configuration of CP 340
Manual, 04/2011, A5E00369892-03

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents