Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Reseting GPIB Device in LabVIEW

Hi All,

I am working with a test setup in which I have to unplug and replug my GPIB-USB-HS converter fairly regularly. Whenever I do, I get Error 28, "The Interface Lost Power," when I try to restart my VI.  I can clear this error by restarting my laptop or by resetting the device in NI MAX, but that is a pain.  Can I send the same reset messages as are sent by NI MAX from LabVIEW?  I have tried the ResetSys GPIB function, but it does not work.

 

Alternatively, is there a way I can put the GPIB-USB-HS in a safe/shutdown state when my VI terminates?

 

Any help would be greatly appreciated.

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 4
(3,617 Views)

Hello,

 

Why do you need to unplug and re-plug the device? And when do you do this? Unplugging during an execution is not best practice and can cause issues.

 

Some suggestions for this error are listed in GPIB Error Codes and Common Solutions.

 

Parul M.

Applications Engineer

National Instruments

0 Kudos
Message 2 of 4
(3,549 Views)

I do not unplug during execution.  I unplug after execution, because I am developing code on my laptop and moving between my lab, where the equipment under test is located, and my desk.

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 3 of 4
(3,542 Views)

If you do not have the equipment attached to your laptop, then why would you need to install/uninstall the USB to GPIB converter?  You should be able to disable the diagrams during development then turn them back on when running on the host PC.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 4 of 4
(3,514 Views)