How to get data faster from Agilent 34410A voltmeter using Excel VBA?

greif

New Member
Joined
Jun 6, 2016
Messages
1
I am using Excel VBA to capture voltage data from an Agilent 34410A voltmeter. The meter connects by USB.
Using Win 7 and Excel 2010.
I need to collect 40,000 samples at around 600/sec.
Excel seems to limit me to about 300/sec.


I have been using the following in a For/next loop to grab the data:
Code:
instrany.WriteString ("Read?")       'This sends the read?  command to the voltmeter
idn = instrany.ReadString()           ' this reads the resulting number from the voltmeter.
 
ActiveSheet.Cells(i, 1) = idn


Saving to an array instead of cells does not seem to be any faster.
The speed capability of the data from the voltmeter at the resolution I am using is much faster.
If I load the computer with a lot of open windows, the data rate does not slow from the 300/sec until the CPU is more than ~50% busy.

Question:
Is there a better way or command to gather this data so it is faster?
Thanks!


------------------------------------------------------------------------------------------------------
Other setup parameters are:



Code:
Dim ioMgr As VisaComLib.ResourceManager
Dim instrany As VisaComLib.FormattedIO488
Dim instrquery As String
Dim instrAddress As String
Dim idn As String
Dim i As Integer
 
 
Application.ScreenUpdating = False
 
 
 
 
Set ioMgr = New VisaComLib.ResourceManager
Set instrany = New VisaComLib.FormattedIO488
Set instrany.IO = ioMgr.Open("USB0::0x0957::0x0607::MY47008722::0::INSTR")
 
 
 
instrany.WriteString ("*cls")
 
'These should make it faster to gather voltage data:
instrany.WriteString ("display off")
instrany.WriteString ("volt:zero:auto off")
instrany.WriteString ("sense:volt:dc:rang:auto OFF")
instrany.WriteString ("sense:volt:dc:rang 10")
 
 
 
instrany.WriteString ("sense:volt:DC:aper:enabled on")
instrany.WriteString ("sense:volt:DC:aper 2E-04")
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,216,084
Messages
6,128,722
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top