E5071C
.WriteString ":CALC2:DATA:FDATA?"
InsersionLoss() = .ReadList(ASCIIType_R8, ",")
' Get limit line test result
.WriteString ":CALC2:LIM:FAIL?"
PassFail = .ReadNumber
'
k = 0
For i = 0 To Nop - 1
Cells(i + 7, 7) = FreqData(i)
Cells(i + 7, 8) = InsersionLoss(k)
k = k + 2
Next i
Cells(4, 8) = PassFail
' *OPC? for checking the process finish
.WriteString "*OPC?"
NumDmy = .ReadNumber
End With
Exit Sub
errorhandler:
MsgBox Err.Description, vbExclamation, "Error Occurred", Err.HelpFile, Err.HelpContext
End Sub
Close Instrument
Sub CloseInstrument()
ENA.IO.Close
ENATDR.IO.Close
MsgBox "E5071C and E5071C-TDR are closed.", vbOKOnly
End Sub
1534