LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

STOP 0xA error when using USB to Serial converter with CVI

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
0 Kudos
Message 1 of 5
(6,158 Views)
What version of CVI are you using? Also is the USB-RS232 from NI? I would suggest running one of the serial shipping examples and take a NI-SPY capture when the error happens. Did you use a non-standard baud rate?

Also check out this post:"CVI serial comms program does not work with a serial to USB adapter", it might give you some help:

http://forums.ni.com/ni/board/message?board.id=180&message.id=13996&requireLogin=False
0 Kudos
Message 2 of 5
(6,149 Views)
Thanks for your help.

I'm using CVI 7.0.0. This is not the NI USB-232, it is a generic one, branded Airlink, but it uses drivers from Prolific (which someone else apparently had trouble with). I'm using 1200 baud, no parity, 8 data bits, and 1 stop bit. The shipped RS232 sample caused the same errors.

After some more testing on another computer, it seems that the driver was the problem. The Prolific driver v. 1.5 (with WHQL signature) that came with the device caused the STOP error, however, the version of the .sys file (>2.0, not WHQL certified) that was on another computer appears to function perfectly. I'm not sure where the other driver came from, as the device was never installed before, and windows requested a CD, but it appears to work. I've attached the working ser2pl.sys in case anyone else has the same problems.

- nickersonm
Message 3 of 5
(6,139 Views)
THANK YOU VERY MUCH!
I have been having the same problem and I was having a headache over it.
Thanks a lot for the file!
 
 
0 Kudos
Message 4 of 5
(5,914 Views)

Hi all,

 

I had the same problem for a long time. I've never found the reason why my computer crashed. And yesterday, I read this message, I've tried to change the ser2pl.sys as indicated, and it works fine now !

Thanks a lot !

 

David.

0 Kudos
Message 5 of 5
(4,291 Views)