LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent 34465A Help

Solved!
Go to solution

Hello,

 

I am fairly new to Labview.

I would like to be able to take measurements from the Agilent 34465A at a rate of 1Khz, and after a minute average the results.

 

I can set the speed of my DMM on the front panel by setting the aperture to 1ms, however I am not able to set this currently on my block diagram, this is the first problem I want to sort.

 

Any help would be welcome. 

0 Kudos
Message 1 of 13
(9,863 Views)

I downloaded the driver and it looks like the aperture time is limited to three values: .01, .1, and 1. The documentation says that the 34465A IS capable of .001. You can open the "Configure Frequency Period.vi" and right click the Aperture Time ring and add a new entry for .001 with a value of .001. Hope that helps.

 

Add Ring Item.png

Message 2 of 13
(9,817 Views)

Thank you Steven.

 

I managed to set the aperture time my choosing 0.001 as a constant for the aperture value.

 

I am now attempting to take the measurements from the 34465A and send them to a spread sheet so I am expecting 1000 measurements a second.

 

However they are coming out as minus numbers in my spreadsheet.

 

I am measuring the current draw of a pulsing diode and on the bench it works, just in case anyone though I had my probes in the opposite way round. 

 

Any ideas why this is?

 

I have attached my code below. 

0 Kudos
Message 3 of 13
(9,803 Views)

Hmm.. It doesn't look like you've setup the DMM for fast readings.  Look at turning off autozero, autorange and the like.  The manual should have a good section on speeding things up and the compromises that need to be made.  Negative numbers are probably a result of trying to read data before the measurement has actually been made.  Your aperture is too small for the reading to settle given the way the DMM is setup and you get garbage.

 

Now, the other issue here is I doubt that there's anyway to get 1000 individual readings per second from the DMM to disk with a simple while loop and ExpressVI.  Two reasons for this:

 

1) The instrument has to talk to the PC over a bus on every reading.  PC requests data, instrument sends data.  That takes 10-20ms for fast bus/instruments...maybe as little as 5ms for single reading, but flood the bus with 1000s of requests and it all slows down.

 

2) Writing to disk isn't fast, even with SSD 1000 writes/s adds up to some non negligible delay.

 

In this case the instrument read/send to PC is the worst offender.  At best you can get 50-200 pts/s.  Yes, the DMM can read much faster!  But its doesn't claim to be able to dump data to a PC faster.  What it does is store readings to its internal memory really fast.  Then you can either read back chunks of that memory, say 1000 readins at once. Or you can have it do math in hardware to give you averages or max/min/mean and read those back.

 

What you will need to do is look at how to setup the DMM to save readings to its internal memory, take the average and just return that.  Usually with Keysight DMMs there's a set of SCPI MATH commands.So hunker down with the manual!

 

Once you have learned to setup the instrument for fast readings, saving the data to internal memory and taking the average of those 1000s reading, just read back the average.  You could then build up an array of the averages in your while loop and once that's completed write it all to disk. 

 

I've done similar with a lot of other DMMs, but not the 34465, so I can't give exact details.  But keep posting code and asking questions when you get stuck.  Good luck!

 

Message 4 of 13
(9,788 Views)

Just had a quick peek and the example that ships with the driver, "\Examples\Agilent 3446X Series Acquire Triggered Multiple.vi" might work for you. 

 

But the driver does have VIs to read DMM memory and dump data directly to disk.  Look at the VI tree for those VIs.

 

34465a_tree.png

 

 

Message 5 of 13
(9,780 Views)

Thank you!!

 

I'll move onto seeing If i can use the triggered multiple example and read up on the SCIP commands.

 

I think you are right about the speed issue, I was using the multiple point VI and with the aperture time set to 1ms and the auto zero turned off I am only able to read around 3500 measurements at a time. 

 

It takes about 4 minutes to do the 60,000 measurements haha. 

 

 

0 Kudos
Message 6 of 13
(9,762 Views)

So I have read up on the SCIP commands and have created some new code.

 

I am not sure whether to continue posting in this thread or to start a new one, but its here for now anyway. 

 

I have set INIT in order to begin logging the measurements to memory and I am reading the average of all the measurements every minute using the time delay and case structure. 

 

My readings from the get statistics VI are all going to 0 so i'm not sure what is going on.Inside it is writing the SCIP command CALC:AVER:ALL?

 

Can anyone see why?

 

 

0 Kudos
Message 7 of 13
(9,737 Views)

You put the "Enable statistic" VI in the code, but didn't set it to true.  By default its False, so you must wire a TRUE, then I think you'll be good.

34465a_enabled.png

 

 

 

 

 

Message 8 of 13
(9,715 Views)

Thank you cstorey!

 

I actually managed to figure that out just before you posted by looking through the NI I/O trace.

 

There are now brand new issues haha:

 

1: The average from the read measurement statistics VI only manages to work once, and does not update.

 

2: No matter what the average is, as read by the indicator, it still appears as "0" when I send it to the spreadsheet. 

 

Download All
0 Kudos
Message 9 of 13
(9,693 Views)

You only ever trigger one set of measurements in your code.  You would need to send a trigger with every iteration of the while loop.  Try something like this..

agilent_34465a_read+average.png

 

 

 

Message 10 of 13
(9,679 Views)