6.5.3 FC/SFC 218 - SER_RCV
This block receives data via the serial interface.
Using the FC/SFC 218 SER_RCV after SER_SND with the protocols
USS and Modbus the acknowledgement telegram can be read.
Parameter
Declaration Data type
Description
DATAPTR
IN
ANY
Pointer to Data Buffer for received data
DATALEN
OUT
WORD
Length of received data
ERROR
OUT
WORD
Error Number
RETVAL
OUT
WORD
Return value (0 = OK)
Here you set a range of the type Pointer for the receive buffer where
the reception data is stored. You have to set type, start and length.
Example:
Data is stored in DB5 starting at 0.0 with a length of 124byte.
DataPtr:=P#DB5.DBX0.0 BYTE 124
Word where the number of received Bytes is stored.
At
STX/ETX
and
3964R
, the length of the received user data or 0 is
entered.
At
ASCII
, the number of read characters is entered. This value may
be different from the read telegram length.
This word gets an entry in case of an error.
The following error messages may be created depending on the pro-
tocol:
ASCII
Bit
Error
Description
0
overrun
Overflow, a sign couldn’t be read fast enough
from the interface
1
framing error Error that shows that a defined bit frame is not
coincident, exceeds the allowed length or con-
tains an additional bit sequence (Stop bit error)
2
parity
Parity error
3
overflow
Buffer is full
Description
Parameters
DATAPTR
DATALEN
ERROR
VIPA System 300S CPU
Deployment PtP communication
Communication> FC/SFC 218 - SER_RCV
HB140 | CPU | 315-2AG13 | GB | Rev. 14-40
102