This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
specifications:protocol [2015/05/29 06:47] 127.0.0.1 外部編集 |
specifications:protocol [2021/04/01 13:51] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| < | < | ||
| - | プロトコル仕様書 | + | Protocol |
| - | ================ | + | =============================================================================== |
| - | ## 基本仕様 | + | ## Basic Specification |
| - | 命令を送信するにあたり、3文字で定義された命令をまず送信し、 | + | In sending a command, firstly send header that defined as 3 characters. |
| - | それに続いて各構成要素を定められたフォーマットのもと順次送信していきます。 | + | Secondly formatting and send each argument. |
| - | クライアント側では全ての表現を文字列にしてから送信する必要があります。 | + | Before sending a command, client must convert binary-expression to ascii-expression. |
| - | (バイナリをそのまま送信した場合、意図しない動作をすることがあります。) | + | (If the client sending a command without conversion, PLEN's moving is different from you intended.) |
| + | No differences the command line made of upper case or lower case. | ||
| + | Required baud-rate is **2, | ||
| - | ## システム関連 | ||
| - | **#IN** (モーションデータのインストール) | ||
| - | |タグ | + | ## Group of Controller Command |
| - | |: | + | ### $AN (Apply Native Value) |
| - | |slotNum |書き込みスロットの指定|0 | + | |
| - | |name |モーション名の指定 | + | |
| - | |function|制御機能の指定 | + | |
| - | |param0 | + | |
| - | |param1 | + | |
| - | |frameNum|フレームの総数の指定 | + | |
| - | |frame | + | |
| - | - - - | + | |Args |
| + | |:--------|: | ||
| + | |DEVICE_ID|Set a device id. |0 |23 |0 padding,hex,2 bytes| | ||
| + | |VALUE | ||
| - | **#MI** (関節可動域最小値の設定), | + | *example*: |
| - | **#MA** (関節可動域最大値の設定), | + | If you want to apply **1000** to device |
| - | **#HO** (関節初期位置の設定), | + | |
| - | **#SA** (関節可動命令) | + | |
| - | |タグ | + | ``` |
| - | |: | + | $an0a3e8 |
| - | |jointNum|関節番号の指定 | + | ``` |
| - | |angle | + | |
| - | - - - | + | ### $AD (Apply Diff Value) |
| - | **### | + | |Args |
| + | |: | ||
| + | |DEVICE_ID|Set a device id. |0 |23 |0 padding,hex,2 bytes| | ||
| + | |VALUE | ||
| - | - - - | + | *example*: |
| + | If you want to apply **home value - 100** to device **4**, send command below. | ||
| - | **#DJ** (関節設定のダンプコマンド) | + | ``` |
| + | $ad04f9c | ||
| + | ``` | ||
| - | - - - | + | ### $PM (Play a Motion) |
| - | **#SJ** (関節設定の書き込みコマンド) | + | **Attention!** |
| + | You could also use " | ||
| - | - - - | + | |Args|Roles |
| + | |:---|: | ||
| + | |SLOT|Set to read slot.|0 | ||
| - | **#DM** (モーションのダンプコマンド) | + | *example*: |
| + | If you want to play slot **4**, send command below. [See also...](http:// | ||
| - | |タグ | + | ``` |
| - | |: | + | $pm04 |
| - | |slotNum|読出しスロットの指定|0 | + | ``` |
| + | ### $SM (Stop a Motion) | ||
| - | ## モーション関連 | + | **Attention!** |
| - | **$MP** (モーションデータの再生) | + | You could also use "$MS", but this is **deprecated**. |
| - | |タグ | + | *example*: |
| - | |: | + | If you want to stop a motion, send command below. |
| - | |slotNum|再生スロットの指定|0 | + | |
| - | - - - | + | ``` |
| + | $sm | ||
| + | ``` | ||
| - | **$MS** (停止命令) | + | ### $HP (Apply Home Position) |
| + | |||
| + | *example*: | ||
| + | If you want to apply home position, send command below. | ||
| + | |||
| + | ``` | ||
| + | $hp | ||
| + | ``` | ||
| + | |||
| + | |||
| + | ## Group of Interpreter Command | ||
| + | ### #PU (Push a Function) | ||
| + | |||
| + | |Args |Roles | ||
| + | |: | ||
| + | |SLOT |Set to read slot. |0 |89 |0 padding,hex,2 bytes| | ||
| + | |LOOP_COUNT|Set number of play.|0 | ||
| + | |||
| + | *example*: | ||
| + | If you want to push function that plays slot **10** **three** times, send command below. | ||
| + | |||
| + | ``` | ||
| + | #pu0a03 | ||
| + | ``` | ||
| + | |||
| + | ### #PO (Pop a Function) | ||
| + | |||
| + | *example*: | ||
| + | If you want to pop a function, send command below. | ||
| + | |||
| + | ``` | ||
| + | #po | ||
| + | ``` | ||
| + | |||
| + | ### #RI (Reset the Interpreter) | ||
| + | |||
| + | *example*: | ||
| + | If you want to reset the interpreter, | ||
| + | |||
| + | ``` | ||
| + | #ri | ||
| + | ``` | ||
| + | |||
| + | |||
| + | ## Group of Setter Command | ||
| + | ### >MH (Set a Motion Header) | ||
| + | |||
| + | |Args |Roles | ||
| + | |: | ||
| + | |SLOT |Set to write slot. |0 |89 |0 padding,hex,2 bytes | | ||
| + | |NAME |Set a motion name. |--- |--- |White space padding,20 bytes| | ||
| + | |USE_LOOP | ||
| + | |LOOP_BEGIN | ||
| + | |LOOP_END | ||
| + | |LOOP_COUNT | ||
| + | |USE_JUMP | ||
| + | |JUMP_SLOT | ||
| + | |USE_EXTRA | ||
| + | |FRAME_LENGTH|Set a frame length. | ||
| + | |||
| + | *example*: | ||
| + | Please get more details at "> | ||
| + | |||
| + | ### >MF (Set a Motion Frame) | ||
| + | |||
| + | |Args |Roles | ||
| + | |: | ||
| + | |SLOT |Set to write slot. | ||
| + | |FRAME_ID | ||
| + | |TRANSITION_TIME_MS|Set a transition time (msec).|32 | ||
| + | |VALUE[DEVICE_ID] | ||
| + | |||
| + | **(*1) Sum of devices is 24 and the all are servo motors in current implementation.** | ||
| + | |||
| + | *example* | ||
| + | Introduce how to install a motion below. | ||
| + | |||
| + | |Args |Values| | ||
| + | |: | ||
| + | |SLOT |0 | | ||
| + | |NAME |Test | | ||
| + | |USE_LOOP | ||
| + | |LOOP_BEGIN | ||
| + | |LOOP_END | ||
| + | |LOOP_COUNT | ||
| + | |USE_JUMP | ||
| + | |JUMP_SLOT | ||
| + | |USE_EXTRA | ||
| + | |FRAME_LENGTH | ||
| + | |||
| + | |Args |Values| | ||
| + | |: | ||
| + | |TRANSITION_TIME_MS|100 | ||
| + | |VALUE[EVEN] | ||
| + | |VALUE[ODD] | ||
| + | |||
| + | Please send command below. (Do not need to insert CR, LF, or CRLF actually.) | ||
| + | |||
| + | ``` | ||
| + | >MH00 | ||
| + | Test | ||
| + | 1 | ||
| + | 00 | ||
| + | 01 | ||
| + | 03 | ||
| + | 1 | ||
| + | 32 | ||
| + | 0 | ||
| + | 02 | ||
| + | |||
| + | >MF | ||
| + | 00 | ||
| + | 00 | ||
| + | 0064 | ||
| + | 0000ffff0000ffff0000ffff0000ffff | ||
| + | 0000ffff0000ffff0000ffff0000ffff | ||
| + | 0000ffff0000ffff0000ffff0000ffff | ||
| + | |||
| + | >MF | ||
| + | 00 | ||
| + | 01 | ||
| + | 0064 | ||
| + | 0000ffff0000ffff0000ffff0000ffff | ||
| + | 0000ffff0000ffff0000ffff0000ffff | ||
| + | 0000ffff0000ffff0000ffff0000ffff | ||
| + | ``` | ||
| + | |||
| + | If you are interested deeply, please see also | ||
| + | [the implementation on the Control Server](https:// | ||
| + | |||
| + | ### >JS (Reset the Joint Settings) | ||
| + | |||
| + | *example*: | ||
| + | If you want to reset the joint settings, send command below. | ||
| + | |||
| + | ``` | ||
| + | >js | ||
| + | ``` | ||
| + | |||
| + | ### >HO (Set a Home Value) | ||
| + | |||
| + | |Args | ||
| + | |: | ||
| + | |DEVICE_ID|Set a device id. |0 |23 |0 padding,hex,2 bytes| | ||
| + | |VALUE | ||
| + | |||
| + | *example*: | ||
| + | If you want to apply **100** as home value to device **0**, send command below. | ||
| + | |||
| + | ``` | ||
| + | > | ||
| + | ``` | ||
| + | |||
| + | ### >MA (Set a Max Value) | ||
| + | |||
| + | |Args | ||
| + | |: | ||
| + | |DEVICE_ID|Set a device id. | ||
| + | |VALUE | ||
| + | |||
| + | *example*: | ||
| + | If you want to apply **100** as max value to device **0**, send command below. | ||
| + | |||
| + | ``` | ||
| + | > | ||
| + | ``` | ||
| + | |||
| + | ### >MI (Set a Min Value) | ||
| + | |||
| + | |Args | ||
| + | |: | ||
| + | |DEVICE_ID|Set a device id. | ||
| + | |VALUE | ||
| + | |||
| + | *example*: | ||
| + | If you want to apply **-1** as min value to device **10**, send command below. | ||
| + | |||
| + | ``` | ||
| + | > | ||
| + | ``` | ||
| + | |||
| + | ## Group of Getter Command | ||
| + | ### <JS (Dump the Joint Settings) | ||
| + | |||
| + | *example*: | ||
| + | If you want to dump the joint settings, send command below. | ||
| + | |||
| + | ``` | ||
| + | <js | ||
| + | ``` | ||
| + | |||
| + | At that time, outputting result like json below. | ||
| + | |||
| + | ``` | ||
| + | [ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | ... | ||
| + | ] | ||
| + | ``` | ||
| + | |||
| + | ### <MO (Dump a Motion) | ||
| + | |||
| + | |Args|Roles | ||
| + | |: | ||
| + | |SLOT|Set to read slot.|0 | ||
| + | |||
| + | *example*: | ||
| + | If you want to dump slot **0**, send command below. | ||
| + | |||
| + | ``` | ||
| + | <mo00 | ||
| + | ``` | ||
| + | |||
| + | At that time, outputting result like " | ||
| + | However, property " | ||
| + | |||
| + | ### <VI (Dump the Version Information) | ||
| + | |||
| + | *example*: | ||
| + | If you want to dump the version information, | ||
| + | |||
| + | ``` | ||
| + | <vi | ||
| + | ``` | ||
| + | |||
| + | At that time, outputting result like json below. | ||
| + | |||
| + | ``` | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ``` | ||
| </ | </ | ||