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

Python code to PRG

#1
Hi,

Were having problems generating a program from a python code.

Everytime we try to generate a python script to a .prg, we get an output file on scite but it doesn't show any movements or targets.

It does show the module and the proc but no movement commandos.
#2
Can you provide what you did so that we can take a look at it and help you?

Jeremy
#3
(04-25-2019, 06:08 AM)Jeremy Wrote:Can you provide what you did so that we can take a look at it and help you?

Jeremy

Hi,

Sorry for the late response, this is the code used.

The robot is a ABB 6400 sc4 teachpendant.

Code:
# ----------------------------------------------------------------------
# simple test 1
# PB 01 01 2019
# ----------------------------------------------------------------------

from robolink import * # API to communicate with RoboDK
from robodk import * # basic matrix operations
import random
import time

# interaction through Robolink()
RDK = Robolink()

# get the robot item:
robot = RDK.Item('', ITEM_TYPE_ROBOT)
# robot = RDK.Item('ABB IRB 6400R 2.8 200 Base')

# ================================================================

# get the home target and the welding targets:
home = RDK.Item('Home')

# move the robot to home, then to the center:
#robot.MoveJ(home)

# Set the speed to 50 mm/s
robot.setSpeed(4)

for i in range(4):
robot.setJoints([ 0, 90, -90, 0, 0, 0 ])
#robot.moveL([ 0, 90, -90, 0, 0, 0 ])
pause(1)
robot.setJoints([ 22, 50, -90, 0, 0, 0 ])
pause(1)

#robot.moveJoints([ 44, -24, -90, 52, 54, 180 ])

#pause(3)

# robot.MoveJ(home)

When generating program is gives us a mod & proc but otherwise completely empty file.
#4
Can you also send me your .rdk file.

I just want to work in the same environment as you. It will be faster for me to help.




Users browsing this thread:
1 Guest(s)