Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
RapidData / RobTarget exception when reading
Laro88
✭
I keep getting an exception that causes a crash in my app. Here is the exception:
ABB.Robotics.GenericControllerException: Invalid client id.
ved Adapters.Data.Get()
ved ABB.Robotics.Controllers.RapidDomain.RapidData.get_Value()
Here is the code ( compacted a bit )
RapidData rd;
RobTarget rt;
rd = theController.Rapid.GetRapidData("TaskSystem","SysMain","robtargetCurrentPos");
rd.ValueChanged+=new EventHandler<DataValueChangedEventArgs>(rd_ValueChanged);
rt = (RobTarget)rd.Value;
log.Debug("initialization rtCurrent was:"+rt.ToString()); //CRASH HERE
Basically I wish to read a robtarget from a task that updates the robtarget variable.... So this should not require mastership...
Laro882010-02-10 17:07:33
0
Comments
-
It appears that the read code somehow violates the Mastership requirement, don't know why though.
Here is some code that actually works without requiring mastership. Basically it only finds the RapidData and hooks up to its changed event.
Hookup snippet:
rd = theController.Rapid.GetRapidData("TaskX","ModuleY","robtargetZ");
rd.ValueChanged+=new EventHandler<DataValueChangedEventArgs>(rd_ValueChanged);
//Note that RapidData rd is declared in class scope to avoid destruction by mem cleanup.
Event reception snippet:
void rd_ValueChanged(object sender, DataValueChangedEventArgs e)
{
RobTarget rtChanged = (RobTarget)rd.Value;
Position p = new Position(rtChanged.Trans.X,
rtChanged.Trans.Y, ...........
0
Categories
- All Categories
- 5.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings