RobotStudio event

RAPID - exec style statement

I'm attempting to create a python wrapper which sends RAPID calls from a network connected control PC, without needing to hard-code each RAPID function I thought about using an 'exec' style statement to pass a string, which would allow the connect PC to control the arm.
 
In python, pascal and other languages it's possible to execute strings as code. I have read through documentation and search the web but I haven't found anything similar for RAPID. I figured it was worth a post to see if one does actually exist but isn't documented or if anyone has attempted something similar and what direction they went with it.

Thanks for any input!

Alex

Comments

  • Hi
     

    I think there is no feature what you described, but usually there is workarounds :)

     

    One easy way could be to hard-code some parameterized Rapid procedures and just pass the needed parameters from PC.

     

    Another way I have used in some cases is to build up a new Rapid module according to strings received from PC. So basically I have created a new Rapid module with Rapid (text file with correct format and .mod extension) and saved it as a file and opened it as a program module. It's not so fast way, but maybe useful if your cycle time is not so critical.

     

    -Osku
  • Thanks for the reply Osku,

    Yeah I thought that was going to be the case, I was just hoping to avoid having to hard-code it. I did consider the other option too but I would prefer the hard-coded option.

    Thanks again!

    Alex