Load program module
I get the error "The source file to be loaded contains RAPID syntax errors" when trying to execute the following code:
The file "rit.prg" contains the code:
MODULE rit
PROC Main()
LOAD Dynamic,"C:/folder/test.prg";
%"test:callme"%;
UNLOAD "C:/folder/test.prg";
ENDPROC
ENDMODULE
The file "test.prg" contains the code:
MODULE test
PROC callme()
TPWrite "Hello";
ENDPROC
ENDMODULE
The two files are in the same directory.
Does anyone have an idea of what's wrong?
0
Comments
-
"test" is a reserved keyword in RAPID, which makes it an illegal module name (not the file name).
Try changing the line: "MODULE test" to "MODULE test1" or to some other name and try it again.
Also, you must fix your late-binding call, i.e. %"test1:callme"%;
RussD2007-3-20 22:53:32Russell Drown0 -
That must me it! I'm kind of embarrassed that I didn't think of that. I will test this the first thing tomorrow morning. Thanks.
0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 338 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings