public void TestSParam() { scpi s = new scpi(); s.connect(); Double[] mags; Double[] phas; s.GetData("S11", out mags, out phas); foreach (Double mag in mags) { Debug.Write(mag.ToString()); Debug.Write(", "); } Debug.WriteLine("\nMAG Total: {0} ", mags.Length); foreach (Double pha in phas) { Debug.Write(pha.ToString()); Debug.Write(", "); } Debug.WriteLine("\nPHA Total: {0} ", phas.Length); s.close(); }
public void TestGetPoints() { scpi s = new scpi(); s.connect(); s.GetPoints(); s.close(); }
public void TestWrite() { scpi s = new scpi(); s.connect(); s.write(":CALC1:PAR1:DEF S12"); s.close(); }
public void TestSetMLOG() { scpi s = new scpi(); s.connect(); s.SetLogMag(); s.close(); }
public void TestSetSmith() { scpi s = new scpi(); s.connect(); s.SetSmithChart(); s.close(); }
public void TestGetMode() { scpi s = new scpi(); s.connect(); string mode = s.GetMode(); Debug.Print("Mode: " + mode); s.close(); }
public void TestGetFrequencies() { scpi s = new scpi(); s.connect(); Double[] fs = s.GetFrequencies(); foreach (Double f in fs) { Debug.Write(f.ToString()); Debug.Write(", "); } Debug.WriteLine("\nTotal: {0} ", fs.Length); s.close(); }
public void TestReadWrite() { scpi s = new scpi(); s.connect(); s.write(":CALC1:PAR1:DEF S11"); //s.write(":SENS1:FREQ:DATA?"); //s.write(":SENS:SWE:POIN?"); s.write(":CALC1:DATA:FDAT?"); string response = s.read(); string[] vals = response.Split(','); Debug.WriteLine("Num params: {0}", vals.Length); s.close(); }
public Form1() { InitializeComponent(); s = new scpi(); backgroundWorker1.RunWorkerAsync(); }