Esempio n. 1
0
        public Trnd()
        {
            InitializeComponent();

            tmr = new System.Windows.Threading.DispatcherTimer();
            tmrControl = new System.Windows.Threading.DispatcherTimer();
            tmr.Interval = new TimeSpan(0, 0, 0, 0, _timeSamlesMSeconds);
            tmrControl.Interval = new TimeSpan(0, 0, 5);
            tmr.Tick += new EventHandler(tmr_Tick);
            tmrControl.Tick += new EventHandler(tmrControl_Tick);
            NameScope.SetNameScope(this.chPane, new NameScope());
            this.Width = 1000.0;
            this.Height = 350.0;
            _rPid = new rPID(-1);
            _value = new ValuePIDChannel();
            FillTags(_rPid);
            FillValues();
            CreateControl();
            CreateChart();
            tmr.Start();
            tmrControl.Start();
        }
Esempio n. 2
0
 private void FillTags(rPID _rPid)
 {
     try
     {
         if (tags == null)
             tags = new Dictionary<string, ATag>();
         tags.Clear();
         if (_rPid.atagPV.id != -1 && _rPid.atagPV.nameSCADA != "")
             tags.Add(_rPid.atagPV.nameSCADA, _rPid.atagPV);
         if (_rPid.atagSP.id != -1 && _rPid.atagSP.nameSCADA != "")
             tags.Add(_rPid.atagSP.nameSCADA, _rPid.atagSP);
         if (_rPid.atagCV.id != -1 && _rPid.atagCV.nameSCADA != "")
             tags.Add(_rPid.atagCV.nameSCADA, _rPid.atagCV);
         if (_rPid.atagCV_MANUAL.id != -1 && _rPid.atagCV_MANUAL.nameSCADA != "")
             tags.Add(_rPid.atagCV_MANUAL.nameSCADA, _rPid.atagCV_MANUAL);
     }
     catch { }
 }
Esempio n. 3
0
 public void CreateChanelVisual(rPID PidRegulator)
 {
     CreateCanvas();
     botCanvas.Children.Clear();
     _rPID = PidRegulator;
     CreateControlAft4El();
 }