public void SetCompliance(SMUSourceMode sourceMode, double compliance) { switch (sourceMode) { case SMUSourceMode.Voltage: { if (compliance != _currentCurrentCompliance) { _currentCurrentCompliance = compliance; _driver.SendCommandRequest(string.Format(":SENS:CURR:PROT {0}", compliance.ToString(NumberFormatInfo.InvariantInfo))); } } break; case SMUSourceMode.Current: { var query = (from limit in _VSourceProtectionLimits where limit - Math.Abs(compliance) >= 0.0 select new { limit, distance = limit - Math.Abs(compliance) }).OrderBy(p => p.distance).First().limit; if (query != _currentVoltageCompliance) { _currentVoltageCompliance = query; _driver.SendCommandRequest(string.Format(":SENS:VOLT:PROT {0}", query.ToString(NumberFormatInfo.InvariantInfo))); } } break; default: break; } }
private void _SetSourceLevel(double val, SMUSourceMode mode) { switch (mode) { case SMUSourceMode.Voltage: _driver.SendCommandRequest(string.Format(":SOUR:VOLT:LEV {0}", val.ToString(NumberFormatInfo.InvariantInfo))); break; case SMUSourceMode.Current: _driver.SendCommandRequest(string.Format(":SOUR:CURR:LEV {0}", val.ToString(NumberFormatInfo.InvariantInfo))); break; default: break; } }
public void SetCompliance(SMUSourceMode sourceMode, double compliance) { switch (sourceMode) { case SMUSourceMode.Voltage: { var _compliance = compliance; if (compliance < _minCurrentCompliance) { _compliance = _minCurrentCompliance; } else if (compliance > _maxCurrentCompliance) { _compliance = _maxCurrentCompliance; } if (_compliance != _currentCurrentCompliance) { _currentCurrentCompliance = _compliance; _driver.SendCommandRequest(string.Format(":SENS:CURR:PROT {0}", _compliance.ToString(NumberFormatInfo.InvariantInfo))); } } break; case SMUSourceMode.Current: { var _compliance = compliance; if (compliance < _minVoltageCompliance) { _compliance = _minVoltageCompliance; } else if (compliance > _maxVoltageCompliance) { _compliance = _maxVoltageCompliance; } if (_compliance != _currentVoltageCompliance) { _currentVoltageCompliance = _compliance; _driver.SendCommandRequest(string.Format(":SENS:VOLT:PROT {0}", _compliance.ToString(NumberFormatInfo.InvariantInfo))); } } break; default: break; } }
public void SetCompliance(SMUSourceMode sourceMode, double compliance) { switch (sourceMode) { case SMUSourceMode.Voltage: { var _compliance = compliance; if (compliance < _minCurrentCompliance) { _compliance = _minCurrentCompliance; } else if (compliance > _maxCurrentCompliance) { _compliance = _maxCurrentCompliance; } if (_compliance != _currentCurrentCompliance) { _currentCurrentCompliance = _compliance; } } break; case SMUSourceMode.Current: { var _compliance = compliance; if (compliance < _minVoltageCompliance) { _compliance = _minVoltageCompliance; } else if (compliance > _maxVoltageCompliance) { _compliance = _maxVoltageCompliance; } if (_compliance != _currentVoltageCompliance) { _currentVoltageCompliance = _compliance; } } break; default: break; } }
private void _SetSourceRange(double val, SMUSourceMode mode) { switch (mode) { case SMUSourceMode.Voltage: { var query = (from range in _VoltageRanges where range - Math.Abs(val) > 0.0 select new { range = range, distance = range - Math.Abs(val) }).OrderBy(p => p.distance).First().range; if (query != _currentSourceVoltageRange) { _currentSourceVoltageRange = query; _driver.SendCommandRequest(string.Format(":SOUR:VOLT:RANG {0}", query.ToString(NumberFormatInfo.InvariantInfo))); } } break; case SMUSourceMode.Current: { var query = (from range in _CurrentRanges where range - Math.Abs(val) > 0.0 select new { range = range, distance = range - Math.Abs(val) }).OrderBy(p => p.distance).First().range; if (query != _currentSourceCurrentRange) { _currentSourceCurrentRange = query; _driver.SendCommandRequest(string.Format(":SOUR:CURR:RANG {0}", query.ToString(NumberFormatInfo.InvariantInfo))); } } break; default: break; } }
private void _SetSourceMode(SMUSourceMode mode) { if (mode != _currentSourceMode) { switch (mode) { case SMUSourceMode.Voltage: { _currentSourceMode = mode; _driver.SendCommandRequest(":SOUR:FUNC:MODE VOLT"); } break; case SMUSourceMode.Current: { _currentSourceMode = mode; _driver.SendCommandRequest(":SOUR:FUNC:MODE CURR"); } break; default: break; } } }
private void _SetFixedSourceMode(SMUSourceMode mode) { if (mode != _currentFixedSourceMode) { switch (mode) { case SMUSourceMode.Voltage: { _currentFixedSourceMode = mode; _driver.SendCommandRequest(":SOUR:VOLT:MODE FIX"); } break; case SMUSourceMode.Current: { _currentFixedSourceMode = mode; _driver.SendCommandRequest(":SOUR:CURR:MODE FIX"); } break; default: break; } } }