Technical data

Table Of Contents
Communication SFCs for Non-Configured S7 Connections
System Software for S7-300/400 System and Standard Functions - Volume 2/2
22-8
A5E00739858-01
22.4 Receiving Data from a Communication Partner outside
the Local S7 Station with SFC 66 "X_RCV"
Description
With SFC 66 "X_RCV," you receive the data sent by one or more communication
partners outside the local S7 station using SFC 65 "X_SEND."
With SFC 66 "X_RCV,"
You can check whether data have been sent and are waiting to be copied. The
data were entered in an internal queue by the operating system.
You can copy the oldest block of data from the queue to a selected receive
area.
Parameter Declaration Data Type Memory Area Description
EN_DT INPUT BOOL I, Q, M, D, L,
constant
Control parameter "enable data transfer."
With the value 0, you can check whether at
least one block of data is waiting to be
entered in the receive area. The value 1
copies the oldest block of data in the queue
to the area of the work memory specified in
RD.
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs while the function is
being executed, the return value contains
the corresponding error code. If no error
occurs, RET_VAL contains the following:
W#16#7000 if EN_DT=0/1 and NDA=0.
In this case, there is no data block in
the queue.
If EN_DT=0 and NDA=1 the length of
the oldest block of data entered in the
queue as a positive number in bytes.
If EN_DT=1 and NDA=1 the length of
the block of data copied to the RD
receive area as a positive number in
bytes.
REQ_ID OUTPUT DWORD I, Q, M, D, L Job identifier of the SFC "X_SEND" whose
data are first in the queue, in other words
the oldest data in the queue. If there is no
block of data in the queue, REQ_ID has
the value 0.
NDA OUTPUT BOOL I, Q, M, D, L Status parameter "new data arrived."
NDA=0:
There is no block of data in the queue.
NDA=1:
The queue contains at least one block
of data. (SFC 66 call with EN_DT=0).
The oldest block of data in the queue
was copied to the user program.
(SFC 66 call with EN_DT=1).