03-12-2015 01:58 PM
Hi everyone,
I'm trying to get a SRS model SR720 LCR meter (manual on this page) working with LabView, connecting it to my PC with an Agilent 82357A GPIB/USB interface (manual on this page). I'm running MAX version 14.0, and NI-VISA version 14.0. I'm running LabView version 13.0f2, 32 bit.
I followed the directions on this page, and I'm pretty confident I can communicate with my LCR meter, because I can go to NI MAX->GPIB0::17::INSTR under "devices and interfaces", then go to the VISA test panel, go to the I/O tab, and I can enter a few commands from the SR720 manual, like changing the frequency, and I see the light on the LCR meter change to what I just told it to do. Here is a picture, just to illustrate it:
Also, if I do the *IDN? command, it returns "
9: Write Operation (*IDN?) Return Count: 5 bytes 10: Read Operation Return Count: 41 bytes StanfordResearchSystems,SR720,08087,1.03\n
So, that's good too. I also made the alias of this device "MyLCRmeter", but that shouldn't matter for now.
Now I'm trying to get it to work in a more usable way. The SR7xx drivers that LabView found for me came with a couple sample programs, one called "Getting Started.vi". I tried to just simply see if it worked, changing the "instrument descriptor" field to "GPIB0::17::INSTR", since that's the one that seemed to be the right device in MAX. Here is a picture of the front panel of "Getting Started.vi":
Trying to run it like this gave me this error (code -1073807343):
Old VISA Open in SR715/720 Initialize.vi->SR715/720 Getting Started.vi
Doing a bit of searching on these forums, I found these few threads (1 2 3), which seem to tell me that, since this program was written, the way you open VISA has changed. In the 2nd of those links, one guy said:
You just have to replace the Old VISA Open function with the VISA Open that is on the Instrument I/O>VISA>VISA Advanced palette. When you do that, the wire to the string that was used for the resource name will be broken. Delete the string and make the actual VISA Resource Name visible on the front panel. Wire the VISA Resource Name control to the connector pane where the string control was (upper left connection).
So, I went into the sub-VI Initialize.vi, and did that. Here is a picture of what the front panel and block diagram of the sub-VI Initialize2.vi (I changed the name in case I screwed things up, but I'm pretty sure the new one is the one being called by Getting Started.vi) looked like before I changed anything (you can see the Old VISA Open):
and here it is after replacing that with the regular VISA Open, deleting the instrument descriptor string and replacing it with a VISA resource, and connecting that to the VISA Open:
However, as you can see in the image above, and it seems like someone else had this problem in the 2nd thread linked above, I don't see my device listed in the drop-down menu (even if I refresh), only "LPT1" (I don't even know what that is):
No, I wasnt able to select the visa resource from the pull down menu. somehow it seems disabled or something.
If I just enter the VISA resource name from MAX manually, GPIB0::17::INSTR, and save and try running that, I get the error(code -1073807346):
VISA Open in SR715/720 Initialize2.vi->SR715/720 Getting Started.vi
So I'm not sure where to go from there, or why it's not in the drop down menu to begin with. I'm sorry if I've missed something but I've searched about as far as I can go. If I had to guess, maybe one thing could be that in MAX, under Tools->NI-VISA->VISA Options->My System->Conflict manager, I have both Agilent VISA and NI VISA enabled; I know sometimes problems arise from conflicts between different software fighting over the same hardware. Is this okay, or do I need to change it?
Thank you and please let me know if there is any other code/screenshots I could provide that could help!
03-12-2015 03:24 PM
03-12-2015 04:10 PM
Hi, I did indeed enable NiVisaTulip.dll under MAX->Tools->NI-VISA->VISA Options->My system->Passports->List of passports. Sorry, I should have mentioned that explicitly.
By install as primary, do you just mean as it is here, where it is selected as the "Preferred VISA"?
Or somewhere else? I installed NI-VISA first I believe, and then the Agilent one, and during the installation of the Agilent one, I'm pretty sure I made it not the primary. Here's what I have in the Agilent (it's called Keysight now) Connection Expert software:
I also have this under the "Keysight 488 options" tab:
Should that be checked? I don't actually know the role of VISA vs 488 here...
What could I try?
Thank you!
03-12-2015 05:01 PM
03-13-2015 08:36 AM
Haha, lady=last I assume?
I highly suspect now that it is the thing I suggested, but I'll try that and post here if it works or not.
I'm referring to the last step of tip 1 here: http://cp.literature.agilent.com/litweb/pdf/5990-3731EN.pdf?cmpid=1273
However, when I try it in Keysight Connection Expert, it's not letting me select that...
03-13-2015 08:51 AM
03-13-2015 08:53 AM
Alright, so this is a little confusing. I restarted my PC (when it "wouldn't let me" before as I mentioned, it said to close NI-configuration manager, then restart my PC), and went to Keysight Connection Manager (KCM), selected that, and saved it, and it worked.
However, now when I go to MAX, when it tries to search for my devices, it gives me this error:
And brings me to this link: http://digital.ni.com/public.nsf/allkb/D57A25E7B74F31E8862577A7005426D7?OpenDocument&metc=MAXVISATim...
Closing MAX and then undoing the option in KCM that I just mentioned, and starting MAX again, I still get the same error.
Anyone have any ideas?
03-13-2015 08:57 AM
Hello optoelectro,
Have you taken a look at the following KBs?
http://digital.ni.com/public.nsf/allkb/F7C187DBF09EBE1186256F550065BD32
http://digital.ni.com/public.nsf/websearch/3B3626D9C1F999218625694200791AD7?OpenDocument
http://digital.ni.com/public.nsf/allkb/A2561CDE98B66DD4862566510078264F?OpenDocument
In the LabVIEW section of the second link, it explains why your VISA resource is not populating correctly in your control.
Are you planning on using Keysight and NI GPIB controls on the same computer?
The 488.2 driver allows NI-VISA to communicate using GPIB.
Regards,
03-13-2015 09:19 AM
Hi Thomas, thanks a lot for the response.
I had seen the first two links you posted, but not the 3rd. So (regarding the 1st link) it seems like I had enabled Tulip a while ago, and the thing I just tried was the second thing I needed to enable.
I'd say the main problem here is that I know very little about LabView and VISA. My goal is just to use my LCR meter and Agilent GPIB/USB interface, only through LabView. I'm not really sure what the role of VISA is in all this, to be honest.
So, just to make sure I have everything right:
NIVISATulip.dll
enabled within MAX.Sorry, I'm confused about that last part, regarding the LabVIEW section of your 2nd link. The title of the question is "Can I use both NI and Agilent controllers in the same system?" But I don't need to control both, just an Agilent controller. Does that make my life easier?
Thank you for the help!
03-13-2015 09:39 AM
Hello,
Sorry about the disjointed response, I didn't refresh the forum thread before I posted. The LabVIEW section of the 2nd link says that your resource will not automatically populate with HP/Agilent/Keysight GPIB controllers. It says how to configure your resource to communicate with the device.
VISA is a driver that allows LabVIEW to communicate over a Serial, Ethernet, GPIB, etc. This is an abstraction of each protocol, so that you can use the same API for all of the protocols. You should keep VISA installed.
With regards to your Time out error, I was able to find notes of customers using the following forum to resolve it.
http://forums.ni.com/t5/Multifunction-DAQ/software-conflict/td-p/1128783
You also should consider repairing your VISA driver and MAX.
Regards,