Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Function with multiple arguments ABB Post Processor

#1
Hi, in my generated robodk program I need to call a custom function which has multiple arguments.
I noticed that the ABB RAPID IRC Robtargets post processor generates a function call with parentheses in the robot script, which gives me syntax problems when loading the program to the robot.
Do you have hany clue?
Thanks!
#2
When using ABB RAPID programs you should not have the brackets on your program call for your arguments if your procedure does not require it.

Calling a function and passing parameters in ABB RAPID language require brackets, whereas program calls that don't return values do not require passing arguments with brackets.

Do you have a sample project? Did you customize your post processor?
#3
Since I need to create a generic (so not ABB-specific) function call in my plugin code, I used the standard syntax
Code:
foo(par1, par2);
and hoped that the post processor handled this case by dealing with useless brackets.
So I had to override the RunCode function and modify a snippet of the script this way:
Code:
            if iarg > 0:
                fcn = code[:iarg]
                args = code[iarg+1:]
                args = args.replace(')','')
                fcn = FilterName(fcn)
                self.addline(fcn + ' '+args + ';')

So now the function call is split in fcn and args ignoring the existing brackets
#4
Thank you very much for your feedback.

We'll be updating our official post processors for ABB controllers with this improvement.
  




Users browsing this thread:
1 Guest(s)