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

Macro call from part program

#1
Hi,
When running a program within RDK, I have calls to python macros within RDK.
I've got the same macro for multiple robots.
How do I determine within the python script which robot has made the call to the macro?
I don't want to have multiple different macros and change the name of the call so ideally I'd be able to find which robot called the macro through RoboLink or similar?
regards
#2
You could look for programs that are running in your project and get the robot linked to the program.

For example:
Code:
prog.Busy() # should return True if the program is running
prog.getLink(ITEM_TYPE_ROBOT) # should return the robot linked to your program

Do you have multiple robots running at the same time? Can you share your project? We may be able to provide you with a more robust solution.
#3
thanks Albert that's done the trick
  




Users browsing this thread:
1 Guest(s)