Home Robotiq Products

Discussion

Left ArrowBack to discussions page
sgaforbessgaforbes Posts: 4 Apprentice
Hi, I recently purchased an FT300 which I'm attempting to interface with an Arduino via Modbus RTU over RS485. I am able to read registers, however this is as the documentation suggests relatively slow. This could be down to the Arduino Modbus library I'm currently using. I would prefer to initiate the data stream and just monitor that. Is this possible over Modbus RTU? This is probably a super simple question, I'm pretty new to serial comms
Tagged:

Best Answer

Comments

  • sharifzadehsharifzadeh Posts: 4 Apprentice
    I want to receive data from RS-485 too. Can you explain how you get data from registers?

    For example, what do you send to the sensor (& to which registors) in order to get it to send you data?

    Thanks!

    Mohammad
  • louis_bergeronlouis_bergeron Posts: 94 Handy
    @sharifzadeh

    The gripper uses a standard industrial protocol Modbus RTU.  You must implement this protocol to read and write registers.  The gripper registers are detailed in the manual here:
    http://support.robotiq.com/display/2FIM/4.2+Gripper+register+mapping

    You can also see Modbus communication examples in the manual here:
    http://support.robotiq.com/pages/viewpage.action?pageId=8520166

    You can find free libraries on the web to do that.  You can also get information about that protocol on the web like this site:

    http://www.simplymodbus.ca/


    Louis Bergeron
    Integration Coach
    robotiq.com
    [email protected]
  • sharifzadehsharifzadeh Posts: 4 Apprentice
    @sharifzadeh

    The gripper uses a standard industrial protocol Modbus RTU.  You must implement this protocol to read and write registers.  The gripper registers are detailed in the manual here:
    http://support.robotiq.com/display/2FIM/4.2+Gripper+register+mapping

    You can also see Modbus communication examples in the manual here:
    http://support.robotiq.com/pages/viewpage.action?pageId=8520166

    You can find free libraries on the web to do that.  You can also get information about that protocol on the web like this site:

    http://www.simplymodbus.ca/


    Dear Louis,

    Thanks f
    Do you mean that the Modbus communication on the gripper is the same with the FT300 ?

    Because I want to use the FT sensor.

    Mohammad
  • louis_bergeronlouis_bergeron Posts: 94 Handy
    @sharifzadeh

    Oops... you're right, but indeed the FT sensor also uses the same Modbus RTU protocol.  Registers are described here:
    http://support.robotiq.com/display/FTS2/4.5+Serial+communication


    Louis Bergeron
    Integration Coach
    robotiq.com
    [email protected]
  • sharifzadehsharifzadeh Posts: 4 Apprentice
    @louis_bergeron

    Thanks for the response!

    I've read the registers. I'm now able to start and stop the stream. However, I'm still not sure from which register I should read the data stream.
    In the document, it just says:

    (((((((( When the stream is started, 16 bytes messages are sent by the sensor at 100Hz using this format:

    <0x20><0x4e><LSB_data1><MSB_data1> ... <LSB_data6><MSB_data6><LSB_crc><MSB_crc>  ))))))))))

    It does not declare the method to read it. For example, from which register!!!

  • louis_bergeronlouis_bergeron Posts: 94 Handy
    @sharifzadeh

    Has explained in this post, with Modbus protocol you can't access the data stream.  With this protocol, you can send the request to read each register. For example, the force in X can be read in register 180.

    If you want to read the data stream, you must implement it yourself by decoding the data received on the serial port.  The format is (fx,fy,fz,mx,my,mz).



    Louis Bergeron
    Integration Coach
    robotiq.com
    [email protected]
  • sharifzadehsharifzadeh Posts: 4 Apprentice
    @louis_bergeron

    Could you please explain how to "With this protocol, you can send the request to read each register."

    What should I send to the force sensor in order to read the register value. For example, if I want to read the X force, what request I should send to which register, so the sensors understand that I want to receive data from it. In other words, how should I activate the force sensor?

    Thanks!
  • sgaforbessgaforbes Posts: 4 Apprentice
    Not sure if this will help, but, this is the sampling functions I'm using on my Arduino. The Arduino is using a MAX485 converter to bridge between the Arduino digital outputs and RS485. You simply poll the register that contains the value(s) you're interested in. In my case I'm only interested in the Z value which I believe is stored in register 182. 

    int sample()
    {
    // Clear the response buffer
      node.clearResponseBuffer();
      
      // Read Z force register
      result = node.readHoldingRegisters(182, 1);    
      
      // Store the response buffer in a variable
      out = node.getResponseBuffer(0);

      return out;
    }

    Once the sensor is powered on and has comms it will be updating the values in the registers so you will then be able to poll those registers for the value stored in them
  • Etienne_SamsonEtienne_Samson Beta Tester Beetle, Wrist Camera URCap 1.3.0, Vacuum Beta tester Posts: 419 Handy
    @sgaforbes very interesting, what can of frenquency can you get with that method ?
    Etienne Samson
    Technical Support Director
    +1 418-380-2788 ext. 207
    [email protected]
  • sgaforbessgaforbes Posts: 4 Apprentice
    I've not tested the frequency capability, it's not massively critical in my system so I'm currently polling the register every 20ms. I imagine this could be reduced considerably however if needed 
  • louis_bergeronlouis_bergeron Posts: 94 Handy
    @sharifzadeh

    The FT sensor supports the Modbus function "Read holding registers (FC03)".  

    You can see an example in the gripper manual here:http://support.robotiq.com/pages/viewpage.action?pageId=8520166
    As mentioned, because we use a standard protocol, you'll have all the information about Modbus RTU protocol on the web.  It will be useless to copy all of these here. 
    Louis Bergeron
    Integration Coach
    robotiq.com
    [email protected]
Sign In or Register to comment.
Left ArrowBack to discussions page