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: 

How do I find instruments on my LAN using viFindRsrc?

Hello,

 

I am running CVI 8.5.1 with the current drivers. The computer (Win XP SP3) is equipped with two Ethernet boards, one for Internet access, one for a private measurement network (IP 192.168.x.x.)

 

Now I want to find all the instruments that are ON and connected to the LAN, and for this purpose I thought to use viFindRsrc as I do to find all my serial instruments. Queries I used were "visa://192.168.1.1/?*" and "TCPIP0::192.168.1.1::?*INSTR" (the LAN board is the first found by GetAllTCPHostAddresses, thus TCPIP0), and the IP of the computer on the LAN is 192.168.1.1.

 

Unfortunately, none of these queries returned any instrument (return count 0). Since this is my first encounter with Ethernet based instruments, I would appreciate any help.

 

Thanks!

0 Kudos
Message 1 of 6
(5,926 Views)

viFindRsrc on the LAN doesn't go out and discover instruments on the LAN. It only looks for preconfigured instruments that were found with NI-MAX - which doesn't help if their IP address changes.

 

I have tried to get the VISA WG to change this but failed - they say it would be too slow!

0 Kudos
Message 2 of 6
(5,912 Views)

Thanks! I do not like the answer, unfortunately... The documention claims something very different (The viFindRsrc operation matches the value specified in Expression with all known resources), and it would be very sad if my applications can run only on systems with MAX. CVI executables should be able to talk to Ethernet instrument without MAX, too, so probably there is an alternative approach... I am aware of a device vendors software utility that easily finds all the instruments of this vendor on all LANs, within a second or so.

 

So I would be very glad about assistance for accomplishing something similar in CVI, and if this involves using a different function I wouldn't mind 🙂

 

Thanks,

 

Wolfgang

0 Kudos
Message 3 of 6
(5,896 Views)

More than a decade has passed. I don't know why the problem hasn't been solved yet?

At present, I still can't use visa32.dll to successfully search the instrument on the network.

 

0 Kudos
Message 4 of 6
(3,210 Views)

If the instrument supports LXI 1.3 or greater then it has mDNS (Bonjour/Avahi) and should/will be discovered by viFindResource. Its just instruments that support VXI-11 discovery will not be found as it takes too long (apparantly)

 

0 Kudos
Message 5 of 6
(3,200 Views)

HI
I can't find viFindResource() in visa32.dll. Can you tell me how to call it

thank you

0 Kudos
Message 6 of 6
(3,105 Views)