Programming
289
Dim Fail_Point2 As Integer
Dim Fail_Data2 As Variant
'*** The memory area of the resource manager and the instrument I/O are acquired.
Set ioMgr = New VisaComLib.ResourceManager
Set Ana = New VisaComLib.FormattedIO488
'*** Open the instrument.
Set Ana.IO = ioMgr.Open("GPIB0::17::INSTR")
Ana.IO.timeout = 10000
Ana.WriteString ":SYST:PRES", True
Ana.WriteString ":SYST:BEEP:WARN:STAT OFF", True
'* Clear Fail Point Data on the sheet.
Range("E27:F100").Clear
Range("C26:C28").ClearContents
'* Set variable of measurement condition.
Star = CDbl(Cells(3, 3).Value)
Stp = CDbl(Cells(4, 3).Value)
SwpFmt = Cells(5, 3).Value
Param(0) = Trim(Cells(6, 3).Value)
Fmt(0) = Trim(Cells(7, 3).Value)
Param(1) = Trim(Cells(8, 3).Value)
Fmt(1) = Trim(Cells(9, 3).Value)
'
'* Set variable of limit tables.
NumofSeg(0) = 4
NumofSeg(1) = 3
'
For i = 0 To NumofSeg(0) - 1
With LimTbl1
If Trim(Cells(13 + i, 3).Value) = "MAX" Then
.Typ(i) = 1
Else
.Typ(i) = 2