Home Programming

Discussion

Left ArrowBack to discussions page
bcastetsbcastets Vacuum Beta tester Posts: 695 Expert
edited November 2019 in Programming
You may want to open or close gripper while moving the robot. With the current gripper TM component you don t have the possibility to do it but I would like to share with you an alternative solution.

Using the modbusRTU communication system of TM it is possible to send gripper command in a thread.

Here below is the main program:
  1. Gripper settings and activation
  2. Move the robot to point 2
  3. Gripper open
  4. Robot wait 3s
  5. The variable which trigger the gripper close thread is witched to True
  6. The robot is moved to point 3

Here below is the thread:
  1. Check the statue of the variable which trigger the gripper close. 
  • If False wait 0.5s and loop.
  • If true send a modbusRTU command to close the gripper


The modbus RTU command is the following:



The variable sent is: var_sendCommand={0x09,0x00,0x00,0xFF,0xFF,0xFF}

  • var_sendCommand[0]: Action request
  • var_sendCommand[0]: Reserved
  • var_sendCommand[0]: Reserved
  • var_sendCommand[0]: Position request
  • var_sendCommand[0]: Speed
  • var_sendCommand[0]: Force
Check gripper manual for details about registers.

Don t forget that you need to define the modbusRTU device in the left panel:





The program is attached to this post.

Comments

Sign In or Register to comment.
Left ArrowBack to discussions page