LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

agilent 4395a impedance analyzer

Please see the previous discussion about the same error with the same dll from Agilent. Ask them for a solution.
0 Kudos
Message 31 of 46
(1,526 Views)

Hi,

I have as well some issue to connect the spectrum 3495A with a GPIB to USB connector. I would like to try to control a spectrum analyser 4395A with labview and display the front panel and the screen of my spectrum analyser to my laptop.

I have downloaded the drive "Ag4395A" but it doesn't look like yours (see below)

Capture.PNG

Could you tell me where you got your drive.

I am also a bit confuse, with a connector GPIB to USB should I use the VI serial (because I am using a USB) or should I use the GPIB VI (see picture below)

Capture.PNG

 

0 Kudos
Message 32 of 46
(1,340 Views)

If you open the llb, then select the topmost VI "Ag4395A_Front_Panel.VI" you should be able to control the instrument directly without having to write code yourself.  

 

Once that is working for you, then you can look at the code that you use and if you like you can build your own program.    

 

The driver/program uses GPIB communication call, but you could use VISA but not serial if you are using a USB-GPIB adaptor.

 

 

0 Kudos
Message 33 of 46
(1,338 Views)

Hi everyone,

 

Thanks for your reply !

I tried the "Ag4395A_Front_Panel.VI" But it is not working, I have the following error message.

1.png

2.png3.png

I look “measurement and automation” and I press "scan for instruments" and I have the following error message (see below). It is like my laptop detect the cable and not the spectrum analyser.

7.PNG

 

I looked online but haven’t found a goo answer to this error message. Do you know where is could come from?

 

I look at the sample code "Ag4395A_Front_Panel.VI" from National instrument to understand a bit more. And I think I need to use the “get data” block and display it after on the two-different graphs channel 1 and 2, But I don’t know what they mean with “bobus” or “what kind of Analyser”. Any idea?

5.PNG

In order to test the connection, I tried to set up a small program to connect to my spectrum analyser (see below) but I have the following error (28) message coming from my “GPIB read” box. My code is probably wrong as well.

 

6.png

Any suggestion ?

 

 

0 Kudos
Message 34 of 46
(1,328 Views)

You'll need to get the connection working before the code will work.

 

In NI-MAX select the GPIB0, then hit the button "scan for instruments".  If your 4395a doesn't come up then you need to make sure its enabled for GPIB communications, and take not of its GPIB address. Then try the scan for instruments again.  

 

To help us help you please report back on ..

 

1) What is the instrument GPIB address?

2) Have you installed NI-VISA and NI-488?  Do they match your version of LabVIEW?  What versions are they?

 

I'm not familiar with the 4395a, so I'd also suggest you read the 4395a manual about GPIB/remote use and make sure all those settings are correct.  Make sure the instrument is set to receive command, often refered to as  "listener".  If its set to "talker" then it will ignore the commands coming from the PC.  This can happen when the instrument is used with other "slave" instruments.

 

Message 35 of 46
(1,322 Views)

Hi 

Thanks !

Indeed I forgot to change some settings in the spectrum analyser.

For those you might be interested :

Pressing  "Local" on the front panel than pressing "address able only"

Now the spectrum analyser is recognized by "measurement and automation" (see below print screen)

Capture.PNG

 But I still have the same error message when I am running the "Ag4395A_Front_Panel.VI" (see below the error message). 

11.png

The code is attached ( HP4396A), I don't really understand how this code works. 

I don't know where on the dashboard I should enter the GPIB address.

Any suggestion ?

 

 

0 Kudos
Message 36 of 46
(1,319 Views)

When I sent a "*IDN?" with NI-488.2 communicator it's working (see picture below)

17.png

But when I tried the same query in Labview it doesn't work (see below) and I have the following error 28 "GPIB Initialization in Agilent_4395A.vi".

Capture.PNG

Any suggestions ?

Thanks in advance 

0 Kudos
Message 37 of 46
(1,306 Views)

Can you provide the answers to these?

 

- Have you installed NI-VISA and NI-488? 

- Do they match your version of LabVIEW? 

- What versions are they?

 

NI-MAX "communicate with instruments" is probably using VISA, but good to check what version of all installed software you have to make sure its all playing nicely with LabVIEW.  

 

You could also try the simple instrument I/O code that minions posted a while back.  Does the same thing as NI-Max communicator query.  Note that it uses a LF termination character...not sure you used one or not in your tests, or what the 4395a requires or has been set to use.  That's probably your issue here.

 

In future attach the code and not pictures of the code so it can be inspected.

Message 38 of 46
(1,303 Views)

I just noticed in some of your pictures that the error code is Error #28.  Details below.

 

EPWR (28)

Error Condition: The Interface lost power.

Possible Cause: EPWR results when an interface loses power. This often results when the system goes to and returns from a standby state.

Solutions:

  • Take all handles offline and reinitialize the application.
  • Quit the application and restart the system.
  • Disable standby and hibernate modes on the PC.

 You should probably disable the USB low power option, which turn off the USB port when not in use regularly.  Windows uses this on laptops to save battery life, but its often enabled on desktops too.   To disable that look here - https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPIB-error-28-with-vi-but-no-error-in-MAX-co...

Message 39 of 46
(1,300 Views)

Hi Thanks for your reply !  Smiley Happy

 

  • Yes, I have installed “NI-visa” and “NI-488”, you can see below all the products I have from national instrument.

1.png2.png

  • I think they match all together, because when I tried your code  “LV8_VISA_Simple_IO-minions.vi ‏14 KB” there was not error message so I guess the connection is good. In addition, when the “Ni-488” wasn’t installed on the laptop, “measurement and automation” couldn’t recognize the cable “GPIB to USB” so I guess "NI488" is working properly.
  • I have the NI Labview 2017

I tried your solutions below

“”

Solutions:

  • Take all handles offline and reinitialize the application.
  • Quit the application and restart the system.
  • Disable standby and hibernate modes on the PC
  • disable the USB low power option.

“”

and after I tried you code “LV8_VISA_Simple_IO-minions.vi ‏14 KB” and it works perfectly see picture below.

3.png

I don’t have the error 28 anymore.

But I still have some problem with the code “HP4396A Main Instrument Panel” (see code attached).

“Error 4 occurred at FindLstn in Address Check.vi->HP4396A Main Instrument Panel.vi”

And also “Error 3 occurred at Receive in Receive Data.vi->Address Check.vi->HP4396A Main Instrument Panel.vi”

I am probably not using the code properly, I don’t understand the code, usually with a labview code you have to enter the address of your visa source name, in my case the “GPIB0::17::INSTR” but in this code I don’t see where I should enter it.

Any ideas ?

 

 

0 Kudos
Message 40 of 46
(1,290 Views)