public Ammetr(string ip, CurrentTypeEnum currentType, CurrentUnitsEnum units, int range) { this.ip = ip; CurrentType = currentType; Units = units; multipler = Units == CurrentUnitsEnum.A ? 1 : 1000; Range = range; }
public void SetCurrentRange(CurrentTypeEnum currentType, int value, CurrentUnitsEnum unit) { string send = "CONF:CURR:" + currentType + " "; send += (unit == CurrentUnitsEnum.AUTO) ? unit.ToString() : (value.ToString() + unit.ToString()); transport.Send(send); for (int i = 0; i < 5; i++) { Pause(1000); string config = WriteRead("CONF?"); if (CheckSetCurrentRange(config, value, unit)) { return; } } throw new SDM_ErrException(Properties.Resources.SetCurrentMeasureModeError); }