I have a number of windows each are displayed based on a state of a number of digital signals. This works for the 1st couple of signal changes it the stop changing, this occurs when windows are to return to main window. The windows freeze and only navigate amongst themselves, the samplame code is given below:
public view1()
{
InitializeComponent();
a1Controller = new Controller();
sWindow = a1Controller.IOSystem.GetSignal(“diP1”);
diWnd = (DigitalSignal)sWindow;
this.diWnd.Changed += new SignalChangedEventHandler(diWnd_Changed);
}
void diWnd_Changed(object sender, SignalChangedEventArgs e)
{
this.Invoke(new ABB.Robotics.Controllers.IOSystemDomain.SignalChangedEventHandler(this.UpdateUIw), new Object { sender, e });
}
private void UpdateUIw(object sender, SignalChangedEventArgs e)
{
SignalState wState = e.NewSignalState;
float wVal = wState.Value;
if (wVal == 0)
{
this.CloseMe();
}
}
///
/// Clean up any resources used by this class
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (!IsDisposed)
{
try
{
if (disposing)
{
//ToDo: Call the Dispose method of all FP SDK instances that may otherwise cause memory leak
if (components != null)
{
components.Dispose();
}
if (a1Controller != null)
{
a1Controller = null;
a1Controller.Dispose();
}
}
}
finally
{
base.Dispose(disposing);
}
}
}
I am using VisualStudio 2008, RAB5.11, and RobotStudio 5.11.
Please assist!
Thanks’