If the data has carriage return or line feed at the end of the string then I would use PortInput. See the reference manual. PortInput(Port,Start,End,Timeout,Length)
Typically I set as
RecvStr := PortInput(CommPortNum, 0, 13, 0, MaxStrlngth)
That way I do not timeout, I can set a pre-defined length or set Maxlngth to 0 for read until carriage return.
I will sometimes use a timeout if I know I am having comm issues with the sending device.
Is you data delimited?
Parsing would be relatively easy with a loop.
Typically I set as
RecvStr := PortInput(CommPortNum, 0, 13, 0, MaxStrlngth)
That way I do not timeout, I can set a pre-defined length or set Maxlngth to 0 for read until carriage return.
I will sometimes use a timeout if I know I am having comm issues with the sending device.
Is you data delimited?
Parsing would be relatively easy with a loop.