beautypg.com

3 data exchange s7 cpu <–> ethernet cp – Siemens Simantic Net NCM for Industrial Ethernet S7 User Manual

Page 78

background image

SEND/RECEIVE Interface in the User Program

78

SIMATIC NET NCM S7 for Industrial Ethernet

C79000-G8976-C129–06

3.3

Data Exchange S7 CPU <–> Ethernet CP

The Ethernet CP processes the send and receive jobs independent of the CPU
cycle and requires one transmission time. The interface to the user program with
the FCs is synchronized by an acknowledgment. Two situations must be
distinguished:

S

The CPU cycle is faster than the transmission time.

S

The CPU cycle is slower than the transmission time.

Note

Please refer to the sequence charts for the FCs in Chapter 5. These charts show
how to handle the SEND/RECEIVE interface in the user program for problem-free
data exchange.

Remember the points below about the CPU cycle and transmission time.

FC Calls Faster than the Transmission Time

If a block is called again in the user program before data were transferred or
received, the procedure is as follows on the interface of the FCs:

S

AG_SEND/AG_LSEND:
No further job is accepted until the transmission of the data on the connection
has been acknowledged by the Ethernet station. During this time, the user
program receives the message “job active” until the Ethernet CP can accept the
next job on the same connection.

S

AG_RECV/AG_LRECV:
The job is acknowledged with the message “no data available yet” if there are
no received data on the Ethernet CP. The user program receives this message
in the CPU cycle until the Ethernet CP has received data again on the
connection.

FC Calls Slower than the Transmission Time

If a block is called again before the data were completely transferred or received,
the procedure is as follows on the interface of the FC blocks:

S

AG_SEND/AG_LSEND:
The job is positively acknowledged. The Ethernet CP is ready to receive a new
send job (at the earliest however with the next call).

S

AG_RECV/AG_LRECV:
The job is acknowledged with “New Data Received” when the data have been
transferred to the user program. Following this, the FC call can be repeated.