10-03-2023 09:45 AM
You will have to excuse me but I really new at this,
With this example uses GPIB
I want to do the same thing with a USB interface instrument:
How would the below program change?
Public RM As VisaComLib.ResourceManager 'Resource manager
Public PS As VisaComLib.FormattedIO488 'IO Object
Private Sub CommandButton1_Click()
Set RM = New VisaComLib.ResourceManager 'Resource Manager Object created
Set PS = New VisaComLib.FormattedIO488 'FormattedIO488 Object created
Set PS.IO = RM.Open("GPIB0::12::INSTR") 'IO Object created (enter VISA address of ENA)
PS.IO.Timeout = 10000 'Timeout time in msec
PS.WriteString ("*IDN?")
Sheet1.Cells(6, 2) = PS.ReadString
PS.IO.Close
Set PS = Nothing
Set RM = Nothing
End Sub
10-03-2023 09:52 AM
Highly recommended "really new" goes and learns LabVIEW. The "below program" isn't necessarily LabVIEW. Recommend asking in CVI. But also recommend "really new" go learn CVI.
It's important to know how to ask the question and understand the answer.
10-03-2023 11:01 AM - edited 10-03-2023 11:02 AM
In theory if you are using VISA then the only change needed is "GPIB0::12::INSTR" would be replaced with the USB ID, something like "USB0::0x0B21::0x0025::39314B433337343138::INSTR".
That's the magic of VISA.
10-03-2023 02:29 PM
thank you very much - about what I thought but it was nice to have a confirmed...