07-14-2005 03:39 PM
How much loading does "SetComTime(portNum, timeOut);" place on the PC processor when monitoring the serial port?
Does it take 100% of the CPU resource?
I am using LW-CVI 7.1.0.
Thanks,
JLV
08-07-2005 02:52 PM
08-08-2005 09:18 AM
@JohnB10000 wrote:
I am not sure how much loading "SetComTime(portNum, timeOut);" puts on the PC processor but LabWindows appears frozen during the timeout period. I am modifiying an application that has SetComTime set for for two or three minutes and during that time you can't resize or move LabWindows/CVI windows and if you want to stop the program early you have to use the Windows Task Manager.
08-08-2005 08:19 PM
08-09-2005 10:43 AM
Thanks John for the info.
My work around was to create a short timeout, but place the read-serial port within a loop that monitors incoming data from the serial port. The data is stored into a buffer until the desired "end-of-message" is reached. It also uses a maximum string length to force an exit to the loop which is basically my version of a timeout process. If the expected message is not received, then the data is either discarted or saved in a debug file.
But basically, I keep the actual timeout to a value no higher than 1 sec.
JLV
08-12-2005 04:05 PM
08-15-2005 11:50 AM
Hi John,
Interesting... makes sense.. nice approach..
I didn't think of setting the SetComTime to zero. I did something similar to this in LV.. Which is why I think it makes sense.
I will give it a try.. I can see the perfomance improvement, especially if this is inside other loops.
🙂
JLV