LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView 2009 with HP4145B

Hello,

 

I apologize if this is a bit repititive. But I could not find an answer which was simple enough for me to understand, given that I have no prior experience with LabView.

 

I am using Agilent's USB-GPIB cable to get my antique 4145B to talk and listen to the computer....no problems there. I followed all the instructions in the application notes provided on the NI website for using the Agilent GPIB cable/IO libraries with LabView 2009.

 

I used (i) the NI drivers for the instrument (ii) a custom VI posted by a user on the NI website (which I believe he compiled using the NI VIs) and can confirm that there are no communication problems that I noticed. This was also confirmed by the Agilent I/O libraries application that tells me that I have the 4145B with a GPIB address of xx (I use either 17 or 18).

 

The problem is that I can't seem to get any data to display on the computer.........the custom VI is able to translate all my settings (voltages on the different SMUs etc.) comfortably to the instrument (although it seems to be "refreshing" the screen on the instrument many times over before measurement starts). During the measurement, I can see a cursor glide through the screen telling me that the instrument is measuring something, but I see no trace reproduction on the computer.

 

Moreover, when I am asked to save my data, I save it as xxx.txt and I open it, there is nothing inside.

 

I came across an old post that mentioned the following about the above problem:

 

"I had the same problem before, but I solve that by including a minimum waiting time of 5 seconds. This is because the 4145B is so old that it takes some time in providing data due that it works with a start-up diskette."

 

Where do I put this waiting time?

 

Also....how does this affect my total measurement time? My primary objective is to use SMUs 1, 2 and 3, with SMU 1 as my ground. SMUs 2 and 3 are alternatively swept while keeping the remaining SMU at a constant voltage. So, I want the data file the program spits out to contain

 

V1, V2, V3, I1, I2, I3

 

Please find attached the VI I am using.

 

I would appreciate any help.

 

Thanks and regards.

0 Kudos
Message 1 of 37
(11,234 Views)

Hi psycho...,

 

well, you attached a LLB with VI to communicate with that old HP4145B (which is a very nice device, with it's startup disk in proprietary HP formatting).

Those VIs resemble what usually is called a "LV device driver"...

 

But you didn't attach your own (main) VI to do all those setups and data retrieving and saving... Here's where the problem is buried and where the additional wait may help!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 37
(11,225 Views)

Gerd,

 

Many thanks!

 

I am afraid this is a bit embarrasing , but the I thought the one I attached was the VI? I simply open that and use the option that says "plot graphics".

 

Did you want to see the sub VIs? From what I saw, all the sub VIs are accessed through this one file, very much like the NI version of the 4145 driver.

 

Kindly advise.

 

Sorry for being a noob.

 

Regards.

0 Kudos
Message 3 of 37
(11,217 Views)

And here is exactly what I used:

 

http://decibel.ni.com/content/docs/DOC-1164

 

The gentleman who made this VI does mention that it is untested on the 4145B

 

Regards

0 Kudos
Message 4 of 37
(11,216 Views)

You did not mention that the top level VI was in the llb nor did you originally provide the name. That was the confusion.

 

You cannot use LabVIEW's GPIB functions with an Agilent GPIB controller. You would have to convert the functions to use VISA. The error indicator are hidden so you do no know if you are getting errors. I would also recomend you through away that top level. Poorly written with all of those sequence structures.

0 Kudos
Message 5 of 37
(11,208 Views)

Hi psycho...,

 

thanks to Dennis I found that VI too.

 

"the one I attached was the VI?"

No, you attached a LLB, which is a library of several VIs!

 

"use the option that says "plot graphics"

When opening the LLB you're presented with the list of VIs (not 'options') contained and there is no "plot graphics".

 

The VI you probably talking about is named "HP4145 Graphics Plot" and indeed it's a horrible bunch of stacked sequences.

And when setting up a LLB you can choose VIs to be the "Main" VIs, presented on top of the subVIs. You simply have to start the "Edit VI Library" in the Tools menu!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 37
(11,196 Views)

Dennis and Gerd,

 

Thanks for the tip.And I am sorry for the confusion. I did not have the VI in front of me when I sent out this SOS.

 

I am going to start over, only this time, setup the VI provided by NI for the 4145B and then post my results once again.

 

But the one or two times I ran that, I had similar issues with not being able to save/view the output.

 

But, I will get back in more detail.

 

Regards.

0 Kudos
Message 7 of 37
(11,183 Views)

Ok,

 

I went back and tried out the NI files. Attached is the LLB. I did the install through LabView itself and it created a sub-directory named hp4145b in the instr.lib directory, which included the dir.mnu and the hp4145b.llb files, though I have no idea what the former does.

 

The llb file contains all the VIs to control the instrument I believe. I clicked on the HP4145 Example.vi, which leads to the main control front panel.

 

This panel consists of active buttons that allow me to set the various parameters for the SMUs, VMUs etc.

 

The first thing I noticed was that unless I click the "run" button on this panel, none of the buttons are active. I don't know if that is normal.

 

The other thing that prevented me from proceeding at all, was the fact that none of my changes are accepted by the VI. In other words, when I say try and set the SMUs as voltage sources etc. and then enter whatever the values are for my sweep and then close the window, all values go back to their default.

 

So, I really can't tell what is going on, because I can't get the VI to do what I want it to in the first place. As far as out put is concerned, I clicked on the HP 4145 Display list button, and enter V1, V2, V3, I1,I2, I3, but as soon as I close it and reopen, its all blank again.

 

But when I hit "Take measurement", it runs the program with all its default values. I see V3, I1 and I3 values displayed on the instrument itself, but can't figure out how to access that data on my computer.

 

Please let me know if you need further information to solve the problem.

 

Thanks!

 

 

0 Kudos
Message 8 of 37
(11,165 Views)

Hi psycho...,

 

"unless I click the "run" button on this panel, none of the buttons are active. I don't know if that is normal."

"close the window, all values go back to their default."

It seems you should take the free online course (sorry, can only provide the German 3hr course here, do a search on your own) provided by NI. That is pretty basic what you're asking here... (You may try a search here...)

 

Usually you have to run a VI before it does anything.

Example: You don't load a C source code into an editor and expect it to RUN automatically. First you have to compile and call the executable. That is what the RUN button does for you as a VI is (mainly) the LabVIEW source code...

 

Why should LabVIEW save some values in the controls for you?

You have to force it - but not in the VIs provided by that library. These VIs are used to do all the communication with the device and you have to provide the data for that communication. These VIs aren't intended to be used on their own, they should be used as subVIs in a bigger program - your program. And all those parameters you try to set are connected as inputs for that VI so you can call the VI and provide parameters (comparable to a C function call).

 

To read data from the HP4145 you could use routines like the "HP4145 Data Output". The "HP4145 Example" is only showing the main setup steps...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 37
(11,139 Views)

I realise that i'm about to go a little of topic, but this seemed like the best place to post.

 

I have decided that I cannot be bothered figuring out the graphics plot.vi thing. Because it is too complicated for me and decided to star making my own VI for the HP4145A, at the moment it is only very simple, I have one VI that sets up three SMU channels. Two that are set as constants which the user can set, the other as a sweep, also which can be set. I also have a VI that takes the readings from a list and puts them into an array. I am using the measurement I/O VI that comes with LabView by the way.

 

The problems that I am having are.

 

1.How can I make it so that instead of pressing run to start the channel definition I can have a button so I can change the values a few times before I run a measurement? (does that make sense?)

 

2. The data that I read off is that of three currents with the voltage being the x axis ( in a list) but I cannot access the voltage column, is it possible. Because otherwise how am I going to get graphs?

 

Thats it I think I'll post my VI's below

0 Kudos
Message 10 of 37
(11,057 Views)