![ADCMT 7451A Скачать руководство пользователя страница 155](http://html1.mh-extra.com/html/adcmt/7451a/7451a_operation-manual_2848273155.webp)
7451A/7461A/7461P Digital Multimeter Operation Manual
6.8 Sample Programs (Command used in ADC CORPORATION)
6-55
6.8
Sample Programs (Command used in ADC CORPORATION)
This section describes examples of a program in which a computer controls this instrument through GPIB.
The USB driver includes examples of a program in which this instrument is controlled through USB.
For more information on the USB driver, refer to 3.3.2, “Caution when Connecting Peripherals”.
Computer:
FMV-5350ML3 (OS:Windows98) made by Fujitsu Limited
GPIB hardware:
PCI-GPIB made by NATIONAL INSTRUMENTS
Module:
Niglobal.bas, Vbib-32.bas (Included software in PCI-GPIB)
Compatible language: Microsoft Excel Visual Basic for Application
NOTE:
These samples are programmed assuming that the 7461A is used. If the 7451A is used, change the settings
such as a range configuration which depends on the multimeter.
Example 1 Measures a voltage in the DCV 10 V range and reads the measurement data from the 7461A.
The GPIB address of the 7461A is set to 1.
Dim DMM_ADR As Integer
' Declares the variable of the 7461A
' GPIB address.
Dim dmm As Integer
' Declares the variable of the device descriptor.
Dim dt As String * 100
' Declares the variable of the buffer used for receiving the GPIB data.
DMM_ADR = 1
' The GPIB number of the 7461A
Call ibdev(0, DMM_ADR, 0, T10s, 1, 0, dmm)
' Initializes the GPIB I/F.
Call ibconfig(dmm, IbcUnAddr, 1)
' Sets the transmitting and receiving addresses individually.
Call ibwrt(dmm, "*RST" & Chr(10))
' Initializes the 7461A.
Call ibwrt(dmm, "H1" & Chr(10))
' Sets the header of the output data to ON.
Call ibwrt(dmm, "F1" & Chr(10))
' Sets the measurement function to DCV.
Call ibwrt(dmm, "R5" & Chr(10))
' Sets the measurement range to 10 V.
Call ibwrt(dmm, "PR5" & Chr(10))
' Sets the sampling rate to SLOW2.
Call ibrd(dmm, dt)
' Reads the measurement value data.
Cells(1, 1) = "'" & Left(dt, 18)
' Substitutes the measurement value for a cell.
Call ibonl(dmm, 0)
' Terminates.