Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with VISA and LabVIEW 2009

I am having a problem where it appears that LabVIEW is locking up with transmitting commands thought the VISA USB port. I am talking to a Tektronics 3021B waveform generator with commands that turn on/off the output port and to program a pulse width. I am using the labVIEW instrument driver from the National Instruments web site configured for the unit attached to the USB port. The code will run for a while the just hang up while running. If this happens I can go to the interactive mode and excute commands without a problem.

 

I have not tried any of the other interface options such as Ethernet or GPIB.

 

Bill Lane

Cooper-Standard Automotive

0 Kudos
Message 1 of 11
(4,739 Views)

Hello Bill,

       I invite you to consult the Instrument Driver Troubleshooting Guide, and then let us know the results of going through the steps.

 

Cheers,

 

NathanT

0 Kudos
Message 2 of 11
(4,713 Views)

Just a mention:

 

I have recently noticed that the VISA function to read USB interrupt data freezes (stops returning data) after about 4 hours of operation (1Hz).

 

I have needed to switch to LibUSB to get things running here in the lab.

 

I'll post a bug report, maybe it's related.

 

Shane.

0 Kudos
Message 3 of 11
(4,690 Views)

I was able to fix the problem I had with communicating to the Tektronics AFG3021B by using the IVI drivers for the equipment. These are drives that use a DLL provided by tektronics. The problem of locking up after a few minutes of operation disappeared. I was able to verify this by running a routine that turn the output on and off once a minute for over 5 hours.

 

Thanks for all the suggestions.

Message 4 of 11
(4,681 Views)

Hi Bill & Shane,

 

At what point in your respective code does the application hang? Are there any errors returned?

Shane, when your VISA function freezes, does the rest of your application hang as well? Do you just get timeout errors?

Justin E
National Instruments R&D
0 Kudos
Message 5 of 11
(4,662 Views)

Hi Justin,

 

it hangs the entire LV system.  I need to close down LV from the task manager to continue.....  Seems to be happening at driver-level.  It happens at around 4 hours give or take.  I have a process which is constantly creating and reading from event refnums for VISA (and destroying them when finished).

 

Acquisition is at 1Hz as mentioned previously.

 

Shane.

0 Kudos
Message 6 of 11
(4,606 Views)

Hi Shane,

 

You said you have a simple application that is currently exhibiting this behavior. Can you attach the VI so we can try to reproduce this on our end?

Raj
National Instruments
Applications Engineer
0 Kudos
Message 7 of 11
(4,556 Views)

Well you can take the Interrupt example from my USB nugget, that's basically all I'm doing.....

 

The only difference is that my device is auto-responding with a HID report at 1Hz unlike a mouse which only sends a report when the status changes.....

0 Kudos
Message 8 of 11
(4,540 Views)

Hi Intaris,

 

Thank you for this code snippet. I will attempt to reproduce this issue on our end. I will post back once I have next steps.

Raj
National Instruments
Applications Engineer
0 Kudos
Message 9 of 11
(4,473 Views)

Hi Shane,

 

I attempted to reproduce this with your code snippet. I had a mouse connected in as a USB RAW device, and I generated interrupts at a regular interval for 6-7 hours and was unable to see the behavior you are seeing. Is there anything in particular that I should be doing differently? The only thing that I feel is different is that I have not generated a consistent interrupt at 1Hz the way you did.

Raj
National Instruments
Applications Engineer
0 Kudos
Message 10 of 11
(4,393 Views)