Esempio n. 1
0
        public void Connect(int outChannelNumber, CancellationToken cancellationToken)
        {
            if (paceConfig == null)
            {
                paceConfig = ReadInfo();
            }

            for (int i = 0; i < 2; i++)
            {
                if (paceConfig.Controllers[i].RangeHi < thresholdUnitPA)
                {
                    WriteUnit(operationAttempts, PaceUnitsEnum.PA, i);
                }
                else
                {
                    WriteUnit(operationAttempts, PaceUnitsEnum.KPA, i);
                }
            }

            if ((!pace6000) || paceConfig.Controllers[0].RangeHi < paceConfig.Controllers[1].RangeHi)
            {
                currentChannel = 0;
            }
            else
            {
                currentChannel = 1;
            }


            pace.Connect();
        }
Esempio n. 2
0
        public PressSystemInfo ReadInfo()
        {
            PressControllersList modules = new PressControllersList();

            AddModul(modules);
            if (pace6000)
            {
                AddModul(modules, 1);
            }
            paceConfig             = new PressSystemInfo();
            paceConfig.RangeHi     = srcPlus;
            paceConfig.RangeLo     = srcMinus;
            paceConfig.Controllers = modules;
            return(paceConfig);
        }
Esempio n. 3
0
        public PressSystemInfo ReadInfo()
        {
            exchange.ConnectTcp();

            PressSystemInfo info = new PressSystemInfo();

            info.Controllers = new PressControllersList();
            for (int i = 0; i < NumberOfControllers; i++)
            {
                info.Controllers.Add(GetControllerInfo(i + 1));
            }

            GetPressureRange(out double PressureLo, out double PressureHi);

            info.RangeLo = PressureLo;
            info.RangeHi = PressureHi;

            Disconnect();
            return(info);
        }
Esempio n. 4
0
 internal static PressSystemInfo GetPressSystemInfo(string str)
 {
     try
     {
         if ((new Regex(@"(?<=INFO::)(.+)(?=INFO;)")).IsMatch(str))
         {
             var info = new PressSystemInfo()
             {
                 RangeLo     = ExtractDoubleParametr("LOLIM:", str),
                 RangeHi     = ExtractDoubleParametr("HILIM:", str),
                 Controllers = GetControllers(str)
             };
             return(info);
         }
         return(null);
     }
     catch
     {
         return(null);
     }
 }
Esempio n. 5
0
 public PressureRow(RangeTypeEnum rangeType, PressSystemInfo pressSystemInfo, float devicePrecision)
 {
     this.rangeType       = rangeType;
     this.devicePrecision = devicePrecision;
     this.pressSystemInfo = pressSystemInfo;
 }
 public PD100_DeviceSpecification(PressSystemInfo pressSystemInfo)
 {
     this.pressSystemInfo = pressSystemInfo;
 }