public void VerticalSetting(uint ChannelNo, EUnits Units, double VScale, double VRange, double VOffset, bool VInvert) { ScpiCommand(":CHANnel{0}:UNITs {1}", ChannelNo, Units); ScpiCommand(":CHANnel{0}:SCALe {1}", ChannelNo, VScale); ScpiCommand(":CHANnel{0}:RANGe {1}", ChannelNo, VRange); ScpiCommand(":CHANnel{0}:OFFSet {1}", ChannelNo, VOffset); //ScpiCommand(":CHANnel{0}:LABel {1}", ChannelNo, VLable); ScpiCommand(":CHANnel{0}:INVert {1}", ChannelNo, VInvert); }
public static EUnits StringToEunits(string strUnits) { EUnits tempUnits = new EUnits(); if (strUnits == "f") { tempUnits = EUnits.f; } else if (strUnits == "c") { tempUnits = EUnits.c; } else if (strUnits == "k") { tempUnits = EUnits.k; } return(tempUnits); }
public static string DisplayTempurate(object objUnitType, int TempurateInF) { string tempString = ""; EUnits unitType = (EUnits)objUnitType; if (unitType == EUnits.f) { tempString = TempurateInF + "°F"; } else if (unitType == EUnits.c) { tempString = (int)((TempurateInF - 32) * .5556) + "°C"; } else if (unitType == EUnits.k) { tempString = (int)((TempurateInF + 459.67) * .5556) + "°K"; } return(tempString); }