Chapter 9 Deployment CPU 21xSER-1 Manual VIPA CPU 21x
9-18 HB103E - Rev. 05/45
This block receives data via the serial interface.
Name Declaration Type Comment
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 Error Code ( 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.
At ASCII, this word gets an entry in case of an error. The following error
messages are possible:
Bit Error Description
1 overrun Overrun when a character could not be read from the
interface fast enough
2 parity Parity error
3 framing error Error that shows that a defined bit frame is not met,
exceeds the allowed length or contains an additional
bit sequence (stop bit error)
SFC 218
(SER_RCV)
DataPtr
DataLen
Error