LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why computer crashes when communicating through GPIB and also through the network?

Hi fellows,

I am a bit annoyed about this issue, and pretty sure is a simple thing, but I just cannot see the answer. The set up is the following:

The labview program I used is iterative: I am communicating through GPIB with a power supply, stepping up the current in each iteration and at the same time, I retrieve data from a Vector Network Analyzer connected to the network for each step. Firstly, I initialize the VNA, and then I run the program but in the middle of the reading process, it crashes and I get the windows blue screen...

I upload a version for you to have a look if you please.

Checking thru the web, I have found that it may be due to the GPIB card of my computer so I performed the following:

 

As a test, I have divided the program in half, erasing the part of talking to the vna from the block diagram (so it only step sup the current), to see if it has to do with the GPIB comm with the power supply. 3 times out of three it doesn't crash so.... Could it be the VNA network communication, through VISA? I downloaded the last driver of NI-VISA but It seems to still not work...

I am a bit lost, to be honest, and you cannot even imagine I much I would thank you for your help. 

Many thanks in advance.

0 Kudos
Message 1 of 7
(2,856 Views)

Hi there, 

 

Sorry to hear you're having difficulties with this. Are you using GPIB/USB? I have found a bug report in the NI-VISA 16.x Readme that tells of similar blue screen issues when using USB raw devices as the VISA Resource, if this applies to you.

 

NI-VISA 16.x Known Issues

http://www.ni.com/product-documentation/53246/en/

 

It would be useful to see an NI MAX Technical Report; it may be that you are missing some drivers still. For example, the NI-488.2 Hardware drivers are often needed for use with GPIB. I would recommend you download these if you haven't done so already.

 

Sarah Flanagan

Applications Engineer 

National Instruments UK

 

 

0 Kudos
Message 2 of 7
(2,792 Views)

Hi Sarah,

Thank you for your support. Yes, it is I will try updating the driver as you said. Anyway, I have tested the VNA separately, and it seems to work fine, it doesn't crash... I upload here the technical report, thank you for your feedback. 

0 Kudos
Message 3 of 7
(2,781 Views)

By the way, how does timing affect to this issue? I mean, the VNA takes around 2 seconds to sweep ports and store the measurement, so I set each iteration in the program to WAIT 2000 ms before reading the measurement. I don't know if I understood properly but, doing some research on the web, it looks like sometimes labview stops talking to the device after a timeout of 2000 ms? Could this be an issue? Just wondering.

Many thanks

0 Kudos
Message 4 of 7
(2,773 Views)

@dovod wrote:

By the way, how does timing affect to this issue? I mean, the VNA takes around 2 seconds to sweep ports and store the measurement, so I set each iteration in the program to WAIT 2000 ms before reading the measurement. I don't know if I understood properly but, doing some research on the web, it looks like sometimes labview stops talking to the device after a timeout of 2000 ms? Could this be an issue? Just wondering.

Many thanks


bzzzt!  bad programming teqnique based on an incomplete understanding of SCPI language.

This is a classic case for turning the command into a query by appending the *OPC? command to the end of the sweep command.  This will force the application to wait for the VNA to return a "1" to the read buffer, and it won't do that until the operation (sweep) is complete.  All the Network Analyzsers I've worked with have sweep commands compatible with *OPC? so you should be fine using it; just look in the programmer's guide to make sure.  You can read up more on this by Googling "SCPI *OPC?".  🙂

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 7
(2,760 Views)

You can set the VISA timeout using the VISA Set Timeout property node from the VISA Advanced palette. I think the default value is 2000 ms so you might want to increase it to a greater value.

 

I recommend you use the *OPC? query  as suggested by Billko or alternatly the *OPC or *WAI command instead of a Wait function (I personally use the OPC command and poll the status byte register, with the *OPC? query a 1 is sent to the output queue when the pending operations are completed). If you use the *OPC? query you will have to increase the VISA Timeout value anyway).

 

Ben64

0 Kudos
Message 6 of 7
(2,754 Views)

@billko wrote:

@dovod wrote:

By the way, how does timing affect to this issue? I mean, the VNA takes around 2 seconds to sweep ports and store the measurement, so I set each iteration in the program to WAIT 2000 ms before reading the measurement. I don't know if I understood properly but, doing some research on the web, it looks like sometimes labview stops talking to the device after a timeout of 2000 ms? Could this be an issue? Just wondering.

Many thanks


bzzzt!  bad programming teqnique based on an incomplete understanding of SCPI language.

This is a classic case for turning the command into a query by appending the *OPC? command to the end of the sweep command.  This will force the application to wait for the VNA to return a "1" to the read buffer, and it won't do that until the operation (sweep) is complete.  All the Network Analyzsers I've worked with have sweep commands compatible with *OPC? so you should be fine using it; just look in the programmer's guide to make sure.  You can read up more on this by Googling "SCPI *OPC?".  🙂

 


Hey, sorry - I was trying for some humor, but I realized it sounded kind of mean.  I apologize.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(2,751 Views)