you must call the method Read() until all data has been read example: _ret := _parCfg.iSerialStream.Read( ADR(_readArray) + _curReadLen, SIZEOF(_readArray) - _curReadLen, _readBytes, _readTimeout );
IF ( _ret <> RUNNING )
THEN
IF( _ret = OK )
THEN
_curReadLen := _curReadLen + _readBytes;
IF( _readTimeout )
THEN
// set detailed error number
ELSE
IF ( check end sign )
THEN
//end read data
END_IF
END_IF
ELSE
// get error from socket
_lastError := _parCfg.iSerialStream.LastError;
END_IF
END_IF
... View more