Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Blue Screen (BSOD) while communicating with GPIB Instrument

Solved!
Go to solution
I have a problem communicating with a Mensor PCS400 Pressuregenerator via NI-VISA. My really simply application sends some requests to the instrument and reads the returned responses. These actions are executed in a while loop until the stop-buttom on the frontpanel is pressed. The VISA-Ressource is initialized before the while loop and closed after leaving the loop.
Now the problem is, that the computer will run into a Blue Screen with the message "NMI: Parity Check / Memory Parity Error". This Blue Screen can be provoked by switching between the programwindow and another window (e.g. the File Explorer) - i know it sounds strange. Then the Blue Screen appears after about 20 seconds. The computer is working stable in daily work with windows.

I have tried several things already
- Waiting a while (up to 30 ms) after write and read from VISA => Blue Screen
- Communicating with the Agilent 34401A Multimeter with the same program (but other requests of course) => no crash!
- Testing the system memory during about 45h with memtest86+ => no errors found
- Stresstest with Prime95 (produces 100% CPU Load) during about 1.5h under windows => no crash

Sended Requests:
_PCS4\sREADING?\n
_PCS4\sERR?\n
_PCS4\sSTAT?\n
_PCS4\sERR?\n

The system is configured as follows:
- Windows XP Professional SP3
- LabVIEW 8.5 FDS
- NI-VISA V4.2, NI-VISA Runtime V4.2
- NI-488.2 V2.52
- PCI-GPIB Adapter with 3x Mensor PCS400 Pressuregenerator (Addresses 1..3), Agilent E3641A (Address 5) and Agilent 34401A (Address 6) connected
- PCI-6052E DAQ-Card
- Some RS232 Expansion Cards (PCI)

Do you have any ideas how to solve this strange problem?

Thank you.
0 Kudos
Message 1 of 17
(5,903 Views)

Quaker,

 

The only way to find out which driver is causing this problem is to get a kernel memory dump.  Please follow this link for information about creating one.

http://forums.ni.com/t5/forums/replypage/board-id/140/message-id/38226

 

After you have a kernel memory dump, you can upload it to our ftp site and let us know the name of the file if its too big to attach to the forum.

ftp://ftp.ni.com/incoming

 

I hope this helps,

Steven T.

0 Kudos
Message 2 of 17
(5,867 Views)

http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=15110

There is a LabVIEW driver available for this model.  you may wish to download it and use that for talking to the instrument.

 

To find out what the problem is we need to know if you are using RS-232 or GPIB for the control connection.  I can make two suggestions though.  Your outer loop has no delay, put in a wait for next ms multiple.  Secondly, wiring a 0 to wait(ms) forces the vi to release and reacquire the thread.  It seams possible that releasing the processor could allow a competing VISA request to another GPIB resource running on a second program to get in the way at which point I'm not sure how collisions get resolved 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 17
(5,863 Views)
Steven T and Jeff Bohrer

Thank you for your answers.

@ Steven T
Unfortunately Windows is not creating a kernel memory or mini dump file if the BSOD happens 😞

@ Jeff Bohrer
I'am using GPIB to control the instrument. I looked to the driver already and decided to implement the needed requests with VISA functions because the driver is not using the error handling properly and it would be easier to switch to use RS232 to communicate with the instrument. I will try the same experiment with the manufacturer drivers and/or my own implemention in NI-488 too.
- About your first suggestion: I will try to put a 'Wait Until Next ms Multiple' function into the while-loop (e.g. right before the for-loop).
- About your second suggestion: The BSOD happens also if I wait 10ms with the 'Wait (ms)' function. In addition there is no other application accessing the GPIB-Bus.
I will try out these suggestions next week.


- What do you think about updating NI-VISA etc. to the latest version?
- In general, do you prefer NI-VISA or NI-488 to communicate with GPIB-Instruments? And why?


Thanks a lot for your help. I hope you understand my poorly english.
0 Kudos
Message 4 of 17
(5,854 Views)

Quaker wrote:
Steven T and Jeff Bohrer

Thank you for your answers.

@ Steven T
Unfortunately Windows is not creating a kernel memory or mini dump file if the BSOD happens 😞

@ Jeff Bohrer
I'am using GPIB to control the instrument. I looked to the driver already and decided to implement the needed requests with VISA functions because the driver is not using the error handling properly and it would be easier to switch to use RS232 to communicate with the instrument. I will try the same experiment with the manufacturer drivers and/or my own implemention in NI-488 too.
- About your first suggestion: I will try to put a 'Wait Until Next ms Multiple' function into the while-loop (e.g. right before the for-loop).
- About your second suggestion: The BSOD happens also if I wait 10ms with the 'Wait (ms)' function. In addition there is no other application accessing the GPIB-Bus.
I will try out these suggestions next week.


- What do you think about updating NI-VISA etc. to the latest version?
- In general, do you prefer NI-VISA or NI-488 to communicate with GPIB-Instruments? And why?


Thanks a lot for your help. I hope you understand my poorly english.

Yes update the VISA driver!!!! some of the early versions had some interesting behaviorsSmiley Sad

I like the way late versions of VISA act the need to fire off straight 488.2 commands is completely gone and using VISA allows you to run the same driver for your instrument regardless of the interface.  (Enet, GPIB, serial).  VISA is like Vitamins- just take em


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 17
(5,844 Views)

Hi

 

Please don't add a wait for next ms multiple, the first wait of this function in windows is undetermined.

And even if it waits you will see that if you have enough wait for next ms multiple functions hanging around that they tend to execute at the same moment.

For delays please only use a wait ms.

 

The help is pretty clear about both functions but the fact that the wait for next ms multiple appears in almost all NI examples does not make it a good function. As long as it does not behave as in the realtime environment it stinks.

greetings from the Netherlands
0 Kudos
Message 6 of 17
(5,835 Views)

Albert,

 

Yes the first wait is indeterminate in the wait for next ms multiple.  Howver it does have one advantage ove Wait(ms) that I fell you may have overlooked.  If you are waiting using the Wait(ms) when the ms timer rolls over (I32 = about every 27 days) the Wait(ms) call will never return.  It is the reason Wait fo nex ms multiple is generally preferable for loop timing


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 17
(5,828 Views)

Quaker,

 

Wow, I completely gave you the wrong link.  This one will bring you to a KB that shows you how to configure Windows to leave a kernel dump.

 

http://digital.ni.com/public.nsf/allkb/581127525C80606A862570BE0003111D 

 

Thanks,

Steven T.

0 Kudos
Message 8 of 17
(5,804 Views)

Did you really test this rollover behaviour, then it should be considered a bug.

I never encountered it and I really don't understand why that should happen. Even the subtract of the systemtimer works in that event correctly and we really tested that.

greetings from the Netherlands
0 Kudos
Message 9 of 17
(5,796 Views)

Thank you all for your replies. I will try out your suggestions as soon as possible.

I have another question about the problem:
Now the Write and Read operations are configured in asynchronuous mode. This (https://www.ni.com/en/support/documentation/supplemental/18/choosing-between-synchronous-and-asynchr...) article describes some interesting things about threading in read/write operations. Could it be helpfull to configure them in the synchronuous mode instead?

Bye

0 Kudos
Message 10 of 17
(5,711 Views)