Can not call a procedure with more than one argument
Gene
✭
in RobotStudio
Hello guys,
everytime when i try in rapid to call a procedure with more than one argument, the compiler tells me there is a syntax error and expects a bracket.
Simple Example:
[code]
PROC test (var num a, var num b)
VAR num c;
c:=a;
a:=b;
b:=c;
ENDPROC
[/code]
calling in main doesent work because of syntax error:
[code]
var num a:=3;
var num a:=4;
test(a,b);
[/code]
What do I overlook? What syntax error? How to fix it? The procedure is declared out of the main procedure in module.
Thnx.
0
Comments
-
If you call a proc the call is test a,b and if you call a func it's test(a,b) could be the issuePer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
Hi Per, thnx for your tip, but your instruction doesnt work. The manual example is more similar to my procedure example. I also tried to call a funciton (FUNC) but the same problem. Compiler says syntax error. The only way I see now, is to use global variables. But it doesnt solve my problem.0
-
You can not use the name test it is a rapid commandRegards
Knud Erik Lindberg
Jorgensen Engineering0 -
Hi Knud, yes I know. Its only a code example. My procedures had other names and they weren't underlined by the compiler, instead the instruction for calling the procedure was marked as a syntax error. I dont know why.0
-
-
Hi Per, thnx. The brackets had to be missing. So you was right.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 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