06-16-2011 08:36 PM - edited 06-16-2011 08:36 PM
So my program has problems reading "packets" from a device with machines of Windows 7. I don't have access to a machine of Windows Vista but I did test on Windows XP and there are no issues.
The idea of reading a packet is that it will read until a full packet is found or an timeout occurs. This does not happen on all serial ports. Serial ports that are built-in (most likely Intel bus) and the USB to Serial using FTDI drivers works completely fine whereas ones using Prolific drivers or Gigaware drivers have a problem. I did verify all data are being send and recieved by loopback test and some test programs I used to test the communications with the device.
I have a temporary fix is to put in the line "Delay(3);" but it does make the response a lot slower. I have a feeling that all the Rx bytes are not instantly stored in the In buffer.
06-17-2011 04:36 PM
I am also seeing a serial read issue on a Win 7 machine but I'm using NI-Visa and the .NET interface to it.
I am trying to read until timeout or read until receipt of a termination character.
I am reading from a "virtual" com port rather than a true com port, the com port is being provided by a DALSA framegrabber. The problem may well be in the DALSA virtual serial port software.
At one time the NI serial library had a race condition if you cleared the inqueue and then did an immediate read I think it was. The read could catch the inqueue before it got completely cleared.
I posted my question on Windows 7 and serial i/o on the Measurement Studio for .NET forum.
06-18-2011 03:50 AM
For what it's worth, I had no problems with an installation of mine on a Win7 machine (CVI 2009 SP1), but:
1. It's one installation only: it cannot be taken as a definitive test
2. It' not using VISA: it' using native RS232 library
3. It's not using any usb-to-com or other virtual serial devices: it uses the built-in COM1 port instead