PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV Mobile 2024 → reading serial port in buffer/string
reading serial port in buffer/string
Iniciado por Anuj, 26,oct. 2010 11:58 - No hay respuesta
Publicado el 26,octubre 2010 - 11:58
hello all,

I m trying to send some commands [sWrite(6, Charact(cmd[index]))]to a device on COM6.
here "cmd" is an array of hex data.

I am reading back the response from device (sRead(6,sInEntryQueue(6))).

The problem is, I am not able to read data after a 0x00 data byte in response stream.

eg: if my response is "0xFE 0X56 0X78 0X64 0X34 0X00 0X04 0x00 0x00 0X08 0X99"

my read buffer shows first 5 bytes only and no data after that. this happens all the time. suppose if the 0x00 byte is the first data then my read buffer shows no data at all. do not know where i m gonig wrong.

if needed i can post the chunk of code as well.

thanks!
Anuj