From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hp 3562a + visual basic

Hello,

I develop a software application that communcate with the hp 3562a in
visual basic. (gpib/national instruments)

I can send commands to the analyser, but I don't know how to get
information out of the analyser. (results)

Here you see some code of my:

Public Const BDINDEX = 0 ' Board Index
Public Const PRIMARY_ADDR_OF_DMM = 7 ' Primary address of
strDevice
Public Const NO_SECONDARY_ADDR = 0 ' Secondary address of
strDevice
Public Const TIMEOUT = T10s ' Timeout value = 10 seconds
Public Const EOTMODE = 1 ' Enable the END message
Public Const EOSMODE = 0 ' Disable the EOS mode

strCommando = "RST"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command RST")
End If

' Swept sine
strCommando = "SSIN"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command SSIN")
End If

' Linear sweep
strCommando = "LNSW"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command LNSW")
End If

' Active trace
strCommando = "A"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command A")
End If

' Freq band
strCommando = "FRS" & txtStartFreq & "," & txtStopFreq & "Hz"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command FRS")
End If

' Freq resp
strCommando = "FRQR"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command FRQR")
End If

' Mag lin
strCommando = "MAG"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command MAG")
End If

' Local
strCommando = "LCL"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command LCL")
End If


'
' ?????????????
'
strCommando = "DDAN"
ilwrt strDev, strCommando, Len(strCommando)
If (ibsta And EERR) Then
Call GPIBCleanup("Error: command DDAN")
End If

How can I get the respons?
Does somebody have some examples?

Thanks for your help and advice,

Bill Brown

billbrown10@hotmail.com
0 Kudos
Message 1 of 2
(2,549 Views)
Hello-

There are plenty of examples in C:\Program Files\National Instruments\NI-488.2\Languages\Visual Basic when the GPIB driver is installed.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,549 Views)