07-18-2016 03:12 PM
How to change NI-VISA runtime "instrument configuration"? For example, I want to configure a LAN address (TCPIP::156.140.113.84::inst0::INSTR).
I don't have NI-MAX, because its just a runtime install. Do I have to use the NI System Configuration API? Or is there some other mechanism?
07-19-2016 10:55 AM
hognala,
Can you explain more about what you want to accomplish? Do you want to change the default VISA Resource Name that is assigned to a specific device? What is your application?
07-19-2016 11:02 AM
I just want to add a LAN instrument, so it is reported when I call viFindRsrc
07-20-2016 02:23 PM
Static VISA resources are stored in the visaconf.ini file located in C:\ProgramDataNational Instruments\NIvisa. When you add a new LAN resource, 2 changes are made to that ini file. First, the NumOfResources token under the [TCPIP-RSRCS] section is changed to reflect the total number of TCPIP. Second, the specific device information is added to the resource list. Here is what my it looks like in my ini file with 2 TCPIP resources:
[TCPIP-RSRCS]
SynchronizeAllSocket=0
SynchronizeAllVxi11=1
NumOfResources=2
Name0="TCPIP0::10.1.128.126::Resource1::INSTR"
Enabled0=1
Static0=1
Name1="TCPIP0::10.0.0.0::Device::INSTR"
Enabled1=1
Static1=1
I wasn't able to find a way to add a resource using the sysconfig API or VISA, but you should be able to programmatically change this ini file to accomplish what you want to.