Serial port behaviour in XP and windows 2000
-
Hi all, I am working on serial port application on VC6 using non overlapped IO. I used the following time out values. ReadIntervalTimeout = 1; ReadTotalTimeoutMultiplier =1; ReadTotalTimeoutConstant =2; In XP operating system for these settings my application is working fine. But when I use these settings in windows 2000, the application does not send and receive properly. In 2000, if I change the settings to ReadIntervalTimeout = 0xffffffff; ReadTotalTimeoutMultiplier =0; ReadTotalTimeoutConstant =0; it works properly.But If I use these values, my application receiving thread shows CPU usage much high. Are the settings for read interval are correct? Please clarify..
Regards, Sunil Kumar
-
Hi all, I am working on serial port application on VC6 using non overlapped IO. I used the following time out values. ReadIntervalTimeout = 1; ReadTotalTimeoutMultiplier =1; ReadTotalTimeoutConstant =2; In XP operating system for these settings my application is working fine. But when I use these settings in windows 2000, the application does not send and receive properly. In 2000, if I change the settings to ReadIntervalTimeout = 0xffffffff; ReadTotalTimeoutMultiplier =0; ReadTotalTimeoutConstant =0; it works properly.But If I use these values, my application receiving thread shows CPU usage much high. Are the settings for read interval are correct? Please clarify..
Regards, Sunil Kumar
sunny_vc wrote:
ReadIntervalTimeout = 1; ReadTotalTimeoutMultiplier =1; ReadTotalTimeoutConstant =2;
Why such low values? What is your communication speed?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
sunny_vc wrote:
ReadIntervalTimeout = 1; ReadTotalTimeoutMultiplier =1; ReadTotalTimeoutConstant =2;
Why such low values? What is your communication speed?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hi all, I am working on serial port application on VC6 using non overlapped IO. I used the following time out values. ReadIntervalTimeout = 1; ReadTotalTimeoutMultiplier =1; ReadTotalTimeoutConstant =2; In XP operating system for these settings my application is working fine. But when I use these settings in windows 2000, the application does not send and receive properly. In 2000, if I change the settings to ReadIntervalTimeout = 0xffffffff; ReadTotalTimeoutMultiplier =0; ReadTotalTimeoutConstant =0; it works properly.But If I use these values, my application receiving thread shows CPU usage much high. Are the settings for read interval are correct? Please clarify..
Regards, Sunil Kumar
Is the problem that you receive part of the total string from the external equipement? Is the comunication an answer and a response, or full duplex?