ユーザ用ツール

サイト用ツール


desktop_station_s_serial_communication_specification

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
desktop_station_s_serial_communication_specification [2017/02/05 13:48] yaasandesktop_station_s_serial_communication_specification [2017/06/25 21:03] – [How to communicate] yaasan
行 22: 行 22:
  
 コマンドの構造は、「コマンド名(引数1,引数2,・・・)\n」となっています。命令の最後はLF(改行コード)を必ず付けてください。大文字小文字を考慮します。 コマンドの構造は、「コマンド名(引数1,引数2,・・・)\n」となっています。命令の最後はLF(改行コード)を必ず付けてください。大文字小文字を考慮します。
 +
 +コマンドを送る場合、200 Okの応答からウェイトを最低100ms以上置いてください。内部で処理を行ってDCCパルス生成器を確実に動作させるために必要です。
 ===== Command list ===== ===== Command list =====
  
 ^Commands ^ Parameters ^ examples ^ ^Commands ^ Parameters ^ examples ^
 +|setPing| none | setPing()\n|
 |setPower| Power on/off | setPower(1)\n| |setPower| Power on/off | setPower(1)\n|
 |setLocoSpeed| Locomotive address, Speed, (Speed Step)| setLocoSpeed(5,100,2)\n | |setLocoSpeed| Locomotive address, Speed, (Speed Step)| setLocoSpeed(5,100,2)\n |
行 51: 行 54:
 |CV Value | 0-255 | Locomotive's CV Value | |CV Value | 0-255 | Locomotive's CV Value |
  
 +以下のテーブルは、ロコとポイントのアドレス(1-65535)の意味をあらわしてます。\\ 
 The following table describes Locomotive's and Accessory's address meaning. The following table describes Locomotive's and Accessory's address meaning.
  
行 77: 行 81:
   - Wait for receiving a message "100 Ready".   - Wait for receiving a message "100 Ready".
   - After received "100 ready", you can send commands.   - After received "100 ready", you can send commands.
 +  - Firstly you need to send "setPower(1)".
 +  - The output of track is available. Send commands which you want.
  
  
 ===== Example of communication log ===== ===== Example of communication log =====
 +
 +以下は、通信ログの例です。setPing()を投げて生存確認をしてから、setPower(1)で線路電源のON、そのあとはコマンドを打てばその通りにDCC信号が出力されます。
  
 <code> <code>
desktop_station_s_serial_communication_specification.txt · 最終更新: 2023/12/26 21:00 by yaasan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki