RAPID: Modify variable in an array from FlexPendant
I have a single robtarget (called A) and an array of robtargets (called . I would like to put A into B -> this works nicely, until I would like to modify A via FlexPendant: I get the "Unable to modify position" error message. The ways I tried:
(1) Result: Error message while modifying via FlexPendant ("Unable to modify")
CONST robtarget A:=[...];
CONST robtarget B{1}:=[A];
(2) Result: Error in rapid code (B cannot be declared as PERS)
CONST robtarget A:=[...];
PERS robtarget B{1}:=[A];
(3) Result: Error in rapid code (A should be CONST if we want to put it into an array)
PERS robtarget A:=[...];
CONST robtarget B{1}:=[A];
I have to put robtargets into an array, but I would like to provide the "Modify position via FlexPendant" feature to the operators. Is this possible some way?
Thank you for any help.
0
Comments
-
you can but they ALL need to be PERS, I don't think rapid let you modify CONST unless in manual. Try this:
VAR robtarget pTemp := [whatever, just make sure the position is clear]
GetDataVal "pRobTargetB", pTemp;
MoveL pTemp...
After the changes have been made and saved run this
SetDataVal "pRobTargetA", pTemp;
pRobTargetB := pTemp;
I hope this help! Now this is set up without the array, so you may need to run a for loop to pull the robtarget out of the array before making pRobTargetB := pTemp
0
Categories
- All Categories
- 5.5K RobotStudio
- 393 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 783 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings