From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get a blue screen using USB communication?

Hello,

 

My problem is that sometimes I get a blue screen using USB communication. I guess that most of the time the problem is an overflow in memory, so I read all the data that is on the port with which I communicate. I read two ports so there are two similar VIs that are used. There is how I do it:

USB_read.png

I also communicate with a logger to acquire 16 channels. I read the information from the logger in two different parts of the program at the same time. Maybe this can cause an issue, but could it cause a blue screen? This is how I do it:

LoggerTask1.png

LoggerTask2.png

I once had a blue screen after the VI was closed, so there is how I manage to close the communication when I quit:

ClosePanel.png

Do you think there can be any problem coming from one of these parts of my LV project? If not, what else can cause a blue screen in LabVIEW?

 

0 Kudos
Message 1 of 25
(7,173 Views)

@Langelier wrote:

Hello,

 

My problem is that sometimes I get a blue screen using USB communication. I guess that most of the time the problem is an overflow in memory, so I read all the data that is on the port with which I communicate. I read two ports so there are two similar VIs that are used. There is how I do it:

 

 


Are you using USB to GPIB (doubtful because you are using bytes at port)? But, just inc ase, I had this problem also with USB to GPIB, and it ended up being a driver issue I believe. If you are using USB to GPIB driver that was released with LV2012, search for the latest 2012 driver on NIs site, download it, and use that. See if it fixes your problem

0 Kudos
Message 2 of 25
(7,160 Views)

I don't use USB to GPIB. The reason why I use this property is to know how many bytes I have to read. 

0 Kudos
Message 3 of 25
(7,152 Views)

Did you every figure this out...I am having the same issue with a usb device. Since I implemented a queue I get it more often. Is it due to a memory overflow like you said. Would be awesome if you figured it out.

0 Kudos
Message 4 of 25
(6,964 Views)

Hi Turtl

 

What kind of USB device are you using?

What drivers are you using? OS?

 

Regards

0 Kudos
Message 5 of 25
(6,944 Views)

I have run into this problem when using USB devices, where they thoughtfully provided a LabVIEW driver. It turned out to be that the company supplying the driver had wrapped the lower level USB driver in a dll, which was not "thread safe", and this would cause random Windows crashes. A pain to track down.

 

Here is the painful history of my resolving this, hope it helps:

http://forums.ni.com/t5/LabVIEW/LabVIEW-8-6-1-crashes/td-p/1205119/highlight/true

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 25
(6,941 Views)

I am using a Teensy 3, which is uses a virtual com port. I think it is something to do with my queue fuction. I am just learning how to use them, so maybe it is affecting the ram or something like that. Still a few things to trouble shoot first, but when running the program there are never any elements waiting in the queue. I found this website, http://expressionflow.com/2007/10/labview-queued-state-machine-architecture/ which I have to read, then I might understand the queue function. The teensy on its own will run the code for hours with no issues, it is only when I run labview, do I get the bluescreen. Thanks for your replies.

0 Kudos
Message 7 of 25
(6,930 Views)

Just an update, I tried a very slimmed down version of my program on another computer running labview 2011 (64bit), and also on my computer 2012 (32 bit), and I still got the BSOD, here is the error I am getting on the bluescreen, 092313-8470-01.dmp    23/09/2013 1:36:18 PM    DRIVER_IRQL_NOT_LESS_OR_EQUAL    0x000000d1    00000000`000000b8    00000000`00000002    00000000`00000000    fffff880`1fc7c161    usbser.sys    usbser.sys+9161                    x64    ntoskrnl.exe+75b80                    C:\Windows\Minidump\092313-8470-01.dmp    8    15    7601    298,408    

So it is a labview issue I guess, but the issue started to happen after implementing queues since I was missing serial data when saving to a file, it would only get every 2nd or 3rd set of serial data. In simple terms, I need to read a serial port, do some calculations and every now and then save data to a file. This data colleciton will happen for 2+hrs, so need something reliable.

0 Kudos
Message 8 of 25
(6,913 Views)

It is definitely not a LabVIEW or VISA problem.

 

It is a problem with that driver.

0 Kudos
Message 9 of 25
(6,906 Views)

Have you tried a different virtual com port.  I had an issue with one a few years ago, I assumed it was labview only to trace it down the a bad comport driver.  Swapped out the usb to serial and no problems after it.  I doubt the queue is causing the issue, yoiu could comment out the communications and send simulated data over the queue as a sanity check.  Once I had even set the baud incorrectly and caused a BSOD to happen after some time of communication, but that was way back in XP.

you can possibly use the minidump to trace the last call and see if it is the virtual com port call, probably because there was some sort of exception in "usbser.sys" - my guess USP Serial driver.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 10 of 25
(6,905 Views)