E4990A Help
298
byteData = Ana.ReadIEEEBlock(BinaryType_UI1)
hFile = FreeFile()
Open PC_File For Binary Access Write Shared As hFile
isOpen = True
Put #hFile, , byteData
If isOpen Then Close #hFile
Ana.IO.Close
End Sub
Private Sub fromPC_toAna_Click()
'*** This sequence is a sample code in which the file is transferred
'*** from the external controller to the Ana.
Dim hFile As Long
Dim isOpen As Boolean
Dim ioMgr As VisaComLib.ResourceManager
Set ioMgr = New VisaComLib.ResourceManager
Dim Ana As VisaComLib.FormattedIO488
Set Ana = New VisaComLib.FormattedIO488
Set Ana.IO = ioMgr.Open("GPIB0::17::INSTR")
Ana.IO.Timeout = 10000
Dim byteData() As Byte
Dim strBuf As String
Dim fileSize As Long
Dim Ana_File As String
Dim PC_File As String
Ana_File = """" & Trim(TextBox2.Text) & """"
PC_File = Trim(TextBox1.Text)
fileSize = FileLen(PC_File)
ReDim byteData(fileSize - 1)
hFile = FreeFile()
Open PC_File For Binary Access Read Shared As hFile