User Tools

Site Tools


rb5_advanced_programming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rb5_advanced_programming [2023/01/20 14:14] – [Example] bskimrb5_advanced_programming [2023/02/07 14:22] (current) – [Exercise] bskim
Line 15: Line 15:
  
 The control syntax provided in the teaching pendant / tablet UI can be implemented by the user directly from the external control device, and the robot operation commands / IO control commands are sent according to the user’s use case. The control syntax provided in the teaching pendant / tablet UI can be implemented by the user directly from the external control device, and the robot operation commands / IO control commands are sent according to the user’s use case.
- 
  
 The following document describes an example of driving a robot with the above concepts. The following document describes an example of driving a robot with the above concepts.
  
 + *[[rb5_advanced_programming#API Commands|API Commands]]
 =====External Connection===== =====External Connection=====
 In order to use external control, the external computer must be connected to the control box. The connection uses TCP / IP communication and the corresponding IP address can be set in the pendant. The result is displayed on the screen on control panel. Ports 5000 and 5001 open for external control. Port 5000 is a port for receiving commands, and port 5001 is a port for requesting and sending data indicating robot status. For convenience, port 5000 is called the command port and port 5001 is called the data port. In order to use external control, the external computer must be connected to the control box. The connection uses TCP / IP communication and the corresponding IP address can be set in the pendant. The result is displayed on the screen on control panel. Ports 5000 and 5001 open for external control. Port 5000 is a port for receiving commands, and port 5001 is a port for requesting and sending data indicating robot status. For convenience, port 5000 is called the command port and port 5001 is called the data port.
Line 29: Line 29:
 |  0x24  |  Size&0xFF  |  (Size>>8)&0xFF  |  0x03  |  Data  | |  0x24  |  Size&0xFF  |  (Size>>8)&0xFF  |  0x03  |  Data  |
 The format of the data is shown below. Depending on the system version, the size of the data may be different. However, the order is consistent, please refer to the table below. The format of the data is shown below. Depending on the system version, the size of the data may be different. However, the order is consistent, please refer to the table below.
- *[[rb5_advanced_programming#reqdata format|reqdata format]]+ 
 + 
 +[[rb5_advanced_programming#reqdata format|reqdata format]] 
 + 
 +==== Exercise ==== 
 +* Print out the RB5's current Position using script command. 
 + 
 +* Print out the RB5's current Joint angle using script command. 
 + 
 +* Move RB5 from joint angle(0,0,0,0,0,0) to angle(10,20,30,40,50,60), speed 30% using script command. 
 + 
 +* Move RB5 from joint Position(0.4,0,0.4,0,0,0) to Position(0.2,0.2,0.5,0,0,0), speed 30% using script command. 
  
 ====Example==== ====Example====
Line 124: Line 136:
 def get_data_thread(sock, q_in, q_out): def get_data_thread(sock, q_in, q_out):
     print('start')     print('start')
-    ft_calib=calib_ft_data() 
     while True:     while True:
         cmd=q_in.get()         cmd=q_in.get()
         if cmd == 1:         if cmd == 1:
             rb5_data_ = Rb5_getdata(sock)             rb5_data_ = Rb5_getdata(sock)
-            ft_data_ =  read_ft_data()-ft_calib 
-            q_out.put(ft_data_) 
             q_out.put(rb5_data_)             q_out.put(rb5_data_)
                          
Line 327: Line 336:
  
 =====reqdata format===== =====reqdata format=====
 +
 +^             Header (4 Byte)             ||||  Data (n Byte)  |
 +|  0x24  |  Size&0xFF  |  (Size>>8)&0xFF  |  0x03  |  Data  |
 +
 {{ :bskim:rb5_tutorial:reqdata1.png?nolink&600 |}} {{ :bskim:rb5_tutorial:reqdata1.png?nolink&600 |}}
 {{ :bskim:rb5_tutorial:reqdata2.png?nolink&600 |}} {{ :bskim:rb5_tutorial:reqdata2.png?nolink&600 |}}
rb5_advanced_programming.1674252892.txt.gz · Last modified: by bskim