Example #1
0
        public void AddIO(IAnalogInput anIn, string label)
        {
            SetType(IOType.Analog);
            AnalogControl newAC = new AnalogControl();

            newAC.Value        = anIn.Get();
            newAC.IOTypeOutput = false;
            newAC.Label        = label;
            newAC.Units        = anIn.Unit;
            this.ioObjList.Add(anIn);
            this.Controls.Add(newAC);
        }
        public void Update()
        {
            var dt = stopwatch.Elapsed.TotalSeconds;

            if (dt < double.Epsilon)
            {
                return;
            }
            stopwatch.Restart();

            var value = source.Get();

            accumulatedValue += (float)(dt * value);
        }
        private void Timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            var voltage = VoltageService.Get();
            var current = CurrentService.Get();
            var power   = 0;

            this.Measure           = new Measure(DateTime.Now, voltage, current, power);
            this.ThreePhaseMeasure = ThreePhaseInputService.Get();

            IsPowerOn       = OutputService.IsOn();
            SupplierVoltage = SupplierVoltageInputService.Get();
            SupplierCurrent = SupplierCurrentInputService.Get();

            Voltages.Add(this.Measure.Voltage);
        }
 public float GetAcceleration() => angularAcceleration.Get();
Example #5
0
 public float GetAcceleration() => acceleration.Get();