RobotStudio event

UI Thread and change event

I am trying to simply update on pendant screen the status of a number of digital IO. I have a working solution but the update time on change is in the region >6 secs! This clearly is not workable in real terms. I have invoked the event delegation as recom'd in the sdk docs to sync the threads but even so, i still have very slow updates! Can anyone help / shed some light please...





          void ITpsViewActivation.Deactivate()

          {

               this.do1Sig.Changed -=new SignalChangedEventHandler (do1Sig_Changed);

          }



          void ITpsViewActivation.Activate()

          {

               this.do1Sig.Changed +=new SignalChangedEventHandler (do1Sig_Changed);

          }



          #endregion



          private void do1Sig_Changed(object sender, SignalChangedEventArgs e)

          {

               this.Invoke (new EventHandler(this.ChangedDO1UserInterface),sender, e);

          }

          private void ChangedDO1UserInterface(object sender, System.EventArgs e)

          {

               SignalChangedEventArgs args = (SignalChangedEventArgs) e;

               SignalState sigState = args.NewSignalState;

               Single val = sigState.Value;                    // or some suitable means of display here

               this.textBox1.Text = val.ToString();          // ----------------||------------------

          }

Comments

  • Hello,

    this "lag" is due to the SDK Domain; the events are delayed. As far as I know, there will be a change in 5.06 to increase the performance of the SDK Domain.

    best regards

    Ren?

     

  • Thanks Rene.... lets look forward to 5.06 (And no lag!)



    Regards