Can anybody explain me what does it mean in RAPID: %name_of_proc% ?
I have a part of program which looks as follows:
WHILE diPLCstopAfterCycle=1 DO
GoHome;
Set dovR1cycleRun;
%"mainMovments_R3"%;
ENDWHILE
How the line: "%"mainMovments_R3"%;" is executed and what is the principle of using "% %" in the RAPID program?
How the line: "%"mainMovments_R3"%;" is executed and what is the principle of using "% %" in the RAPID program?
0
Answers
-
That is a call by variable in which the variable is a string of which the value is a routine name.Lee Justice0
-
I would like to add that unless some other part of the program changes the value of the string, then this type of call is unnecessary. It would be just as well to code:
mainMovements_R3;
as a direct procedure call.Lee Justice0 -
Search the forum and/or manual for "late binding" for more info.
As @lemster68 mentioned, it's commonly used to call a routine using a string. It could also be used to call a routine from a module which is to be loaded later or even loaded dynamically during runtime -- so if the mainMovements_R3 procedure didn't exist yet the program check would fault when called directly but "%"mainMovments_R3"%;" would pass.
1 -
Very good point, you are right.Lee Justice0
-
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 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)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings