Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add #85

Merged
merged 2 commits into from
Sep 10, 2024
Merged

add #85

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 47 additions & 46 deletions 6-SDKDevelopment/6.1-CommunicationDoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ temp = x_low + x_high*256

x coordinate =(temp\33000 ?(temp – 65536) : temp)/10

*Explanation: if temp is greater than 33000, temp minus 65536, and then is divided by 100; if temp is less than 33000, then temp is divided by 100 directly.*
*Explanation: if temp is greater than 33000, temp minus 65536, and then is divided by 10; if temp is less than 33000, then temp is divided by 10 directly.*

*y coordinate is counted in a similar way.*

Expand Down Expand Up @@ -586,7 +586,7 @@ Return value: data structure
| ------- | -------------------- | --------- |
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X02 |
| Data[2] | data-length frame | 0X03 |
| Data[3] | command frame | 0X27 |
| Data[4] | suspend/not suspend | 0X01/0X00 |
| Data[5] | end frame | 0XFA |
Expand All @@ -595,7 +595,7 @@ Example:

Given that program suspends,

port return value: FE FE 03 12 01 FA
port return value: FE FE 03 27 01 FA

******

Expand All @@ -606,13 +606,13 @@ port return value: FE FE 03 12 01 FA
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X02 |
| Data[3] | command frame | 0X27 |
| Data[3] | command frame | 0X28 |
| Data[4] | suspend/not suspend | 0X01/0X00 |
| Data[5] | end frame | 0XFA |

Example:

Port transmission: FE FE 02 26 FA
Port transmission: FE FE 02 28 FA

no return value

Expand All @@ -630,7 +630,7 @@ no return value

Example:

Port transmission: FE FE 02 26 FA
Port transmission: FE FE 02 29 FA

no return value

Expand Down Expand Up @@ -700,7 +700,7 @@ Return Value: data structure
| Data[0] | return value: head frame | 0XFE |
| Data[1] | return value: head frame | 0XFE |
| Data[2] | return value: data-length frame | 0X03 |
| Data[3] | return value: command frame | 0X2a |
| Data[3] | return value: command frame | 0X2A |
| Data[4] | reaching the point/not reaching the point | 0X01/0X00 |
| Data[5] | end frame | 0XFA |

Expand Down Expand Up @@ -790,7 +790,7 @@ no return value.

Example:

Given that No.1 steering gear moves to 45° at the speed of 20
Given that No.1 steering gear moves to 45° at the speed of 20%

port transmission: FE FE 06 31 01 11 94 14 FA

Expand Down Expand Up @@ -825,7 +825,7 @@ Example:

Given that robotic arm moves towards x coordinate at the speed of 20

port transmission: FE FE 06 32 01 01 14 FA
port transmission: FE FE 05 32 01 01 14 FA

axis ranges from 1 to 6, representing x, y, z,rx, ry, rz

Expand All @@ -842,7 +842,7 @@ no return value
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X06 |
| Data[3] | command frame | 0X31 |
| Data[3] | command frame | 0X33 |
| Data[4] | serial number of steering gear | Joint |
| Data[5] | highbyte of angle of steering gear | Angle_high |
| Data[6] | lowbyte of angle of steering gear | Angle_low |
Expand Down Expand Up @@ -937,7 +937,7 @@ no return value
| Data[4] | serial number of joint | joint |
| Data[5] | end frame | 0XFA |

Example:
Example:FE FE 03 3B 02 FA

get the potential of NO.2 steering gear

Expand Down Expand Up @@ -1098,7 +1098,7 @@ Example:

Given that all robotic arms are set in zero position,

port return value: FE FE 0E 3D 08 00 08 00 08 00 08 00 08 00 08 00 FA
port return value: FE FE 0E 3D 00 00 00 00 00 00 00 00 00 00 00 00 FA

How potentials are counted:

Expand All @@ -1118,7 +1118,7 @@ potential = low status of potential + high status of potential * 256

Example:

Port transmission: FE FE 02 3D FA
Port transmission: FE FE 02 40 FA

Return value: data structure

Expand Down Expand Up @@ -1185,7 +1185,7 @@ Return value: data structure
| ------- | ---------------------------------- | ------------ |
| Data[0] | return value: identification frame | 0XFE |
| Data[1] | return value: identification frame | 0XFE |
| Data[2] | return value: data-length frame | 0X04 |
| Data[2] | return value: data-length frame | 0X05 |
| Data[3] | return value: command frame | 0X4A |
| Data[4] | serial number of joint | Joint_number |
| Data[5] | high angle of steering gear | Angle_high |
Expand Down Expand Up @@ -1231,7 +1231,7 @@ Return value: data structure
| ------- | ---------------------------------- | ------------ |
| Data[0] | return value: identification frame | 0XFE |
| Data[1] | return value: identification frame | 0XFE |
| Data[2] | return value: data-length frame | 0X04 |
| Data[2] | return value: data-length frame | 0X05 |
| Data[3] | return value: command frame | 0X4B |
| Data[4] | serial number of joint | Joint_number |
| Data[5] | high angle of steering gear | Angle_high |
Expand All @@ -1240,7 +1240,7 @@ Return value: data structure

Example:

port return value: FE FE 05 4B 02 06 72 FA
port return value: FE FE 05 4B 02 F9 F2 FA

How the largest angles are counted:

Expand Down Expand Up @@ -1271,7 +1271,7 @@ Given that the smallest angle of joint 2 is 0

Serial number of joint ranges from 1 to 6

port return value: FE FE 03 41 32 FA
port return value: FE FE 03 4C 32 FA

data type of angle1_high: byte

Expand Down Expand Up @@ -1306,7 +1306,7 @@ Given that the largest angle of joint 2 is 45

Serial number of joint ranges from 1 to 6

port return value: FE FE 03 41 32 FA
port return value: FE FE 03 4D 32 FA

data type of angle1_high: byte

Expand All @@ -1316,7 +1316,7 @@ data type of angle1_low: byte

counting method: angleis multiplied by 100 and converted into integral form to get the hexadecimal lowbyte

Port transmission: FE FE 05 4C 02 11 94 FA
Port transmission: FE FE 05 4D 02 11 94 FA

no return value

Expand Down Expand Up @@ -1347,7 +1347,7 @@ Return value: data structure
| ------- | ---------------------------------- | ------------ |
| Data[0] | return value: identification frame | 0XFE |
| Data[1] | return value: identification frame | 0XFE |
| Data[2] | return value: data-length frame | 0X03 |
| Data[2] | return value: data-length frame | 0X04 |
| Data[3] | command frame | 0X50 |
| Data[4] | serial number of joint | Joint_number |
| Data[5] | connected/not connected | 0X01/0X00 |
Expand Down Expand Up @@ -1408,7 +1408,7 @@ Example:

Reading ratio parameter of P position of No.1 steering gear

Port transmission: FE FE 03 51 01 FA
Port transmission: FE FE 03 53 01 FA

Serial number of joint ranges from 1 to 6

Expand All @@ -1435,21 +1435,22 @@ Return value: data structure

### Setting Servo Parameters

| Domain | Explanation | Data |
| ------- | ---------------------- | -------- |
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X05 |
| Data[3] | command frame | 0X52 |
| Data[4] | serial number of joint | Joint_no |
| Data[5] | data address | data_id |
| Data[6] | end frame | 0XFA |
| Domain | Explanation | Data |
| ------- | :--------------------- | :------------------- |
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X05 |
| Data[3] | command frame | 0X52 |
| Data[4] | serial number of joint | Joint_no |
| Data[5] | data address | data_id |
| Data[6] | parameter | view the table below |
| Data[7] | end frame | 0XFA |

Example:

Reading ratio parameter of P position of No.1 steering gear

Port transmission: FE FE 05 52 01 15 01 FA
Port transmission: FE FE 04 52 01 15 01 FA

Serial number of joint ranges from 1 to 6

Expand Down Expand Up @@ -1496,7 +1497,7 @@ no return value
| ------- | ---------------------- | -------- |
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X02 |
| Data[2] | data-length frame | 0X03 |
| Data[3] | command frame | 0X55 |
| Data[4] | serial number of joint | Joint_no |
| Data[5] | end frame | 0XFA |
Expand Down Expand Up @@ -1611,8 +1612,8 @@ no return value
| ------- | -------------------- | ------ |
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X04 |
| Data[3] | command frame | 0X61 |
| Data[2] | data-length frame | 0X03 |
| Data[3] | command frame | 0X62 |
| Data[4] | serial number of pin | pin_no |
| Data[5] | end frame | 0XFA |

Expand All @@ -1628,8 +1629,8 @@ Return value: data structure
| ------- | ---------------------------------- | --------- |
| Data[0] | return value: identification frame | 0XFE |
| Data[1] | return value: identification frame | 0XFE |
| Data[2] | return value: data-length frame | 0X03 |
| Data[3] | return value: command frame | 0X53 |
| Data[2] | return value: data-length frame | 0X04 |
| Data[3] | return value: command frame | 0X62 |
| Data[4] | pin number | pin_no |
| Data[5] | signal of electrical level | 0X00/0X01 |
| Data[6] | end frame | 0XFA |
Expand Down Expand Up @@ -1715,7 +1716,7 @@ no return value

Example:

Given that gripper opens by 50% at the speed of 30
Given that gripper opens by 50% at the speed of 20

Port transmission: FE FE 04 67 32 14 FA

Expand Down Expand Up @@ -1759,7 +1760,7 @@ Return value: data structure
| ------- | -------------------- | ----- |
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X04 |
| Data[2] | data-length frame | 0X03 |
| Data[3] | command frame | 0X69 |
| Data[4] | stop/move | 00/01 |
| Data[6] | end frame | 0XFA |
Expand Down Expand Up @@ -1800,7 +1801,7 @@ no return value
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X04 |
| Data[3] | command frame | 0Xa0 |
| Data[3] | command frame | 0XA0 |
| Data[4] | pin number | Pin_no |
| Data[5] | signal of electrical level | 0X00/0X01 |
| Data[4] | end frame | 0XFA |
Expand All @@ -1809,7 +1810,7 @@ Example:

Setting high electrical level of pin 2

Port transmission: FE FE 02 a0 02 01 FA
Port transmission: FE FE 04 A0 02 01 FA

******

Expand All @@ -1824,7 +1825,7 @@ Port transmission: FE FE 02 a0 02 01 FA
| Data[4] | pin number | Pin_no |
| Data[4] | end frame | 0XFA |

Port transmission: FE FE 02 a0 02 01 FA
Port transmission: FE FE 04 a1 02 01 FA

Return value: data structure

Expand Down Expand Up @@ -1938,7 +1939,7 @@ no return value

Example:

Port transmission: FE FE 04 b2 1b 58 FA
Port transmission: FE FE 02 82 FA

Return value: data structure

Expand All @@ -1947,7 +1948,7 @@ Return value: data structure
| Data[0] | identification frame | 0XFE |
| Data[1] | identification frame | 0XFE |
| Data[2] | data-length frame | 0X0E |
| Data[3] | command frame | 0X81 |
| Data[3] | command frame | 0X82 |
| Data[4] | specify high status of x coordinate | x_high |
| Data[5] | specify low status of x coordinate | x_low |
| Data[6] | specify high status of y coordinate | y_high |
Expand All @@ -1970,7 +1971,7 @@ temp = x_low + x_high*256

x coordinate =(temp\33000 ?(temp – 65536) : temp)/10

*Explanation: if temp is greater than 33000, temp minus 65536, and then is divided by 100; if temp is less than 33000, then temp is divided by 100 directly.*
*Explanation: if temp is greater than 33000, temp minus 65536, and then is divided by 10; if temp is less than 33000, then temp is divided by 10 directly.*

*y coordinate is counted in a similar way.*

Expand Down Expand Up @@ -2016,7 +2017,7 @@ temp = x_low + x_high*256

x coordinate =(temp\33000 ?(temp – 65536) : temp)/10

*Explanation: if temp is greater than 33000, temp minus 65536, and then is divided by 100; if temp is less than 33000, then temp is divided by 100 directly.*
*Explanation: if temp is greater than 33000, temp minus 65536, and then is divided by 10; if temp is less than 33000, then temp is divided by 10 directly.*

*y coordinate is counted in a similar way.*

Expand Down Expand Up @@ -2132,7 +2133,7 @@ Return value: data structure

Example:

port return value: FE FE 03 86 01 FA
port return value: FE FE 03 8A 01 FA

## Appendix

Expand Down
Loading