This example shows how you can read the serial port until no data is left, for example if you are receiving variable lenght messages you can read the whole message and then wait for the next one
Francisco Arellano
National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte