EasyManuals Logo

YOKOGAWA AQ6370C User Manual

YOKOGAWA AQ6370C
240 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #24 background imageLoading...
Page #24 background image
2-11
IM AQ6370C-17EN
GP-IB Interface (GP-IB1 Port)
1
2
3
4
5
6
7
8
App
Index
Sample Program 2
Save an image of the instrument's screen to a BMP file, then use a file transfer command
to load the file onto the PC. Save the image on the PC under the file name, "C:\test.
bmp".
Const BOARD_ID = 0 'GP-IB Interface card Address
Const osa = 1 'OSA GP-IB Address
Private Sub Command1_Click()
Dim intAddrList(31) As Integer
Dim intData As Integer
Dim lngDataSize As Long
Dim strData As String
Dim intI As Integer
Dim byteData() As Byte
Dim byteSaveData() As Byte
Dim lngL As Long
'----- GP-IB Interface setting
' send IFC
Call SendIFC(BOARD_ID)
' assert th REN GPIB line
intAddrList(0) = NOADDR
Call EnableRemote(BOARD_ID, intAddrList())
' GPIB time out setting
Call ibtmo(BOARD_ID, T30s) 'Time out = 30sec
'----- send command to OSA
Call SendGPIB(osa, "CFORM1") ' Command mode set(AQ637X mode)
Call SendGPIB(osa, ":mmem:stor:grap color,bmp,""test"",int")
' Save bmp file to internal memory
Call SendGPIB(osa, ":mmem:data? ""test.bmp"",int")
' get file data from OSA
lngDataSize = RecieveBinaryGPIB(osa, byteData())
' Recieve binary block data
If byteData(0) <> Asc("#") Then ' check first data
MsgBox "Data format error"
Exit Sub
End If
'----- calculate data size
intData = byteData(1) - Asc("0")
strData = ""
For intI = 1 To intData
strData = strData + Chr(byteData(intI + 1))
Next intI
lngDataSize = Val(strData) ' data size
'----- make save data
ReDim byteSaveData(lngDataSize)
For lngL = 0 To lngDataSize - 1
byteSaveData(lngL) = byteData(lngL + intData + 2)
Next lngL
'----- save data to file
Open "c:\test.bmp" For Binary As #1
Put #1, , byteSaveData
Close #1
'----- Disconnect
Call EnableLocal(BOARD_ID, intAddrList())
MsgBox "Complete"
End Sub
2.6 Sample Program

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the YOKOGAWA AQ6370C and is the answer not in the manual?

YOKOGAWA AQ6370C Specifications

General IconGeneral
BrandYOKOGAWA
ModelAQ6370C
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals