Hi again,
thanks for your reply. using set IO22=1 produces this error message on Polyscope.
set_standard_digital_out: invalid port number (22)
Because of if this I tried to run the script generated by RoboDK directly on PolyScope. global ref_frame = p[0,0,0,0,0,0] defined seems to have other coordinates as in RoboDK in comparison to the UR Controller. The robot moves differetly as run directly from RoboDK. This is the script.
def S1():
# Global parameters:
global speed_ms = 0.250
global speed_rads = 0.750
global accel_mss = 1.200
global accel_radss = 1.200
global blend_radius_m = 0.001
global ref_frame = p[0,0,0,0,0,0]
# Main program:
# Program generated by RoboDK v5.2.2 for UR5 on 19/05/2021 10:55:58
# Using nominal kinematics.
speed_rads = 3.142
speed_ms = 3.000
movej([0.282689, -1.716702, 1.980006, -1.813572, -1.567613, 2.633754],accel_radss,speed_rads,0,0)
movej([-0.027119, -1.169233, 1.714831, -2.098828, -1.566906, 2.318076],accel_radss,speed_rads,0,blend_radius_m)
movel(pose_trans(ref_frame,p[-0.591575, -0.094414, -0.098837, -2.906536, 1.185291, -0.027940]),accel_mss,speed_ms,0,blend_radius_m)
movel(pose_trans(ref_frame,p[-0.591575, -0.094414, -0.089837, -2.906536, 1.185291, -0.027940]),accel_mss,speed_ms,0,blend_radius_m)
set_configurable_digital_out(2, True)
sleep(2.000)
movej([0.282689, -1.716702, 1.980006, -1.813572, -1.567613, 2.633754],accel_radss,speed_rads,0,blend_radius_m)
movej([-0.511704, -1.858357, 2.090503, -1.793849, -1.579778, 1.839001],accel_radss,speed_rads,0,blend_radius_m)
movej([-0.389263, -1.324049, 1.951418, -2.189201, -1.579923, 1.949672],accel_radss,speed_rads,0,blend_radius_m)
set_configurable_digital_out(2, False)
set_configurable_digital_out(3, True)
sleep(1.000)
set_configurable_digital_out(3, False)
movej([-0.511704, -1.858357, 2.090503, -1.793849, -1.579778, 1.839001],accel_radss,speed_rads,0,blend_radius_m)
movej([0.282689, -1.716702, 1.980006, -1.813572, -1.567613, 2.633754],accel_radss,speed_rads,0,blend_radius_m)
# End of main program
end
S1()