Result = ReadSerialPortData(#SerialPort, *Buffer, Length)Description
Reads an arbitrary amount of data from the #SerialPort. If the input buffer was empty, this function will block until data is available. To check if data is available, use AvailableSerialPortInput().
#SerialPort The serial port to use. *Buffer The memory address to use to put the read data. Length The length to read from the serial port, in bytes. The specified buffer should be large enough to handle it.
The number of bytes which are actually read. It can be less than the requested length. If a read error has occured, it will return zero.