LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Intermittent VISA errors -10073807194 'connection for given session has been lost'

Hi all, 

I'm new with LV and I'm trying to communicate with a GPIB device (rshmc8043) using a GPIB-USB-HS+

controller (as in the scheme attached).

 

I've tried to run a few examples:

1. rshmc804x_LV2010_Examples_2_0_0 from the manufacturer site:

https://scdn.rohde-schwarz.com/ur/pws/dl_downloads/dl_driver/powersupplies/rshm804x/examples_18/rshmc804x_LV2010_Examples_2_0_0.zip

I get these errors:

Code: -1073807302

VISA Write in Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_write.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_query.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_get_StatusByte.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_clear_before_read.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_clear_buffers.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize with Options.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize.vi->rshmc804x_LV2010_SimpleExampleOriginal.vi

and:

Error -1073807194 occurred at VISA Clear in Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_clear_buffers.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize with Options.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize.vi->rshmc804x_LV2010_SimpleExampleOriginal.vi

Possible reason(s):

VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost.

(Snapshots of the exact nodes are attached)

 

2. "GPIB with VISA functions" example didn't work either.

 

3. I'ts worth mentioning that I did succeed to establish a connection (not stable though) via :

-"Communicate with Instrument (SCPI commands)",

-"VISA Test Panel (non-SCPI commands)" and

-"VISA Interactive Control"

 

Is there a simple way to debug this or should I move to another interface?

What would be quicker- USBTMC or LAN ?

(Win 10 64-bit OS with 2017 32-bit LabView)

 

Thank you,

Omer

 

0 Kudos
Message 1 of 10
(2,835 Views)

Hi Algomer,

 

what is the GPIB address of your device?

Why do you want to use GPIB::0::INSTR as VISA reference?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,826 Views)

No specific reason, I tried also addresses 20 and 30 as I saw in examples, and set the address at the device accordingly.

It's more than possible that I'm missing something here-

what should determine the address, the VISA SW, the GPIB-USB, the device itself or it is arbitrary and up to me to configure?

 

Thanks,

Omer

0 Kudos
Message 3 of 10
(2,821 Views)

Hi all, 

I'm new with LV and I'm trying to communicate with a GPIB device (rshmc8043) using a GPIB-USB-HS+

controller (as in the scheme attached).

 

I've tried to run a few examples:

1. rshmc804x_LV2010_Examples_2_0_0 from the manufacturer site:

https://scdn.rohde-schwarz.com/ur/pws/dl_downloads/dl_driver/powersupplies/rshm804x/examples_18/rshmc804x_LV2010_Examples_2_0_0.zip

I get these errors:

Code: -1073807302

VISA Write in Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_write.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_query.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_get_StatusByte.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_clear_before_read.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_clear_buffers.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize with Options.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize.vi->rshmc804x_LV2010_SimpleExampleOriginal.vi

and:

Error -1073807194 occurred at VISA Clear in Rohde&Schwarz HMC 804x Power Supplies.lvlib:rsidr_core.lvlib:io_clear_buffers.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize with Options.vi->Rohde&Schwarz HMC 804x Power Supplies.lvlib:Initialize.vi->rshmc804x_LV2010_SimpleExampleOriginal.vi

Possible reason(s):

VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost.

(Snapshots of the exact nodes are attached)

 

2. "GPIB with VISA functions" example didn't work either.

 

3. I'ts worth mentioning that I did succeed to establish a connection (not stable though) via :

-"Communicate with Instrument (SCPI commands)",

-"VISA Test Panel (non-SCPI commands)" and

-"VISA Interactive Control"

 

Is there a simple way to debug this or should I move to another interface?

What would be quicker- USBTMC or LAN ?

(Win 10 64-bit OS with 2017 32-bit LabView)

 

Thank you,

Omer

0 Kudos
Message 4 of 10
(2,818 Views)

@Algomer wrote:

3. I'ts worth mentioning that I did succeed to establish a connection (not stable though) via...


That instability is what scares me.  Did you try a different GPIB adapter?  Or a different USB port?  Reboot your PC?

 


@Algomer wrote:

Is there a simple way to debug this or should I move to another interface?

What would be quicker- USBTMC or LAN ?


If you do decide to go away from GPIB, my recommendation is LAN.  I find it to be a lot more consistent than USB.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 10
(2,814 Views)

@Algomer wrote:

what should determine the address, the VISA SW, the GPIB-USB, the device itself or it is arbitrary and up to me to configure?


The address is determined by settings in the instrument.  Dig through the menus on the instrument and figure out where the GPIB address is set.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 10
(2,811 Views)

@Algomer wrote:

what should determine the address, the VISA SW, the GPIB-USB, the device itself or it is arbitrary and up to me to configure?

 


Well GPIB addresses of instrument are set on the instrument itself.  For what it's worth the manual on page 64 says: 

 

 

 10.4 IEEE-488.2 / GPIB
In addition to the GPIB functions which are available via USB TMC class, the R&S®HMC804x is optionally available with an integrated GPIB interface (R&S®HMC804x-G). This solution is particularly attractive for customers who already have an existing GPIB environment. With minimum efforts, an old instrument can be replaced by a R&S®HMC804x model.

 

Configure the settings in the R&S®HMC804x for all necessary parameters after you select IEEE488 as interface and press the soft menu key PARAMETER. 

 

So I would guess that is where you set the GPIB address of the instrument.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 10
(2,806 Views)

For the moment try to debug one connection method with NI-MAX, then move on to LabVIEW.  Your problem seems like its an issue with the physical connection.

 

- Avoid using the USB-GPIB-HS+ on an a hub, or extended cable either GPIB or USB..

- Disable the USB port low power mode (selective suspend) - https://www.windowscentral.com/how-prevent-windows-10-turning-usb-devices

- I'll assume that NI-VISA (and no other VISA from Keysight, Tektronix, Keithley, etc.. .) and NI-488 are installed.  If you have installed other versions of VISA they might cause issues and you should search the forum here for previous threads on dealing with that.  If you run other VISA software while trying to communicate with the instrument I'm not sure what the results would be.  (i.e. you have a R&S software running in background that checks for instruments periodically)

 

To debug..

Start with NI MAX and the USB-GPIB-HS+ since you have started that way. 

Unlups the cable from PC and instrument. 

Perhaps a reboot too.

Set the instrument GPIB address to something >0, say 4. 

Plug the USB-GPIB cable into PC. (Drivers are installed already or does it ask again?)

Open NI-MAX. 

Do you see the USB-GPIB interface listed? 

Do you see an instrument at address 4?  If so, try the VISA test panels again. Try *IDN?\r <QUERY>.  Do you get a response?

Report if you have issues, if not then close NI-MAX and try the LabVIEW examples.

 

Craig

Message 8 of 10
(2,793 Views)

Oh... Look what I just found in the SCPI programming manual...

 

GPIB Instrument Address
In order to operate the instrument via remote control, it must be addressed using the GPIB
address. The remote control address is factory-set to 20, but it can be changed in the network
environment settings or in the „Setup“ menu under „Interface --> Parameter“. For remote control, a GPIB address from 0 to 30 are allowed. The GPIB address is maintained after a reset of the
instrument settings.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 10
(2,786 Views)

Thank you.

I've switched to LAN connection which works fine, 

so I'll try this debug the next time that I'll have to use something that speaks only GPIB..

0 Kudos
Message 10 of 10
(2,744 Views)