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..![]()
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.:grinning:
BR//alan