RIGOL 3 Programming Demos
3-6 MSO2000A/DS2000A Programming Guide
cmdStr = "*IDN?"
viErr = visa.viWrite(viDevice, cmdStr, Len(cmdStr), ret)
viErr = visa.viRead(viDevice, idnStr, 128, ret)
Sheet1.Cells(2, 2) = idnStr
‘Turn off the device’
visa.viClose (viDevice)
visa.viClose (viDefRm)
End Sub
6. Add button control: click Insert in the Developer menu, select the desired button in Form
Controls and put it into the cell of the Excel. At this point, the Assign Macro interface is displayed,
select “Sheet1.QueryIdn” and click “OK”.
7. By default, the button mane is “Button 1”. Right-click the button and select Edit Text in the pop-up
menu to change the button name to “*IDN?”. Click the “*IDN?” button to send request and read data.