
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
- 398 UpFeed
- 19 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 324 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 813 RAPID Programming
- 5 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings