From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to a TCP/IP VISA Resource Requires Registration - Why?

Using the ICS-9065 interface requires registering a VISA resource for each instrument using NI-MAX.  Apparently, this manual procedure just adds entries such as these to the visa configuration file:

 

[TCPIP-RSRCS]
SynchronizeAllSocket=0
SynchronizeAllVxi11=1
NumOfResources=3
Name0="TCPIP0::192.168.1.140::gpib0,15::INSTR"
Enabled0=1
Static0=1
Name1="TCPIP0::192.168.1.140::gpib0,22::INSTR"
Enabled1=1
Static1=1
Name2="TCPIP0::192.168.1.140::gpib0,24::INSTR"
Enabled2=1
Static2=1

[ALIASES]
NumAliases=4
Alias0="'COM1','ASRL1::INSTR'"
Alias1="'7001','TCPIP0::192.168.1.140::gpib0,15::INSTR'"
Alias2="'2002','TCPIP0::192.168.1.140::gpib0,22::INSTR'"
Alias3="'2410','TCPIP0::192.168.1.140::gpib0,24::INSTR' "

In fact, rather than going through NI-MAX, the resources could be added directly by editing this file. It seems, therefore, that adding resources is rather unnecessary making it harder to deploying applications. Doing away with the manual step clearly will facilitate deployment.  In fact, rather than having to add these resources manually, the VISA environment could add said resources automatically upon a successful creation of a VISA session.  

 

My questions:

(1) is this analysis correct?

(2) could this automatic resource registration feature be added to a future release of VISA?

 

 

 

 

0 Kudos
Message 1 of 9
(5,881 Views)

Hi,

 

You are correct about the VISA config file. That is where all the VISA aliases are stored. However, I am a little confused about how this automatic resource registration would work. To open a VISA session, you would need the information stored in the VISA config file. I'm not sure how you would open a VISA session with a particular instrument without the information stored in the config file. 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(5,847 Views)

Hmmm.  In my experience no registration is required for opening a VISA session to instruments with 'standard' resource names. This can be confirmed using the NI Simple Read Write .Net example.

 

 

 

0 Kudos
Message 3 of 9
(5,838 Views)
That's not true at all. A resource such as serial, GPIB, Ethernet, USB, must exist before being called. The resources are automatically detected and listed in MAX. I'm not familiar with your Ethernet to GPIB but perhaps the vendor can explain why connections are not automatically detected.

p.s. Deployment does not require manually recreating the resource names on the new computer. You can export the configuration from MAX and import that on the new pc.
0 Kudos
Message 4 of 9
(5,832 Views)

man, chill out 🙂

 

Fact: I never add resources in MAX before opening said resources in .NET.  I deployed numerous apps over the years, and my users do not have to do this either. install the run time, open my app, click the search button and the active GPIB instrument will show up courtesy of the Local Resource Manager. That has been the case probably since NI VISA 3  -- definitely 5.x.

 

please, give is a shot. what may have been true once has not been the case for a very long time now. So, clear the config file, fire the Simple Read and Write example, hook up a GPIB instrument and see for yourself. the resource will show in the resource selector. With a TCPIP resource you may have to enter the resource name manually once and it will connect no problem. With special resources, it is a different story. 

 

 

 

0 Kudos
Message 5 of 9
(5,824 Views)
I have no idea what your app is calling but I'll wager that the instruments are listed in MAX after.
0 Kudos
Message 6 of 9
(5,818 Views)

first, I wish to express my thanks to the NI engineers and to those who supported .NET with VISA. Rev 15 works like a charm.

 

the last comment seems to support the observation that having to register the instruments manually in MAX could be done away with. seeing how coding is complex enough as it is, removing this step makes sense because it is manual and redundant.

 

i'd be most grateful is this could be implemented in a future release of NI VISA.

 

and, while at it, could you guys look into implementing VXI11.2? I believe Keysight has had that as part of their VISA implementation for some time now. with VXI11.2 GPIB control over TCPIP is virtually complete. granted, HISLIP might do just that but because it takes time for new hardware to materialize supporting this new flavor of LXI, implementing VXI11.2 might provide value for some time.

 

finally, please check my other active post. my GPIB-USB-HS are bricked now:

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPIB-USB-HS-Driver-Error-Windows-10-possibly-...

 

 

0 Kudos
Message 7 of 9
(5,808 Views)

Hi,

 

Thank you for your suggestions! I would recommend posting in the NI Idea Exchange. That is a forum where our R&D engineers receives feedback from our users and takes them under consideration for future development. I think that forum would be perfect for your recommendations. I've linked to it below.

 

NI Idea Exchange: https://forums.ni.com/t5/NI-Idea-Exchange/ct-p/ideas

 

 

James F.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(5,753 Views)

I don't know about all the shenanigans below but I am using Labwindows CVI 2019.  Call it faith-based engineering or divine intervention.  I don’t know what happened but a miracle just happened with the NI visa connection (NI MAX) through the ICS-9065 LAN to GPIB box.

First I used my networking skills to open the web browser on the ICS-9065 and changed the IP to 192.168.1.88/255.255.255.0  All my network resources are 192.168.1.xx  isolated local LAN.

Then I opened NI MAX.  Under “Devices and Interfaces” -> Network devices   I created a New VISA TCP/IP Resource  --> (wizard came up) select Manual Entry of LAN instrument --> entered in Host Name or IP Address box  192.168.1.88   and   Lan device name (use the gpib name and number from ICS-9065 web browser)  gpib0,17   (17 is the gpib number of the PSG!).  click Next --> gave it alias GPIB_PSG (but never calls the alias in the code but it shows up in the network devices).

If you click on the newly created Network Device alias GPIB_PSG it shows what the visa resource name is:   TCPIP0::192.168.1.88::gpib0,17::INSTR    which is what you should use to open it.  ipaddressPSG below is 192.168.1.88

it seems like the important thing is the gpib0,17  ....gpib0 is the gpib address of the ICS-9065 box and 17 is the gpib address of the device connected to the gpib interface on the ICS box.

The code to call it using my visaextensions functions in LW CVI  is:  sprintf(commandLF,”TCPIP0::%s::gpib0,17::INSTR”,ipaddressPSG)

VISAext_Open(commandLF, &psg);

VISAext_Query(psg, “*IDN?”,response); printf(“response…%s\n”,response);

 

I guess for each ICS-9065 we have to give it a unique gpibx number on it’s web config page if they are all on the same net.  I can try it out later.

I feel like I just bumbled onto it.  Well… that’s the magic of engineering.

Much resetting, debugging, banging on it, crying,  …denial, anger, bargaining, sadness, acceptance…

 

Hope this helps someone out.  I have seen the light....and it is Maxwells equations :0

 

0 Kudos
Message 9 of 9
(3,399 Views)