Can anybody explain me what does it mean in RAPID: %name_of_proc% ?
Options
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.4K RobotStudio
- 385 UpFeed
- 15 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 285 IRC5
- 47 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 748 RAPID Programming
- 15 Wizard Easy Programming
- 110 Collaborative Robots
- 3 Job listings