RobotStudio event

why it does not update my flexpendant?

Options

Dear colleagues, I'm a friend of carmila and have simillar problems with flexpendant .. shouldn't this work ?

sig = (DigitalSignal) controller.IOSystem.GetSignal("test1");

sig.Changed += new SignalChangedEventHandler(delegate(object obj,SignalChangedEventArgs args){

       textBox1.Text = sig.Get().ToString();

});

it works on virtual flexpendant .. but why doesn't it work in the real fp.. ? can anyone please give us hint ? ..

Comments

  • carlosmtz2000
    Options

    Hi,

    I have not tried myself, but even though this is semantically correct, the event handler will be called in a thread that is NOT the UI thread, so you cannot change any property that will cause a change in the UI.

    1. Can you put a MessageBox.Show method just to make sure that it is called?

    2. You will pass the call from the thread the event is called to the UI thread by doing an Invoke

    Saludos/Carlos

     

    Carlos Martinez
    ABB
  • hi .. you did it again .. it works .. thanks for your advice .. mui bien ..

    thanks ..