Author Topic: VISA and Lab Tool Software  (Read 1254 times)

0 Members and 1 Guest are viewing this topic.

Offline nathonTopic starter

  • Contributor
  • Posts: 37
  • Country: us
    • Blog
VISA and Lab Tool Software
« on: January 25, 2022, 01:25:35 pm »
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 Setup
  • Hantek MPO6104D Oscilloscope
  • Rigol DP832A Power Supply
  • BK Precision 5493C Multimeter

All 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-charge
Visa 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?
Nathon Dalton
 

Offline rfclown

  • Frequent Contributor
  • **
  • Posts: 407
  • Country: us
Re: VISA and Lab Tool Software
« Reply #1 on: January 25, 2022, 06:18:05 pm »
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/#msg3621529

It'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 help
to 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)
 

Offline nathonTopic starter

  • Contributor
  • Posts: 37
  • Country: us
    • Blog
Re: VISA and Lab Tool Software
« Reply #2 on: January 25, 2022, 09:14:47 pm »
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.
Nathon Dalton
 

Offline rfclown

  • Frequent Contributor
  • **
  • Posts: 407
  • Country: us
Re: VISA and Lab Tool Software
« Reply #3 on: January 25, 2022, 10:31:34 pm »
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 10
current 3
meas:current?
output on

pretty 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf