Parameter Declaration Data type Memory block Description
NDA OUTPUT BOOL I, Q, M, D, L Status parameter "new data arrived".
NDA = 0:
n The queue does not contain a data block.
NDA = 1:
n The queue does contain one or more data
blocks.
(call to the SFC 66 with EN_DT = 0)
n The oldest data block in the queue was
copied into the application program.
(call to the SFC 66 with EN_DT = 1)
RD OUTPUT ANY I, Q, M, D Reference to the receive data buffer (receive
data area).
The following data types are available: BOOL,
BYTE, CHAR, WORD, INT, DWORD, DINT,
REAL, DATE, TOD, TIME, S5_TIME,
DATE_AND_TIME as well as arrays of these
data types with the exception of BOOL. If you
wish to discard the oldest data block in the queue
you must assign a value of NIL to RD.
with EN_DT = 0
The operating system inserts data received from a communication partner in the
sequence in which they are received.
You can test whether at least one data block is ready by issuing a call to the SFC 66 with
EN_DT = 0 and testing the resulting output parameter NDA.
n NDA = 0 means that the queue does not contain a data block. REQ_ID is irrelevant,
RET_VAL contains a value of 7000h.
n NDA = 1 means that the queue does contain one or more data blocks.
If the queue contains a data block you should also test output parameters RET_VAL and
REQ_ID. RET_VAL contains the length of the data block in bytes, REQ_ID contains the
operation code of the send block. If the queue should contain multiple data blocks param-
eters REQ_ID and RET_VAL refer to the oldest data block contained in the queue.
with EN_DT = 1
When input parameter EN_DT = 1 then the oldest data block in the queue is copied into
the target block defined by RD. You must ensure that the size of RD is greater than or
equal to the size of the transmit buffer of the respective SFC 65 X_SEND defined by
parameter SD and that that the data types match. If received data should be saved into
different areas you can determine the REQ_ID in the first call (SFC-call with EN_DT = 0)
and select a suitable value for RD in the subsequent call (with EN_DT = 1). If the opera-
tion was processed successfully RET_VAL contains the length (in bytes) of data block
that was copied and a positive acknowledgement is returned to the sending station.
If you do not want to accept the received data assign a value of NIL to RD. The respec-
tive communication partner receives a negative acknowledgement
(the value of RET_VAL of the respective SFC 65 X_SEND is 80B8h) and parameter
RET_VAL is set to 0.
Data reception indication
Transferring data into the
receive buffer
Discarding data
VIPA SPEED7
Integrated Standard
System Functions > SFC 66 - X_RCV - Receive data
HB00 | OPL_SP7 | Operation list | en | 18-30 706