FP SDK 5.14 executionStatusChanged subscription
SAV
✭
Hello,
I try to use the "classical" scheme of the subsrciption using, which works with any other type of subscriptions e.g. subscription on the signal, rapiddata, programPointer or any controller state changing. But it doesn't work with executionStatus. Please take a look at the following code:
public void SubscribeOnExecute()
{
getRapid().ExecutionStatusChanged += executionStatusChanged;
}
private void executionStatusChanged(object sender, ExecutionStatusChangedEventArgs e)
{
GTPUMessageBox.Show(this, null, "Status=" + e.NewStatus);
executionStatusChangeUI(e.NewStatus.Equals(ExecutionState.Started));
}
private void executionStatusChangeUI(bool isRunning)
{
// InvokeRequired required compares the thread ID of the
// calling thread to the thread ID of the creating thread.
// If these threads are different, it returns true.
if (this.InvokeRequired)
{
var rc = new executionStatusChangedCallback(executionStatusChangeUI);
this.Invoke(rc, new object[] { isRunning });
}else
{
if (isRunning)
{
disableUI();
}
else
{
enableUI();
}
}
}
....
getRapid() returns m_Controller.Rapid.
Unfortunetally it doesn't work. Is someone has the succesfull experience with the executionStatusChanged subscription ?
Thank you,
Anton
SAV2012-10-22 08:47:55
Anton Shchepelin,
Russia, Chelyabinsk,
The Research and Production Company "Alpha-Intech",
http://alphajet.ru/
Russia, Chelyabinsk,
The Research and Production Company "Alpha-Intech",
http://alphajet.ru/
0
Comments
-
The same situation with PC SDK. How to use the executionStatus event ? Any ideas will be appreciate! Thank you...SAV2012-10-27 11:27:02Anton Shchepelin,
Russia, Chelyabinsk,
The Research and Production Company "Alpha-Intech",
http://alphajet.ru/0 -
I have found the way how to avoid it. I create System Output (Rapid execution) and connect it with a virtual signal, then I subscribe on its changing..Anton Shchepelin,
Russia, Chelyabinsk,
The Research and Production Company "Alpha-Intech",
http://alphajet.ru/0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings