Unable to use ValueChanged Property
Dezino
✭
Hi'
I am trying to make the value of rapid data available at all times on the FlexPanadant custom GUI. So I used the valuechanged property code to retrieve these data value everytime it changes. This is giving me problems by throwing exeptions everytime I run the flexpandant application.
I am using VisualStudio2008, RobotWare5.11.0160.00 and RobotStudio5.11.
Any assistance on how to solve this is greatly appreciated!
Thanks'
Our deepest fear is not that we are inadequate, but powerful beyond measures!
0
Comments
-
Please post a sample of the code you are using to do this.Russell Drown0
-
Here is the sample code!
=========================================================
public TpsViewIRC5App1410test()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// ToDo: Add any constructor code after InitializeComponent call
//
RapidData collect = aController.Rapid.GetTask("T_ROB1").GetModule("MainModule").GetRapidData("startPr");
this.collect.ValueChanged += collect_ValueChanged;
}
void collect_ValueChanged(object sender, DataValueChangedEventArgs e)
{
this.Invoke(new EventHandler(UpdateGUI), sender, e);
}
private void UpdateGUI(object sender, EventArgs e)
{
//bool test = Convert.ToBoolean(collect.Value);
//ExecutionStatusChangedEventArgs args;
//args = (ExecutionStatusChangedEventArgs)e;
this.led1.Value = 1;
}
============================================================
Thanks'Our deepest fear is not that we are inadequate, but powerful beyond measures!0 -
Where are you declaring and instantiating your controller object? What exception type are you getting? I would assume its a NullReferenceException if you are not instantiating the controller somewhere. Also, you might want to consider using the DataBinding control to do this instead, its use is described elsewhere in this forum.You might want to try acontroller.GetRapidData((taskname,modulename,varname), and make sure that your variable is a PERS.RussD2009-04-01 15:29:45Russell Drown0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings