VISA and Lab Tool Software - Page 1
Forum section: electronics / beginners

author: nathon
author_rank: Contributor
timestamp: January 25, 2022, 01:25:35 pm
content: I have a question about how the VISA drivers, connection software and individual tool software interact. I'm a software engineering with a good understanding of computers and software. However, I'm fairly new to electronics, so I don't understand the lab tool software to PC ecosystem.My SetupHantek MPO6104D OscilloscopeRigol DP832A Power SupplyBK Precision 5493C MultimeterAll of the tools above are connected to my PC via USB. All 3 of these are visible in Keysight Connection Expert and show when they're connected/disconnected. Although it took some work, I got the software for the Hantek working and connecting to the oscilloscope. Then I loaded the software for the Rigol and BK Precision. The software for both connected and worked great right away. However, I was no longer able to connect to the Hantek via it's Digital Scope software after that.As of right now, the Hantek and Rigol are both identified in Keysight Connection Expert and show a green status. However, the BK Precision shows as unknown and Keysight Interactive IO gives the following error.! VI_ERROR_NCIC: Not the controller-in-chargeVisa ErrorCode: 0xBFFF0060 (-1073807264)Long story short, I'm trying to figure out the relationship from the tool, through VISA and the connections, to the tool's software so I can get all 3 of these working at the same time. Does anyone have any resources or insights on how all of this ties together and how to begin resolving this issue?

author: rfclown
author_rank: Frequent Contributor
timestamp: January 25, 2022, 06:18:05 pm
content: Not sure if anything I say here will help you, but here are some things:When I'm controlling instruments, I want one program controlling everything. I use either LabVIEW or C. So if an instrument comes with control software, I might fire it up once to see what it does, but I don't use it. For measurement automation it needs to all tie together. Like sweeping the voltage from the power supply and making measurements with the meter and scope.I use NI-VISA. I also have Keysight (Agilent (HP)) VISA installed, but set as secondary. You can have more than one VISA installed, but you need to specify one as primary. I only have Keysight because I have some Keysight things that HAVE to have the IO libraries. Otherwise I'd avoid it. I have found that NI stuff (like USB-GPIB) seems to work with most anything, but Keysight likes Keysight stuff. Most of my test equipment at home is HP, but I still find it better to use NI for control. For me it was worked best to have NI VISA set as primary. Years ago (about 25) I decided to stop wasting time and getting aggravated over instrument control issues with non NI stuff.I posted a thing I use in a different post:https://www.eevblog.com/forum/testgear/ni-gpib-usb-hs-issues/msg3621529/#msg3621529It's a C program that uses NI VISA. The program visa.exe does a single write and/or read. I use it in batch files for scripting.Type "visa -h" for helpto see if I can talk to an instrument I'll do a *IDN? query for example: visa GPIB0::18::INSTR *IDN? -r 100 (You'd substitute your USB VISA address, this is for GPIB instrument 18)I actually use LabVIEW way more that C, but that's a whole thing in itself. But with either I am using NI-VISA (which is a free download)

author: nathon
author_rank: Contributor
timestamp: January 25, 2022, 09:14:47 pm
content: Thank you for the reply. That's very helpful. The only reason I'm using Keysight is because a couple of the instruments I have installed it or specified installing it, and I didn't realize I could use another product. I'll try investigating NI-VISA to see if that's more forgiving. I did notice that none of my instruments are compatible with BenchVue. I know it's not very professional, but I am looking for a UI rather than command line, since it'll be easier to use given I don't know the typical syntax for working with these instruments.At this point would it be better to uninstall everything and start from scratch with NI? I have both "National Instruments Software" and a bunch of Keysight software installed. I think one of the products installed NI and the other 2 installed Keysight.

author: rfclown
author_rank: Frequent Contributor
timestamp: January 25, 2022, 10:31:34 pm
content: You don't have to uninstall the Keysight stuff, but I did have issues once that were taken care of by specifying a primary (or maybe it's preferred) VISA. The NI tool for seeing what's what is called NI MAX. With it you can see what hardware and software is there. That's what I used to set NI VISA as my preferred VISA. On my bench computer here at work it is showing that I have three VISAs: NI VISA, Agilent VISA, and Agilent Simulation VISA. With Keysight, it seems you always have to run to the IO libraries tool and make sure it's seeing the instruments. With NI, you don't need the NI MAX thing, it's just useful at times. I seldom use NI MAX (could go years without using it). Mostly I just do VISA reads and writes in LabVIEW (or occasionally C if I want a command line interface).As far as communicating with instruments, it boils down to sending and receiving strings. Look at the instruments programming manual, and see what the commands are. I don't have a Rigol supply, but for the E3634A supply on my bench here at work, here are examples of commands that can be sent:volt 10current 3meas:current?output onpretty self explanatory. These would all be VISA writes (which takes a string as an argument). The meas:current? command is a query which you would follow with a VISA read, which will return the measurement as a string. It's all writing and reading strings which you often then have to parse.

author: ironcurtain
author_rank: Regular Contributor
timestamp: June 06, 2024, 04:53:06 pm
content: I'm reviving this thread, it seems.I have NI-VISA and Keysight IO Libs installed and configured properly. Through NI-VISA Interactive Control I can see my HP 8924c connected through GPIB (via USB, using an Agilent/HP dongle). I can interact with it using pyvisa too (from Windows 11).But when I browse NI-MAX and select Devices and Interfaces it does not show up listed there. My Keysight VISA is set as primary and all the Passports are enabled.I don't know what else can be tested. I need to share the GPIB interface via NI-VISA server so I can develop some tooling remotely (I have worked around the problem with USBIPd in Windows and exporting the GPIB dongle over TCP/IP to a Linux workstation, but this is definitely not optimal).