Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

data extraction from Agilent 4155A using NI driver Agilent 415X

Solved!
Go to solution
Highlighted

Hi everyone, 

 

I want to interface an Agilent 4155A (parameter analyzer instrument) with my PC, and use a GPIB-USB-HS+ cable to extract an I-V curve from the Agilent. 
I have NI MAX, NI 488.2, VISA, and the NI instrument driver Agilent 415X. 

 

First off, I am not sure if the driver Agilent 415X can be used with full functionality with Agilent 4155A? Should I be creating my own instrument driver project? 

 

Secondly, I am using the following code to extract a data curve that my instrument has. I am not using my labview code to control the 4155A , but just extract data from it. I want to read the curve on my 4155A and write it to excel files on my PC. 
mylabviewtrialcode.PNG
I was wondering if something is wrong/missing from the code since it gives me an error? If I am just doing data extraction should I be using 488.2 driver for GPIB control or NI DAQmx instead of an Agilent driver? 

(17 is the address of my GPIB0. I successfully scan my instrument using MAX, and I successfully read&write command "*IDN?\n" in VISA control. )

 

Thank you so much for your time reading my note, and for responding. I do realize this might be a basic question (I am new to LabView and not an expert on data transfer through gpibs yet). 

0 Kudos
Message 1 of 5
(263 Views)
Highlighted
Solution
Accepted by topic author lodhi33

How familiar are you in using the Hp4155 manually?  Are you looking to retrieve the data currently being displayed on the screen or the data saved to disk?  Either way you will need to know some information about the setup of the SMUs, the Variable names, etc.. in order to automate the data transfer to the PC.

 

I assume you are using the driver found here - http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=015E42A1245448B2E0440003BA7CCD...

 

Please look at the Example contained in that driver.  You will see that your code isn't using the driver VIs in the correct manner.  (Hover your mouse over the VIs on the block diagram and press CTRL + H to see what the terminals are and a description of what the VI does.)

 

You DO need to initialize communication with the instrument since before you can talk to a VISA resource you need to establish a connection. You need to supply its VISA resource name (IV? More like GPIB0::19::INSTR).  Then you do need to give the Exact names of the variables you want to download, as they appear on the CHANnel setup page.  (Voltage and current??  Usually more like VDS, IDS or V1, I1 or similar abbreviations.  Make sure these are listed on the DISPlay page of the setup as well.)

 

So try something like this to get you started.  Often times with the Hp4155 is easier to setup and run the entire measurement via automation.  Here I've done more or less what you were looking for; initialized communication (avoiding a reset or setup), then doing a measurement (exactly like pressing the SINGle button), then reading the V1 and I1 data arrays, and plotting.

 

hp4155_run+read.png

 

This assumes you have an SMU with parameters named V1 and I1.  If they really are "Voltage" and "current" then change them to match.

 

Craig

Message 2 of 5
(241 Views)
Highlighted
Solution
Accepted by topic author lodhi33

Your new pictures is closer to what you need.  (If you edit your post, please point out what has changed so replies make sense.). 

 

Make sure your manual setup matches the parameter names...

 

CHANpage.pngYou will also need to make sure the same variable names are listed on the Graph/List page.  If they aren't then the data will not be available for you to retrieve, though it might be plotted on the screen.  If you aren't familiar with how to do this then here's a good primer - http://tuttle.merc.iastate.edu/ee432/lab/misc/parameter_analyzer_diodes.pdf

 

Craig

Message 3 of 5
(215 Views)
Highlighted

Thank you so much for the detailed responses to my query Craig!

They helped me fix my code and understand the issues I was facing better.  

 

Yes, I was familiar with running a sweep test using the 4155A panel but I did not know that the variable names in labview program need to exactly match the variable names entered in 4155A. That was one of the mistakes I was making. The other was that I was entering the IP address of my gpib cable manually instead of the instrument selecting it itself (based on what it finds/scans). 

 

I also edited the labview program so that it includes an instrument initialization function, and the rest of the functions that were missing. For anyone who reads this in future, the final working code I have is attached to this message.

The data extraction to a file, however, does not work. There is a file type incompatibility. My program saves an .xlsx file, which does not open with MS Excel. Is there any way to save data in a excel format or CSV in the labview program so that I don't have to export manually? Thanks a lot again!  

lodhi33_2-1602707854631.png

lodhi33_3-1602707869723.png

 




0 Kudos
Message 4 of 5
(145 Views)
Highlighted

Glad to hear you got the measurement working.

 

For the data file, you are using the Write Delimited Spreadsheet VI, which does not create a MS Excel file.  It does create an ASCII file using a CSV format, so you can save it with extension *.txt, *.dat or *.csv and then import that into Excel without issues. If you want to generate a true MS Excel formated file then you need to use the NI Report Generation Toolkit.

 

See the documnetation here - http://zone.ni.com/reference/en-XX/help/371361R-01/glang/write_delimited_spreadsheet/

 

Personally if I need to create a very simple file format for a user to open in Excel, I create a CSV use an extension like "*.xyz" and associate that extension to open using MS Excel. 


Hope that helps.

Craig.

 

 

 

 

0 Kudos
Message 5 of 5
(142 Views)