RobotStudio event

taf.exe error

Dear all,

   I got a  problem when developing a FP RAB application.(just read a config file and set a signal).the application noramly is ok.

  but when I press control panel >configration(in Real GTPU),I choose Topic and I can't find IO item and also there is no info. about IO, that means I can't define any IO signal. if press close in commandbar, no response. if press several times continues or use 'X',sometimes GTUP will display a error like below

  TAF.exe error

  at system.io_error.winIOError()

  at system.io.fileStream.writeCore()

  at system.io.fileStream.flushwrite()

  at System.IO.filestream.flush()

  at system.IO.fileStream.dispose().

 I use RAB5.10 and robotware5.11.02. in RAB application. I have dispose the signal that I have used.

  same application in vitual controller(RW5.11.02). no problem..Confused

some code:

 

   void PrgLoad(object sender, ABB.Robotics.Tps.Windows.Forms.MessageBoxEventArgs e)

{

.....

 

Signal progType = _controller.IOSystem.GetSignal("goDataSetNo");
progType.Value=  Convert.ToInt32 (progNum);
progType.Dispose();

....

}


 public void CheckInfo()
        {
            signal1 = _controller.IOSystem.GetSignal(HomeSignal);
           
            if (signal1 == null)
            {
                GTPUMessageBox.Show(this, null, "Please Set Key signal");
                 InHome = 0;
            }
            else
            {
                   
                    digitalSig = (DigitalSignal)signal1;                    
                    digitalSig.Changed += new SignalChangedEventHandler(digitalSig_change);
                  
              }
               }

 public  void  digitalSig_change(object sender,EventArgs e)
        {
            this.Invoke(new ABB.Robotics.Controllers.IOSystemDomain.SignalChangedEventHandler(this.UpdateUI), new Object[] { sender, e });
              
        }

  private void UpdateUI(object sender,  SignalChangedEventArgs e)
        {
            SignalState state = e.NewSignalState;
            float val = state.Value;
            if (val==1)
            {
     
                InHome = 1;

            }
            else{
            
                InHome = 0;
            }

        
         
        }

 protected override void Dispose(bool disposing)
        {
            if (!IsDisposed)
            {
                try
                {
                    if (disposing)
                    {

                  
                        _controller.Dispose();
                         digitalSig.Changed -= new SignalChangedEventHandler(digitalSig_change);
                        signal1.Dispose();
                                                                   
                                         }
                }
                finally
                {
                    base.Dispose(disposing);
                }
            }
        }

 

...

 

 pls give sme ome suggestion? thanks a lot.Cry

BR//alan

Comments

  • Hi Alan,
     

    I was confused:

     

    - What is causing the error: your application or the ControlPanel View?

    - You mention that it works OK, but then it does not.

     

    In the Dispose method, try to dispose the controller instance at the end.

     

     

     

     
    Carlos Martinez
    ABB
  • hello,
      sorry my description confused u.

     I have try to open another windows like INPUT and output or others buttion in real GTPU main interface, it' no effection for the RAB application. just when I press control panel-> configration and system will display the error message.I can't see IO configration in real GTPU.

      control panel-> configration view will lead to the problem

    BR//alan

     
  • That is strange ..
     

    - Have you tried to create a new system?

    - Can you share a back-up in order to reproduce the problem?

     

    BR
    Carlos Martinez
    ABB
  • now, it's done. problem is memory leak, thanks all