UI Thread and change event
John B
✭
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(); // ----------------||------------------
}
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(); // ----------------||------------------
}
0
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?
0 -
Thanks Rene.... lets look forward to 5.06 (And no lag!)
Regards0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings