LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding queue into a DAQ loop might cause blue screen

Hi

I am trying to use VISA to fetch data from a USB port. The data is put into a queue which is decoded in another thread. The pic below shows how my vi looks like.

 

with queue.png

 

The problem is that after around 15mins of execution the windows got blue screen. The error message has to do with usbser.sys.

 

I was at first suspicious of the USB virtual COM port's driver. However after I eliminate the queue part of this vi the blue screen problem is gone. The modified vi is like this:

without queue.png

 

 

It seems that this queue is actually causing the pc blue screen problem.

 

I have tried it with several different pcs and got the same result. I am using windows OS. 64bit and 32 bit have the same problem.

 

The blue screen message is here:

 

2013-04-19_15-32-01_932_Beijing.jpg

 

Has anyone encountered the same problem or had some clue of this issue?

 

Thanks in advance!

 

 

0 Kudos
Message 1 of 3
(2,484 Views)

You're only reading 16...  Are you sure the buffer doesn't run full?  

You might want to consider changing your driver.  Connect the bytes at serial port output to the input of read data so you read everything...

Just try it and see what it does,  this will help you on your way

 

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 3
(2,479 Views)

I agree with Bjorn, the problem is still likely to be with your USB read implementation.

 

Consider the possibility that your system is not reading from the USB buffer sufficiently quickly. What value is in Bytes at Port? Is this value increasing rapidly (faster than you are reading?)

Removing the Enqueue function perhaps also indicates that the queue write is taking time and preventing the while loop from spinning fast enough which could occur if the queue has a maximum element count (maybe you define the named queue elsewhere with a count limit and are failing to remove the queued elements quickly enough to prevent it from filling up?). You have no timeout wired to the enqueue function which means it will wait as long as it takes, stopping the loop. You might be better with a short (10ms) timeout, followed by a check to make sure it doesn't timeout.

Also consider using shift registers on your while loop borders to ensure the VISA ref is maintained, the queue ref is maintained and the errors are maintained (although these aren't likely to be the source of your problem, it's always good practice to maintain your error data for handling).

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 3
(2,467 Views)