AnsweredAssumed Answered

N7788B COM/ActiveX interface : connect to remote device

Question asked by vhenry on Dec 20, 2011
Latest reply on Dec 21, 2011 by vhenry

I'm experimenting issues when trying to communicate with a remote device (a TLS) connected to the N7788B with the COM/ActiveX interface.

The TLS is GPIB-connected to the N7788B which is itself GPIB-connected to my computer (can't use USB).

I'm using VBA. First, I create my Object :
Dim N7788B As Object
Set N7788B = CreateObject("AgN778xLib.AgN778x")

Following the N778XB User’s Guide (fourth edition), I initialize the N7788B and check I can communicate:
N7788B.Initialize("GPIB::30::INSTR", False, False)
Dim Str As String
Str = N7788B.System.DirectIO.SCPIQuery("*IDN?")

At this point, I get the expected behaviour.

Then, I try to communicate with the TLS :
Dim ErrorCode As Integer
ErrorCode = N7788B.Visa.Initialize("GPIB::13::INSTR", "")

This command passes, but then:
N7788B.Visa.Write ("*IDN?")

fails, and I get the error : '-4, SCPI Command Failed"

I also tried to initialize the TLS with
ErrorCode = N7788B.Visa.Initialize("GPIB::13::INSTR", "GPIB::30::INSTR")

but, it directly fails at this point : '1, Error Code 0x1 Frame Sync Error 1".

Actually, the syntax of the Visa functions, except Visa.Initialize, is not in the manual. So I can't determine if my problem comes from the fact I can't reach correctly my TLS, or if the syntax of Visa.Write is bad.