Program a Real Robot UR

Hello,

I’ve been programming a UR3e robot in Visual Components Premium using Python Script. I’ve been using the jointMoveToMtx command to move the robot to desired positions.

Now, I’d like to use this code on the actual robot. I know there’s a Post Processor, but I haven’t used the PROGRAM tab—only the Python Script under the MODELING → Behaviors section. I also know there’s a tutorial in the Academy, but it works through the PROGRAM tab and then uses the Post Processor.

Does anyone know how I can use the Python Script I’ve already written on the real UR3e robot?

Thanks in advance,
Paula

Below is a small piece of the script I’m using to program the robot:

def OnRun():   
    robot = getRobot() 
    robot.ActiveTool = 'Tool_TCP'
    robot.Configuration = 'FRONT ABOVE NOFLIP'

    bloque = app.findComponent('Cube')  
    mtx_position_bloque = bloque.WorldPositionMatrix
    mtx_position_bloque.rotateRelY(180)
    mtx_position_bloque.rotateRelZ(-90)
    robot.jointMoveToMtx(mtx_position_bloque)