Recently I got a new USB to Serial converter. However, I am having problems utilizing this with LabWindows/CVI, as I will continually get either a freeze or BSOD (STOP 0xA, IRQL_NOT_LESS_OR_EQUAL) when repeatedly executing a simple read/write loop within a C++ program:
while (( (bytesRead = ComRdTerm (RS232Dev[devNo].comport, inpStr, 13,13))<13) && (loopco<3))
{
ComWrt (RS232Dev[devNo].comport, triggerChar, 1);
Sleep(10);
loopco++;
}
All variables are of the correct type and have acceptable values. ComRdTerm and ComWrt are the CVI functions. This code is executed repeatedly to read a micrometer output, and acquire the data. The BSOD or freeze does not happen immediately - the first few reads are successful, and if I slow it down the repetition considerably, it will last a bit longer, but the BSOD always occurs eventually.
The code works fine if I attempt to access a standard serial port, and I can access the USB serial port from hyperterminal just fine.
From browsing this forum, it appears others have had similar problems with the CVI RS232 interface.
If anyone has any suggestions, I would appreciate them. Thanks.
- nickersonm