def __init__(self, host): self.secondaryPort = 30002 self.secondaryInterface = SocketConnection(host, self.secondaryPort) self.secondaryInterface.connect() self.URModbusServer = URModbusServer(host) self.URScript = URScript() # variables that count how many times the arm moved to a certain direction self.right_moves = 0 self.left_moves = 0 self.down_moves = 0 self.up_moves = 0 self.forward_moves = 0 self.backward_moves = 0 # variable to memorize the state of the magnet: true if active, false otherwise self.is_magnet_active = False self.set_io(8, False) # variables representing the minimum and maximum values for the X, Y & Z axis, which the arm can reach (in mm) self.max_x = 100.00 # to right, 2 moves self.max_y = -750.00 self.max_z = 400 self.min_x = -300.00 # to left, 2 moves self.min_y = -850.00 self.min_z = 6 # Max safe values of acceleration and velocity are 0.4 # DO NOT USE THE FOLLOWING VALUES # MAX a=1.3962634015954636 # MAX v=1.0471975511965976 # These are the absolute max for 'safe' movement and should only be used # if you know what your are doing, otherwise you WILL damage the UR internally self.acceleration = 0.1 self.velocity = 0.1
def __init__(self, host): self.secondaryPort = 30002 self.secondaryInterface = SocketConnection(host, self.secondaryPort) self.secondaryInterface.connect() self.URModbusServer = URModbusServer(host) self.URScript = URScript() # Max safe values of acceleration and velocity are 0.4 # DO NOT USE THE FOLLOWING VALUES # MAX a=1.3962634015954636 # MAX v=1.0471975511965976 # These are the absolute max for 'safe' movement and should only be used # if you know what your are doing, otherwise you WILL damage the UR internally self.acceleration = 0.1 self.velocity = 0.1