01-25-2012 04:38 PM
Dear all,
I am trying to control two Agilent 34401 through VISA. But when I start the program, firstly it runs very well. However, after 5 or 10 minutes, my computer will lock up, screen frozen, or even get blue screen showing the error: IRQL_NOT_LESS_OR_EQUAL. Acutally, as a beginner, I just wrote this VI based on the example "Agilent 34401 Read Single Measurement". If you have any better solutions to control two agilent 34401, please tell me.
I use two USB-RS232 adapters to connect 34401 and PC. And the version installed is labview 2011 with VISA 5.1.1.
Please see attached VI.
PS:
I tried to solve this problem in the way given by
But failed.
Thank you for your attention.
01-29-2012 03:01 PM
I would suggest moving the writing to files outside of the loop.
01-29-2012 03:16 PM
Indeed that is the problem.
Look at the producer consumer pattern example to find a nice way of doing this.
Writing each line (especially with these blue complex looking array values takes too much time. In the consumer part I would accumulate say at least 5 min of measurements and then save the bulk to file (add to the file).
good luck.
01-30-2012 11:04 AM
Are the USB-RS232 adapters you are using from National Instruments, or are they a different brand? If they are National Instruments USB-232 interfaces, which version of NI-Serial is installed on your system? While the other have made some good suggestions to improve your code, you should not be able to cause your entire computer to freeze or blue screen through your application code. This indicates an issue with a lower level device driver.
-Jason S.
03-30-2012 05:18 AM
Thank you for your help.
Finally, I found that the problem came from VISA 5.1.1. When I uninstalled it and replaced with VISA 4.0 , it runs very well.
03-30-2012 08:14 AM
Menglong,
This may be a fine short-term solution, but eventually you will probably need to upgrade the version of NI-VISA, so it would be helpful if we could understand what is happening. Could you answer the questions I asked in my last post?
Thanks,
Jason S.
03-30-2012 04:19 PM
Hi Jason,
The USB-RS232 adapter that I use comes from Lindy.
Actually, I tried to connect the 34401 to my desktop using the RS232 cable directly, however, the computer still turned to be freeze or blue screen. So I don't think that this problem comes from the USB-RS232 adapter or the driver.
Thank you!
Menglong
03-30-2012 04:59 PM
I looked around a bit, and I believe that the Lindy serial adapter is using a Prolific chipset. I have seen another instance here on the forums where the prolific driver seems to cause blue screens when used with newer versions of VISA, but I do not know exactly why.
A blue screen related to serial communication will almost certainly be due to the underlying serial driver, rather than NI-VISA. The reason is that for serial I/O, NI-VISA operates in user mode along with your application. Any crash in NI-VISA would cause your application to crash, but it would not cause a system blue screen.
I do not know why you would have seen blue screens when using the built-in serial port directly. Without seeing the content of the blue screen, or a memory dump file from the crash, I cannot say for sure which driver is causing the crash.
-Jason