AnsweredAssumed Answered

4935A how to get it to return to local mode via c programming?

Question asked by rok on Apr 26, 2013


I'm trying to get the 4935A network analyzer to return from remote to local mode. I tried send 'KEY 48' which supposedly presses the 'Local' mode key but it doesn't work. I also tried the method described in: Local Button which I adapted to c#.

Here's my C# code:

public void GoLocal()                               
            Ivi.Visa.Interop.ResourceManager drm = new ResourceManager();
            Ivi.Visa.Interop.FormattedIO488 vi = new FormattedIO488();
            Ivi.Visa.Interop.IGpib gpib;

            vi.IO = (IMessage)drm.Open(ConnectionAddress, AccessMode.NO_LOCK, 7000, "4935A");
            gpib = (IGpib)vi.IO;


This code works for the E444A spectrum analyzer as well as the 34401A multimeters. But I get an exception error of 'HRESULT=80040011' and it fails on this line:

vi.IO = (IMessage)drm.Open(ConnectionAddress, AccessMode.NO_LOCK, 7000, "4935A");

From the microsoft site at: 
this error means 'Not able to convert object'. 

Can someone let me know how I can get the 4935A to go back to local mode using a C# program?