6243/44 DC Voltage Current Source/Monitor Operation Manual
5.2.11 Program Examples
5-32
5.2.11
Program Examples
Explained here are basic program examples operating the 6243/44 from a computer through the GPIB bus.
Computer:
Fujitsu FMV-6266T6, Windows 95
GPIB hardware:
AT-GPIB/TNT(PnP) manufactured by NATIONAL INSTRUMENTS
Used module:
Niglobal.bas, Vbib-32.bas (supplied with AT-GPIB/TNT(PnP)
Applied language:
Visual Basic 5
The following examples are Visual Basic program examples performing the same operations as those
described in Section 2.2, “Basic Operations.”
• Program example 1:
Example of DC measurement introduced in Section 2.2.3
• Program example 2:
Example of pulse measurement introduced in Section 2.2.4
• Program example 3:
Example of sweep measurement introduced in Section 2.2.5
• Program example 4:
Example of diode measurement introduced in Section 2.3.1
• Program example 5:
Example of recalling measurement data from the measurement buffer memory
as fast as possible
5.2.11.1
Program Example 1: DC Measurement
Option Explicit
’ Explicit declaration for all variables
Private Sub Start_Click()
’ Event procedure for the command button (Start)
Dim board As Integer
’ GPIB board address
Dim pad As Integer
’ 6243/44 address
Dim vig As Integer
’ 6243/44 device descriptor
board = 0
’ GPIB board address 0
pad = 1
’ 6243/44 address 1
Call ibdev(board, pad, 0, T10s, 1, 1, vig)
’ Opening and initializing device (6243/44) (timeout 10 s)
Call ibconfig(vig, IbcUnAddr, 1)
’ Address setting performed for each transmission or reception
Call ibeos(vig, &H40A)
’ Setting terminator to LF for sending command
Call SUBsend(vig, “C,*RST”)
’ DCL and parameter initialization
Call SUBsend(vig, “M1”)
’ Trigger mode hold
Call SUBsend(vig, “D1V,D3MA”)
’ DC source value 1 V, limiter value 3 mA
Call SUBsend(vig, “E”)
’ E: Output ON
Call SUBmeas(vig)
’ Measurement trigger & data recall
Call SUBsend(vig, “D2V”)
’ DC source value 2 V
Call SUBmeas(vig)
’ Measurement trigger & data recall