Want to invite a potential Pro ? Click here!

louis_bergeron Handy

Username louis_bergeron
Visits 130
Last Active
Roles No Roles
Points 59
Full Name Louis Bergeron
Country -
Company (optional) Robotiq
  • Re: Using URScript to get data into a programm?

    You may also use the Modbus TCP server in the UR controller.  Registers 128-255, for example, are for a general purpose.  You may use pymodbus to build a simple python program like this to write desired X and Y values.

    from pymodbus.client.sync import ModbusTcpClient as ModbusClient

    import logging
    log = logging.getLogger()

    ##Connect to the IP adresse of the robot controller
    client = ModbusClient('', port=502)


    ##Writting desired x position in register 128
    rq = client.write_register(128, 100)
    rr = client.read_holding_registers(128,1)
    assert(rq.function_code < 0x80)     # test that we are not an error

    print rr.registers[0]

    #Writting desired y position in register 129
    rq = client.write_register(129, 40)
    rr = client.read_holding_registers(129,1)
    assert(rq.function_code < 0x80)     # test that we are not an error

    print rr.registers[0]


    The UR program may look like this to read values from the register and place them in variables.  the variables will then be visible in the variable tab.  In the following program, the MoveL are relative to a feature. The robot goes to 0, 0, 0 and then goes to 0.1, 0.04, 0  

       Robot Program

  • How to Install Our Grippers on KUKA IIWA

    We've had some questions during the last weeks regarding cabling our products on the KUKA IIWA robot and how to pass cabling inside the robot's arm. KUKA added some new media flange options so I decided to make an update about it.

    Two-Finger Gripper

    The 2-Finger Gripper uses RS485 signal requiring a twisted pair to pass through the arm. If you would like to install our 2-Finger Gripper on IIWA, there are no possibilities on IO pneumatic, Touch pneumatic, and IO valve pneumatic media flanges. Cabling will have to pass on the outside of the robot's arm.  

    On the other hand, if you have the electrical, touch electrical, IO electrical and pneumatic media flange you may use this trick posted by Catherine to send the RS485 signal through the arm. Once cabling reaches the robot controller, you may use our universal controller to convert the RS485 signal to your choice of Fieldbus. EtherCAT will be a good choice to connect it to the KUKA Controller.

    Three-Finger Gripper


    Since the Gripper has its own universal controller inside it, it may output directly the Fieldbus you want. The best choice will be to use the 3-Finger Gripper with EtherCAT communication protocol. With this option, you will be able to pass the cabling through the inside of the robot's arm on every media flange option of IIWA. We offer special cabling in order to do this connection easily.

    Other real-time Ethernet protocol

    If you need another real time ethernet protocol like Modbus TCP, Ethernet/IP or Profinet, you will have to pass the cable on the outside of the arm on IO pneumatic, Touch pneumatic, and IO valve pneumatic. The electrical media flange will handle all the real time ethernet protocol easily but Touch electrical and IO electrical will require custom connection to pass it through the arm. You will not be able to use the X2 connector on these cases because it's a dedicated EtherCAT communication connector.

    DeviceNet and Can Open

    If you need to use DeviceNet or CAN open, the only possible option will be to manage it on the outside of the robot's arm on all media flange options. 

    If you have any questions feel free to post below!
  • Re: Adding limits to operator variables on Universal Robot


    I'll suggest you program your loop in a script file as a new function.  Placing this script file in the beginning of your UR program will allow you to use your own function everywhere in a neat way.  As an example, I've programmed a new min/max prompt function in a script file.  Then I simply use this new function anywhere I need it in the program.


    This new operator prompt function is made for an integer but you can do the same for a floating point variable.  By changing the function request_integer_from_primary_client with request_float_from_primary_client.

    Is it something like this you're looking for?