AnsweredAssumed Answered

Need commands to communicate with a DMM from Excel VBA?

Question asked by DhinesNDAS on Jan 23, 2017
Latest reply on Feb 8, 2017 by tomc



I am trying to control my Agilent 34401A (I know it is obsolete, but using it for getting familar with remote access/control methodologies), through a USB-GPIB adapter (82357A). 


I have made the connections, installed latest Agilent IO suite 17.3 on my Windows 10 laptop. Successfully made communication with the DMM from my laptop using IO connection Expert and got back response as well.


I am working on controlling the DMM from Excel VBA scripts. Based on google search i have little success. refer my below mentioned code that measures DC voltage and sends back the same.


Start of Code


Dim rm As VisaComLib.ResourceManager
Dim instruction As VisaComLib.FormattedIO488
Dim dmm_address, measured_voltage As String

Private Sub CommandButton1_Click()

Set rm = New VisaComLib.ResourceManager
Set instruction = New VisaComLib.FormattedIO488

dmm_address = Range("G5").Value
Set instruction.IO = rm.Open(dmm_address)

instruction.WriteString ("*RST")
instruction.WriteString ("*CLS")

instruction.WriteString ("MEAS:VOLT:DC? 10,0.00001")
measured_voltage = instruction.ReadString
MsgBox measured_voltage

End Sub


End of Code


Now, i have good idea about the SCPI commands that are being sent within "instruction.writestring("*CLS"); and i know, some are universal and some are instrument specific; and you can get these commands from instruments, user guides;

1. What i couldn't understand or get is, what are these "WriteString" or "Readstring"?

2. I assume that these are IO librarysuite related; Is this correct? And nowhere in the IO library suite documents, i couldn't find about these.  

3. Are these just the two universal functions? or are there any other functions similar to these?

4. If there are anyother function similar to these, from where i can get details of those functions?


Kindly assist me in understanding these queries. It would be very much helpful.



Dhinesh kumar Nachimuthu.