AnsweredAssumed Answered

C# Programming M9375A with Microwave Switch(M9161D)

Question asked by Zadd on Jul 24, 2018



What I want to do is following,


1. Make 4 Traces with different channel.

2. Using microwave switch, each channel has different switch setting.

  * for the program, (Instrument Menu- Setup - Internal Hardware - PXI Devices - M9161D Switch Setup..)

Ex) channel 1 sets switch "b1ch1", and channel 2 sets switch "b1ch2", and so on.


I made an own program with C# with initializing driver of VNA and Switch.


I want to know how to connect trace and switch set.


Please help me to figure it out


the code I wrote looks like this,


static void Main(string[] args)
// Instantiate the driver class directly
IAgNA driver = new AgNAClass();
AgMWSwitch switch1 = new AgMWSwitch();

// Initialize the driver
driver.Initialize("PXI23::0::0::INSTR", true, true, "");
switch1.Initialize("PXI0::15::INSTR", false, false, "");

driver.Display.Enabled = true;

// Use instrument specific interfaces...
driver.Channels.AddMeasurement(string.Empty, "S11", 1, 1);
driver.Channels.AddMeasurement(string.Empty, "S11", 2, 1);
driver.Channels.AddMeasurement(string.Empty, "S11", 3, 1);
driver.Channels.AddMeasurement(string.Empty, "S11", 4, 1);

// Close the session



Thank you