I tried communication with serial port device with SysCom library.
I was read four bytes like this :
IF hCom <> RTS_INVALID_HANDLE AND bReadCom THEN
dwRead := SysComRead(hCom:=hCom,pbyBuffer:=ADR(byteRead), ulSize:=SIZEOF(byteRead), ulTimeout:=100, pResult:=ADR(Result));
I get the bytes but still in bad order. What should I do to get byte in appropriate order?
It is other problem - not a wrong order of bytes. I should wait for all bytes, how do this in above example ?
when I extend cycle time to 200ms that everything is ok. Do you have any ide how come back to 10ms cycle time and recive all bytes form UART?
Log in to post a comment.