float IIPowerSupply.MeasV(string strSelection, EPSupplyChannel channel, EPSupplyVRange vRange) { float vmeas = -999; vmeas = SmuResources[strSelection].MeasureVoltage(channel, vRange); return(vmeas); }
float IIPowerSupply.MeasV(string strSelection, EPSupplyChannel channel, EPSupplyVRange vRange) { float val = -999; Readvoltagevolt((int)channel, out val); return(val); }
public void OutputEnable(bool state, EPSupplyChannel channel) { //if (state) // smu.ConfigureOutputSwitch(((int)Channel).ToString(), 1); //else // smu.ConfigureOutputSwitch(((int)Channel).ToString(), 0); }
float IIPowerSupply.MeasI(string strSelection, EPSupplyChannel channel, EPSupplyIRange range) { float imeas = -999; imeas = SmuResources[strSelection].MeasureCurrent(channel, range); return(imeas); }
float IIPowerSupply.MeasI(string strSelection, EPSupplyChannel channel, EPSupplyIRange range) { double imeas = -999; SmuResources[strSelection].SetupCurrentMeasure(false, false); SmuResources[strSelection].MeasureCurrent(1, false, ref imeas); return(Convert.ToSingle(imeas)); }
public float MeasureVoltage(EPSupplyChannel channel, EPSupplyVRange vRange) { double[] volt = new double[4]; int ret = 0; ret += Smu.Measure(((int)channel).ToString(), PxiSmuConstants.MeasureVoltage, volt); return((float)volt[0]); }
public float MeasureCurrent(EPSupplyChannel channel, EPSupplyIRange range) { //we don't need to set range for measure double[] current = new double[4]; int ret = 0; ret += Smu.Measure(((int)channel).ToString(), PxiSmuConstants.MeasureCurrent, current); return((float)current[0]); }
void IIPowerSupply.DcOff(string strSelection, EPSupplyChannel channel) { try { _myVisaKeithley.IO.WriteString("smu" + channel.ToString() + ".source.output = smu" + channel.ToString() + ".OUTPUT_OFF"); } catch (Exception ex) { throw new Exception("KeithleySMU: DcOff -> " + ex.Message); } }
private void DisplayWatt(EPSupplyChannel val) { try { _myVisaKeithley.IO.WriteString("display.smu" + val.ToString() + ".measure.func = display.MEASURE_WATTS"); } catch (Exception ex) { throw new Exception("KeithleySMU: DisplayWatt -> " + ex.Message); } }
private void VLimit(EPSupplyChannel val, double dblVoltage) { try { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.limitv = " + dblVoltage.ToString()); } catch (Exception ex) { throw new Exception("KeithleySMU: VLimit -> " + ex.Message); } }
void IIPowerSupply.DcOff(string strSelection, EPSupplyChannel channel) { if ((int)channel < 8) { Offsmupin((int)channel); } else { AM371_OFFSMUPIN((int)channel); } }
void IIPowerSupply.DcOn(string strSelection, EPSupplyChannel channel) { if ((int)channel < 8) { Onsmupin((int)channel); } else { AM371_ONSMUPIN((int)channel, 1); } }
private void ChangeLevel(EPSupplyChannel val, double dblAmps) { try { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.leveli = " + dblAmps.ToString()); } catch (Exception ex) { throw new Exception("KeithleySMU: IChangeLevel -> " + ex.Message); } }
private double MeasOhms(EPSupplyChannel val) { try { _myVisaKeithley.IO.WriteString("print(smu" + val.ToString() + ".measure.r())"); return(Convert.ToDouble(_myVisaKeithley.ReadString())); } catch (Exception ex) { throw new Exception("KeithleySMU: MeasOhms -> " + ex.Message); } }
float IIPowerSupply.MeasV(string strSelection, EPSupplyChannel channel, EPSupplyVRange vRange) { try { _myVisaKeithley.IO.WriteString("print(smu" + channel.ToString() + ".measure.v())"); return((float)Convert.ToDouble(_myVisaKeithley.ReadString())); } catch (Exception ex) { throw new Exception("KeithleySMU: MeasV -> " + ex.Message); } }
float IIPowerSupply.MeasI(string strSelection, EPSupplyChannel channel, EPSupplyIRange range) { if ((int)channel < 8) { float nVal = -999; Readcurrentamp((int)channel, out nVal); return((float)nVal); } else { float nVal = -999; AM371_READCURRENT((int)channel, out nVal); return((float)nVal); } }
void IIPowerSupply.SetVolt(string strSelection, EPSupplyChannel channel, double volt, double iLimit, EPSupplyVRange vRange) { try { _myVisaKeithley.IO.WriteString("smu" + channel.ToString() + ".source.func = smu" + channel.ToString() + ".OUTPUT_DCVOLTS"); VSourceAutoRange((EPSupplyChannel)channel, true); _myVisaKeithley.IO.WriteString("smu" + channel.ToString() + ".source.limiti = " + iLimit.ToString()); _myVisaKeithley.IO.WriteString("smu" + channel.ToString() + ".source.levelv = " + volt.ToString()); } catch (Exception ex) { throw new Exception("KeithleySMU: iPowerSupply.SetVolt -> " + ex.Message); } }
void IIPowerSupply.SetNplc(string strSelection, EPSupplyChannel channel, float val) { try { if ((val < 0.001) | (val > 25)) { throw new Exception("KeithleySMU: SetNPLC -> must in range: 0.001 < NPLC < 25"); } else { _myVisaKeithley.IO.WriteString("smu" + channel.ToString() + ".measure.nplc = " + val.ToString()); } } catch (Exception ex) { throw new Exception("KeithleySMU: SetNPLC -> " + ex.Message); } }
private void SourceAutoRange(EPSupplyChannel val, bool onOff) { try { if (onOff) { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.autorangeI = smu" + val.ToString() + "AUTORANGE_ON"); } else { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.autorangeI = smu" + val.ToString() + "AUTORANGE_OFF"); } } catch (Exception ex) { throw new Exception("KeithleySMU: ISourceAutoRange -> " + ex.Message); } }
private void SetOutput(EPSupplyChannel val, bool @on) { try { if (@on) { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.output = smu" + val.ToString() + ".OUTPUT_ON"); } else { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.output = smu" + val.ToString() + ".OUTPUT_OFF"); } } catch (Exception ex) { throw new Exception("KeithleySMU: SetOutput -> " + ex.Message); } }
public void SetVoltage(EPSupplyChannel channel, double volt, double iLimit, EPSupplyVRange EvRange) { double vRange = 0; switch (EvRange) { case EPSupplyVRange._1V: vRange = 1; break; case EPSupplyVRange._10V: vRange = 10; break; case EPSupplyVRange.Auto: vRange = 10; break; } Smu.ConfigureOutputFunction(((int)channel).ToString(), PxiSmuConstants.DVCI); Smu.ConfigureCurrentLimit(((int)channel).ToString(), 0, iLimit); Smu.ConfigureVoltageLevelAndRange(((int)channel).ToString(), volt, vRange); }
void IIPowerSupply.SetVolt(string strSelection, EPSupplyChannel channel, double volt, double iLimit, EPSupplyVRange vRange) { if ((int)channel < 8) { if (volt > 0) { Drivevoltage((int)channel, (int)(volt * 1000), 1); } else { Drivevoltage((int)channel, (int)(volt * 1000), 0); } Clampcurrent((int)channel, (int)(iLimit * 1000000000)); } else { AM371_DRIVEVOLTAGE((int)channel, (float)volt); AM371_CLAMPCURRENT((int)channel, (float)iLimit); } }
private void VSourceSet(EPSupplyChannel val, double dblVoltage, double dblClampI, EPSupplyVRange range) { try { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.func = smu" + val.ToString() + ".OUTPUT_DCVOLTS"); if (range != EPSupplyVRange.Auto) { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.rangev = " + VRange_String(range).ToString()); } else { VSourceAutoRange(val, true); } _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.limiti = " + dblClampI.ToString()); _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.levelv = " + dblVoltage.ToString()); } catch (Exception ex) { throw new Exception("KeithleySMU: VSourceSet -> " + ex.Message); } }
private void SourceSet(EPSupplyChannel val, double dblAmps, double dblClampV, EPSupplyIRange range) { try { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.func = smu" + val.ToString() + ".OUTPUT_DCAMPS"); if (range != EPSupplyIRange.Auto) { _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.rangei = " + IRange_String(range).ToString()); } else { SourceAutoRange(val, true); } _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.limitv = " + dblClampV.ToString()); _myVisaKeithley.IO.WriteString("smu" + val.ToString() + ".source.leveli = " + dblAmps.ToString()); } catch (Exception ex) { throw new Exception("KeithleySMU: ISourceSet -> " + ex.Message); } }
void IIPowerSupply.SetVolt(string strSelection, EPSupplyChannel channel, double volt, double iLimit, EPSupplyVRange vRange) { SmuResources[strSelection].SetVoltage(channel, volt, iLimit, vRange); }
void IIPowerSupply.SetNplc(string strSelection, EPSupplyChannel channel, float val) { SmuResources[strSelection].SetNplc(channel, val); }
void IIPowerSupply.DcOff(string strSelection, EPSupplyChannel channel) { //SmuResources[strSelection].ForceVoltage(0.0, 1e-6); //force voltage to 0V and very small current (cannot be zero) SmuResources[strSelection].OutputEnable(false, channel); }
void IIPowerSupply.DcOn(string strSelection, EPSupplyChannel channel) { SmuResources[strSelection].OutputEnable(true, channel); }
public void SetNplc(EPSupplyChannel channel, float val) { Smu.ConfigureSamplingTime(((int)channel).ToString(), val, 1); }
private void PSupply_Selection(string val, IIPowerSupply[] psAvailable, out IIPowerSupply objPs, out EPSupplyChannel eChannel, out EPSupplyModel eModel) { string[] arSelected = new string[4]; arSelected = val.Split('_'); const string preFixP1 = "P1", preFixP2 = "P2", preFixP3 = "P3", preFixP4 = "P4", preFixP5 = "P5", preFixP6 = "P6", preFixP7 = "P7", preFixCh0 = "CH0", preFixCh1 = "CH1", preFixCh2 = "CH2", preFixCh3 = "CH3", preFixCh4 = "CH4", preFixCh5 = "CH5", preFixCh6 = "CH6", preFixCh7 = "CH7", preFixCh8 = "CH8", preFixChA = "CHA", preFixChB = "CHB", preFixAe1340 = "AE1340", preFixAePxi = "AEPXI", preFixNiPxi = "NIPXI", preFixKeith = "KEITH", preFixAgilentPxi = "AGPXI", preFixAm471E = "AM471E", preFixAm430E = "AM430E", preFixNi4143 = "NI4143", preFixNi4139 = "NI4139", preFixNi4154 = "NI4154", preFixAgilent = "AG"; switch (arSelected[0].ToUpper()) { case preFixP1: objPs = psAvailable[0]; break; case preFixP2: objPs = psAvailable[1]; break; case preFixP3: objPs = psAvailable[2]; break; case preFixP4: objPs = psAvailable[3]; break; case preFixP5: objPs = psAvailable[4]; break; case preFixP6: objPs = psAvailable[5]; break; case preFixP7: objPs = psAvailable[6]; break; default: objPs = null; MessageBox.Show("Power Supply in Local Setting file PowerSupply portion have invalid setting, P1-7 only"); break; } switch (arSelected[1].ToUpper()) { case preFixCh0: eChannel = EPSupplyChannel.Ch0; break; case preFixCh1: eChannel = EPSupplyChannel.Ch1; break; case preFixCh2: eChannel = EPSupplyChannel.Ch2; break; case preFixCh3: eChannel = EPSupplyChannel.Ch3; break; case preFixCh4: eChannel = EPSupplyChannel.Ch4; break; case preFixCh5: eChannel = EPSupplyChannel.Ch5; break; case preFixCh6: eChannel = EPSupplyChannel.Ch6; break; case preFixCh7: eChannel = EPSupplyChannel.Ch7; break; case preFixCh8: eChannel = EPSupplyChannel.Ch8; break; case preFixChA: eChannel = EPSupplyChannel.A; break; case preFixChB: eChannel = EPSupplyChannel.B; break; default: eChannel = new EPSupplyChannel(); MessageBox.Show("Power Supply channel in Local Setting file PowerSupply portion have invalid setting."); break; } switch (arSelected[2].ToUpper()) { case preFixKeith: eModel = EPSupplyModel.Keithley; break; case preFixNiPxi: eModel = EPSupplyModel.NiPxi; break; case preFixAgilentPxi: eModel = EPSupplyModel.AgilentPxi; break; case preFixAgilent: eModel = EPSupplyModel.Agilent; break; case preFixAePxi: eModel = EPSupplyModel.AemulusPxi; break; case preFixAe1340: eModel = EPSupplyModel.Aemulus1340; break; case preFixAm471E: eModel = EPSupplyModel.Am471E; break; case preFixAm430E: eModel = EPSupplyModel.Am430E; break; case preFixNi4143: eModel = EPSupplyModel.Ni4143; break; case preFixNi4139: eModel = EPSupplyModel.Ni4139; break; case preFixNi4154: eModel = EPSupplyModel.Ni4154; break; default: eModel = new EPSupplyModel(); MessageBox.Show("Power Supply model in Local Setting file PowerSupply portion have invalid setting."); break; } }