LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering and reading on two HP/Agilent 34401A DMMs at same time

Hi folks,
I'm VERY new to LabVIEW and need some help with a measurement.  I'm using LV 8.2 with all equipment on GPIB.  I have two 34401A multimeters, triggered externally using an HP 33120A function generator.   I've downloaded the example vi's and drivers and everything works fine.  My problem is with the speed of the triggering and the synchronization between the two multimeters on the same trigger.  I've read the manual and for this multimeter, it claims it can be triggered and read over GPIB at 1kHz (display off, auto range off, delay= 0, 4.5 digits).  I'm finding it is nowhere near this speed.  The fastest I have successfully triggered and recorded the data was at 100 Hz, anything higher and it no longer stays in sync with the trigger (i.e. for 200 measurements at 100 Hz, I'm getting all 200 measurements, but over 3-5 seconds).  The trigger speed is the first problem.  The second problem is getting the two meters to take a reading at the same time.  One meter always lags the other (or vice versa) by 1 to 3 readings.  My goal is to continuously (for about 60 seconds) read both multimeters as fast as possible and at the same time (250-500 Hz would be fantastic) and write it to a file.  Can anyone give me some advice on this?  Is a software trigger the way to go?  Is there some limitation with GPIB that it cannot read/write to two devices this fast? 
Thanks!
 
P.S. I've been experimenting mostly with the example code provided by NI and a .vi posted in this forum thread (http://sine.ni.com/niforum/niforumforumDU=http://forums.ni.com/ni/board/messageboard.id=170&message....) hp34401a_-_testing.vi from Kunal.  If anyone could share some other example vi's it would be very helpful!
0 Kudos
Message 1 of 18
(6,960 Views)

Hello. 

Thank you for posting to the NI Discussion Forums. 

In order to find out more about your application, I have a couple questions for you.  First, what driver are you using with the 34401A multimeter.  I ask this because there are numerous different drivers that can be used with this hardware.  For example, at the following link, there are 4 different drivers: some utilizing IVI, some plug and play. 

Hewlett-Packard / Agilent Technologies 34401A
http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=978

Letting me know the specific driver being used will allow us to look at the same VI's while troubleshooting this issue.  Secondly, how exactly do you have all of your hardware hooked up to your GPIB?  What GPIB device do you have? 

In terms of increasing speed, I think the best thing to do is to examine your existing code to see if it can be optimized in any way.  Also, if you are using high level VI's, using low level VI's could improve the performance as well.  Finally, using an IVI driver instead of a plug and play driver seems to be a bit faster. 

Let us know a little more about your setup as well as your existing code and we will be happy to help further!

Brian F
Applications Engineer
National Instruments

0 Kudos
Message 2 of 18
(6,912 Views)
Hi Plasma,
      In addition to following all Brian's advice, you might want to investigate storing results internally and not try to read any results until triggering has stopped.  According to the 34401 user-manual, there's a 512 sample "Reading Memory" (see page 46 of "User's Guide").  Had the user-manual handy having written a driver recently; saw your post, interesting question - please share your solution! Smiley Wink
 
Cheers.

Message Edited by tbd on 08-06-2007 06:14 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 18
(6,906 Views)
Hi Brian and tbd! Thanks for the replies.
Brian- I'm using the plug-and-play drivers mainly (I've downloaded them all by now and even some from Agilent's site). It's the first file in the list for that link you provided.
I have a NI PCI-GPIB card and the instruments are connected to it using standard IEEE 488.2 cables (all 1m in length). I have the cables connected at the card (stacked connectors) and then going out to each device individually. -Is that what you were asking?
High level vs. low level vi's (ok, I'm really new at LabVIEW)... Do you mean high level as being a vi that calls a lot of other sub-vi's? or are you talking about something different?

tbd- storing and reading internally; yes I was looking at that, but it looks like it is only 512 measurements FIFO. I'd need 250 to 500/sec for about 60 sec. I'm not so sure this will be an improvement since I'd still need to measure and then transfer about the same number of readings in about the same time. Will give it a try this afternoon though if I can figure it out.

Thanks!
0 Kudos
Message 4 of 18
(6,883 Views)

Hi plasma420,

I should have read your post more carefully - was thinking it was a 1 sec acquisition, not 1 minute! Smiley Tongue

Getting your LabVIEW app to reliably respond to a measurement (detect/read) every 2 to 4 ms is going to be tough - especially if in a multi-tasking OS environment.  On a 2GHz box running a normal Windows XP or 2K install,  I suspect you could see an occasional "hiccup" even at 100Hz.  A bit of searching the forum turned up this old-but-still-valuable (even entertaining) post related to improving determinism of DAQ applications on a PC.

Observation: The listed max measurement-rate of the 34401 (1000Hz) may assume the GPIB-bus is dedicated to one instrument - the requirement to read from two instruments sequentially, may necessarily increase time spent servicing each trigger - decreasing maximum theoretical throughput.

The first rule for "high-speed" multi-sample DAQ - especially under Windows - is to make it a hardware task instead of a software loop;  the 34401 doesn't seem well suited here.  I hate to suggest this, but... have you considered purchasing one of NIs multi-channel DAQ devices?  With a $360 PCI 6010 + cable and break-out box, you could have one of the LabVIEW DAQ examples running in ~ 30 min.  The 6010 was the cheapest 16-bit board I could find, ask your sales-rep for other alternatives if you go this route...Smiley Wink

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 5 of 18
(6,853 Views)
Hi tbd,
I've actually had some luck playing with the settings, I'm now able to get readings form a *single* 34401A at 750 Hz. Anything higher is giving me problems, but that's ok since I only need about 500/sec.

I still can't figure out how to initialize two of the same GPIB devices at about the same time- or get them both triggered at the same time. I tried a couple different structures but everything gives me errors since I don't know exactly what I'm doing. I also tried duplicating the vi and running two copies but that's too slow and causes several problems. Any ideas on how to get two instruments set up and running at the same time? I included the example vi I've been using for this.
-Thanks!
0 Kudos
Message 6 of 18
(6,839 Views)
Hi plasma420,
Attached is your example modified to configure/read two instruments.  It assumes no triggers are occuring during configuration because there will be a small amount of time between the two calls to "Initiate Measurement" and if a trigger occurs there, the two devices will be out of step. Smiley Surprised  If triggers are occurring during config, it will be more work, but can be accommodated.
 
Also, please confirm you're using "External" Trigger-source in this example. Smiley Wink
 
Cheers.

Message Edited by tbd on 08-08-2007 06:47 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 7 of 18
(6,824 Views)
Thanks, this is exactly what I was wondering! (Also, I posted the wrong vi by mistake, but this will do-- the only differences were extra sub vi's to turn off the display and configure more settings on the meter and some convoluted stuff to output the data to a file). I had resorted to duplicating the overall vi structure (x2) in the main vi, but was thinking this was a bit "clunky" and not so optimized- but it was the only way i could get it to work. Looks like you came up with the same thing-- gives me coinfidence in doing stuff in LabVIEW... Well, the overall speed without any hiccups is around 300 Hz which is plenty fast for my app. I also resorted to borrowing another GPIB card so each 34401A is on it's own card on the PC. -That made it a bit faster. If you're interested, I can post my most recent vi but it's pretty similar to the one you posted. Let me know.
Thank you!!!
Message 8 of 18
(6,809 Views)

Ho!  I wouldn't have believed 300Hz was possible (me thinks this is not a typical Windows OS) - are you sure you're only reading once per [external] trigger?  (Turning sig-gen off, should stop the chart.)

That was clever to throw-in a second GPIB card!  ...but, I don't know whether the low-level VISA uses any "blocking" functions that might force all GPIB IO to be sequential at some point.

More than the current code I'd be interested in what OS you're using and how-many-Hz =  "a bit faster" Smiley Happy

Congrats and Cheers!

 

Message Edited by tbd on 08-09-2007 03:20 AM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 9 of 18
(6,800 Views)

hi,

i have read this post for couple of days now and have been trying to do something similar like taking readings from the 33401A DMM. I have the instrumentation drivers and I use the GPIB. all the specs about gpib are followed. All the instruments show up in the MAX xplorer.

My aim is to read the 10 output voltage values from the board i am testing. I would like to know the steps that I should go about in doing the same. However for me speed is not the issue. I would be grateful if someone of you can enumerate the steps for me to do this task. I am going through the tutorials and trying to do this the best i can.

thanks a lot.

Regards

Ravi

0 Kudos
Message 10 of 18
(6,784 Views)