G-code/ja
English • العربية • български • català • čeština • Deutsch • Ελληνικά • español • فارسی • français • hrvatski • magyar • italiano • română • 日本語 • 한국어 • lietuvių • Nederlands • norsk • polski • português • русский • Türkçe • українська • 中文(中国大陆) • 中文(台灣) • עברית • azərbaycanca • |
このページは現在再翻訳中です。非常にデータが古いため、ベーシックなコード以外は 英語版 を確認するようにして下さい。
このページでは、RepRapファームウェアで使用されているGコードと、その働きを説明します。プリントヘッドの移動に使われるコードは NIST により RS274NGC Gコード スタンダード に準拠しています。したがって、RepRapファームウェアはCNCミリングマシンなどの用途にも使うことができると言えます。Wikipedia の Gコードの記事 (英語) もご参照ください。
3Dプリンターへ使うGコードの準備方法には、いくつかの異なる方法があります。1つは Slic3r や Skeinforge、Cura などの スライスプログラムを使う方法です。これらのプログラムでは、インポートされたCADモデルをレイヤー状にスライスし、それぞれのレイヤーで必要なGコードを出力します。スライサープログラムは、3Dモデルをプリント部品へと変えるのにもっとも簡単な方法ですが、柔軟性の問題を抱えることもあります。Gコードを生成するほかの方法としては、Mecode のような低級ライブラリを使う方法があります。これらのライブラリーでは、ツールパスによって精密なコントロールを行うため、スライスプログラムには適さない、複雑なプリントを行うときには非常に便利です。また、当然ながら、Gコードを自分で書いて3Dプリンターを制御することもできます。この方法は、プリンターの調整時などに、数本の線だけを出力したい、などというときには最も良い手段と言えるでしょう。
世界中には、たくさんの異なるファームウェアが存在します。その開発者たちは議論を交わしたり、誰かがしたことを調べずに新しい機能を実装してしまう傾向にあるため、長年にわたって開発されてきた3Dプリンター固有のコードには、たくさんの意味を持ってしまっていることがあります。このページは、RepRapのマスターページです。このページにしたがって全てのファームウェアがつくられていれば、同じコードを2つの異なる目的に使用する必要はありません。新しい機能を開発するのであれば、ここにコードを追加すればよいのです。したがって、ルールはこうなります。新しいコードは、このページに追加してから、実装してください。
残念なことに、人間の本質は変わりません。ベストと考えられる手順が、必ずしも従われるとは言い切れません。そのため、複数の機能がもたされているコードがいくつか存在してしまうことでしょう。従われるべきルールは、このページに後から追加されたコードは、基本的には廃止され、変更される必要がある、ということです。もちろん、後のインスタンスが優先される、技術的に素晴らしい理由があるという際には例外となります。実装日よりも、ここに追加された日の方が重要であることを覚えておいてください。
Contents
- 1 はじめに
- 2 RepRapの先頭コード
- 3 大文字/小文字の区別
- 4 引用文
- 5 コメント
- 6 Special fields
- 7 コマンド
- 7.1 Checking
- 7.2 バッファに格納されるGコマンド
- 7.3 バッファに格納されないGコマンド
- 7.4 バッファに格納されないM及びTコマンド
- 7.4.1 M0: Stop
- 7.4.2 M1: スリープ(Sleep)
- 7.4.3 M3: スピンドルを時計回りでオンにする(Spindle On, Clockwise (CNC specific))
- 7.4.4 M4: スピンドルを反時計回りでオンする(Spindle On, Counter-Clockwise (CNC specific))
- 7.4.5 M5: Spindle Off (CNC specific)
- 7.4.6 M7: ミストクーラントをオンにする(Mist Coolant On (CNC specific))
- 7.4.7 M8: フラッドクーラントをオンにする(Flood Coolant On (CNC specific))
- 7.4.8 M9: クーラントをオフにする(Coolant Off (CNC specific))
- 7.4.9 M10: バキュームをOnにする(Vacuum On (CNC specific))
- 7.4.10 M11: バキュームをOffにする(Vacuum Off (CNC specific))
- 7.4.11 M17: 全てのステッパーモーターの電源を入れる(Enable/Power all stepper motors)
- 7.4.12 M18: 全てのステッパーモーターの電源をオフ or 回転をオフ(Disable all stepper motors)
- 7.4.13 M20: SDカード上のファイルをリストアップする(List SD card)
- 7.4.14 M21: SDカードの初期化(Initialize SD card)
- 7.4.15 M22: SDカードの取り外し(Release SD card)
- 7.4.16 M23: SDカードからファイルを選択する(Select SD file)
- 7.4.17 M24: SDカード上のファイルからの印刷を開始もしくは再開する(Start/resume SD print)
- 7.4.18 M25: SDカードからの印刷を一時停止する(Pause SD print)
- 7.4.19 M26: SDカードの位置を指定する(Set SD position)
- 7.4.20 M27: SDカードからの印刷のステータスをレポートする(Report SD print status)
- 7.4.21 M28: SDカードに書き込みを開始する(Begin write to SD card)
- 7.4.22 M29: SDカードに書き込む(Stop writing to SD card)
- 7.4.23 M30: SDカード上のファイルを削除する(Delete a file on the SD card)
- 7.4.24 M32: SDカードからファイルを選択し、SDカードからの印刷を開始する(Select file and start SD print)
- 7.4.25 M40: Eject
- 7.4.26 M41: Loop
- 7.4.27 M42: Stop on material exhausted / Switch I/O pin
- 7.4.28 M43: Stand by on material exhausted
はじめに
通常、RepRapマシンに送信されるGコードは以下のようなものです。
N3 T0*57 N4 G92 E0*67 N5 G28*22 N6 G1 F1500.0*82 N7 G1 X2.0 Y2.0 F3000.0*85 N8 G1 X3.0 Y3.0*33
Gコードは、SDカード上のファイルにも保存することができます。RepRapのGコードを含んでいるファイルには、通常、.g
、.gco
、.gcode
などの拡張子が与えられています。BFB/RapManへのファイルには、.bfb
が使われています。ファイルに保存されているものや、スライサーによって生成されたGコードは、以下のようなものとなっているでしょう。
G92 E0 G28 G1 F1500 G1 X2.0 Y2.0 F3000 G1 X3.0 Y3.0
これらの記号や数字、その他のコードの意味は、以下にて説明されています。
スライサーソフトウェアは、Gコードファイルの最初と最後の行に、プリントの前後に行う特殊な操作を行うためのコードを追加します。(オプションとされているものもあります。) 特殊な操作の例としては、オートレベリング、ヒートベッドやホットエンドの加熱/冷却、ウージング(oozing) と呼ばれるフィラメント切れを防ぐためのノズルの清掃、スタートアップ動作、システム電源の ON/OFF、部品の排出機能などが挙げられます。より詳細な情報は、Start GCode routines や End GCode routines ページをご覧ください。
特定のGコードが、どのファームウェアで実装されているのかを確認しやすくするため、コマンドの説明欄には以下のような表が設けられています。
対応状況 | FiveD | Teacup | Sprinter | Marlin | Repetier | Smoothie | RepRapFirmware | Machinekit | MakerBot | grbl | Redeem | MK4duo |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Yes | Automatic | No | Partial | Experimental | Deprecated | ??? | ??? | ??? | ??? | Yes | Partial |
それぞれのフィールドの意味は以下の通りです。
Yes
- 全ての機能をサポートしていることを表します。
Partial または Experimental
- 部分的に機能をサポートしていることを表します。
- この場合には、ファームウェアのソースコードをそれぞれのブランチから確認したり、メインボードに設定されているスイッチを切り替える必要があったりします。
- Automatic
- この機能はファームウェアが自動的に処理することを表しています。したがって、このコマンドを送信する必要はありません。
- 例えば、Teacupファームウェアでの電源の on/off(M80/M81) に関するGコードがこれに相当します。
- ???
- ファームウェアがこのGコードをサポートしているかが不明なことを表します。
- もしあなたがプリンターを販売する予定があるのであれば、生産する前にこの機能をテストする必要があります。
No
- ファームウェアはこの機能をサポートしていないことを表します。
- Deprecated
- ファームウェアはこのGコードを廃止したことを表します。
- ファームウェアの作者は、Gコードを廃止する際には、このページ上のGコードに廃止することを記載し、(必要であるならば) 回避策を提示してください。また、そのコードがサポートされていた最後のバージョンも必ず記載してください。
RepRapの先頭コード
本章では、先頭の文字について説明する。nnnは数字を示す。数字は、その先頭文字の意味に応じて、整数もしくは小数を指定することができる。例えば、X座標は整数(X175)もしくは小数(X17.62)のどちらも指定可能である。一方、エクストルーダーを選択するとき、番号2.76を指定するとおかしい(普通は整数になる)。
先頭の文字 | 意味 |
---|---|
Gnnn | GCodeの標準コマンド (例)ある点に動く |
Mnnn | RepRapが定義したコマンド (例)冷却ファンのスイッチをONにする |
Tnnn | ツール番号nnnを選択する RepRapにおいて、ツールはエクストルーダー(Extruder)である |
Snnn | コマンドのパラメータ。(例)モータに送る電圧 |
Pnnn | コマンドのパラメータ。(例)ミリ秒の時間 |
Xnnn | 移動先のX座標 |
Ynnn | 移動先のY座標 |
Znnn | 移動先のZ座標 |
Innn | パラメータ - 現在使用されていない。 |
Jnnn | パラメータ - 現在使用されていない。 |
Fnnn | フィード率(プリンタのヘッドが動くスピード)。1分に何mmフィードするか指定する。 |
Rnnn | パラメータ - 温度のために使用される。 |
Qnnn | パラメータ - 現在使用されていない。 |
Ennn | 押出される長さ(単位mm)。押し出されるフィラメントの長さ。Skeinforge 40もしくは40以上は、押出される長さではなく、消費される入力フィラメントの長さとして、この長さを扱う。 |
Nnnn | ライン番号。エラーが起きたときにRepeat transmission要求するために使われる。 |
*nnn | チェックサム。通信エラーをチェックするために使用される |
大文字/小文字の区別
NISTによるオリジナルのGコードスタンダードでは、Gコードを扱うプログラムに対し、大文字/小文字の区別をつけないことを要求しています。(コメント内の文字は除く) しかしながら、全ての3Dプリンターのファームウェアがこれに準拠しているわけではなく、大文字で書かれたコマンド文や変数のみしか認識しないものもあります。
- 大文字/小文字の区別を要求しないことで知られるファームウェア
- RepRapFirmware version 1.19 とそれ以降 (引用文を除く)
- 大文字/小文字の区別を要求することで知られるファームウェア
- RepRapFirmware version 1.18 とそれ以前
引用文
RepRapFirmwareでは、いくつかのコマンドが 引用文 をサポートしています。これを使うと、スペースやセミコロンなどの通常は使用することのできない文字を、ファイル名やWiFiパスワードなどに変数として使用することができます。引用文は、ダブルクオーテーション "
によって区切られます。引用文中にダブルクオーテーションを使う必要がある場合には、ダブルクオーテーションを二度入力してください。
使用例
ここでは、MYROUTER
というSSIDと、ABCxyz;" 123
というパスワードをWiFiネットワークリストに追加する例を示します。
この場合には、以下のようなコマンドを入力します。
M587 S"MYROUTER" P"ABCxyz;"" 123"
もし小文字を使えないファームウェアを使っている場合には、以下のコマンドを入力します。
M587 S"MYROUTER" P"ABC'X'Y'Z;"" 123"
コメント
Gコードのコメントは、セミコロン (;) から始まり、改行コードで終わります。
N3 T0*57 ; これがコメントです N4 G92 E0*67 ; これもまたコメントとして使えます N5 G28*22
いくつかのファームウェアでは、CNC Gコードスタンダードに準拠し、コメントを括弧で区切っていることがあります。この場合には、括弧は同じ行内に収まっている必要があります。
(軸のホーミング) G28 (ホーミングされる軸) X Y
RepRapプリンターでは、コメントやスペースは無視されます。ただし、これらはプリンターに送られる前にホストコンピューターによって取り除かれる方がよいでしょう。これにより、通信量を削減することができます。
Special fields
N: 行番号
対応状況 | FiveD | Teacup | Sprinter | Marlin | Repetier | Smoothie | RepRapFirmware | Machinekit | MakerBot | grbl | Redeem | MK4duo |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Yes | Yes | Yes | Yes | ??? | ??? | Yes | Yes | ??? | ??? | Yes | Yes |
- Example
N123
If present, the line number should be the first field in a line. For G-code stored in files on SD cards the line number is usually omitted.
If checking is supported, the RepRap firmware expects line numbers to increase by 1 each line, and if that doesn't happen it is flagged as an error. But you can reset the count using M110
(see below).
Although supported, usage of N in Machinekit is discouraged as it serves no purpose.
コマンド
Checking
N and *
Example: N123 [...G Code in here...] *71
These are the line number and the checksum. The RepRap firmware checks the checksum against a locally-computed value and, if they differ, requests a repeat transmission of the line of the given number.
You can leave both of these out - RepRap will still work, but it won't do checking. You have to have both or neither though.
The checksum "cs" for a GCode string "cmd" (including its line number) is computed by exor-ing the bytes in the string up to and not including the * character as follows:
int cs = 0; for(i = 0; cmd[i] != '*' && cmd[i] != NULL; i++) cs = cs ^ cmd[i]; cs &= 0xff; // Defensive programming...
and the value is appended as a decimal integer to the command after the * character.
The RepRap firmware expects line numbers to increase by 1 each line, and if that doesn't happen it is flagged as an error. But you can reset the count using M110 (see below).
バッファに格納されるGコマンド
RepRapファームウェアは、内部的なリングバッファにコマンドを格納する。
The RepRap firmware stores these commands in a ring buffer internally for execution. This means that there is no (appreciable) delay while a command is acknowledged and the next transmitted. In turn, this means that sequences of line segments can be plotted without a dwell between one and the next. As soon as one of these buffered commands is received it is acknowledged and stored locally. If the local buffer is full, then the acknowledgment is delayed until space for storage in the buffer is available. This is how flow control is achieved.
G0: 即時移動(Rapid move)
Support | FiveD | Teacup | Sprinter | Marlin | Repetier |
---|---|---|---|---|---|
??? | yes | yes | yes | yes |
例: G0 X12
上記の例は、X = 12mmへ直ちに移動する。RepRapファームウェアは、G0とG1の区別は行わない。(G1参照) (G0とG1の違いは、軸に対して真直以外にも動作する事が可能な古い機械が、より速く移動するためにある。これらの古い機械にとって、G0は、できるだけ速く目的とする位置へ移動するために、任意の移動を行う事を許可する。)
G1: 制御移動(Controlled move)
Support | FiveD | Teacup | Sprinter | Marlin | Repetier |
---|---|---|---|---|---|
yes | yes | yes | yes | yes |
例: G1 X90.6 Y13.8 E22.4
樹脂を押出す長さを現在の長さから22.4mmに変更し、樹脂を押出しながら、現在の座標(X, Y)から(90.6, 13.8)へ真直ぐに移動する。
RepRapは、以下のようにフィード率を指定する事もできる。
G1 F1500 G1 X90.6 Y13.8 E22.4
上記の例は、フィード率を1500mm/分に指定し、そのフィード率を使用して、(90.6, 13.8)へ移動する。
一方、
G1 F1500 G1 X90.6 Y13.8 E22.4 F3000
上記の例は、一旦、フィード率を1500mm/分に指定し、その後、フィード率3000mm/分に加速しながら、(90.6, 13.8)へ移動する。押出は、X, Y方向に移動しながら加速する。つまり全ては同期する。
RepRapは、線形的に簡単に値を変更するために、フィード率を単純な変数として扱う(X, Y, ZのようにEを扱う)。
This gives complete control over accelerations and decelerations in a way that ensures that everything moves together and the right volume of material is extruded at all points.
Note: 全てのファームウェアが、この機能を実装しているわけではない。例えば、現在の Marlinは、移動の最初から新たに指定されたフィード率を使用して、フィード率の変更は行わない。
前述の最初の例は一定のスピードで移動する方法を示している。2番目の例は、加速する方法、減速する方法を示している。
G1 F1500 G1 X90.6 Y13.8 E22.4 F3000 G1 X80 Y20 E36 F1500
上記の例は、最初の移動は加速し、2番目の移動は3000mm/分から1500mm/分に減速する例である。
To reverse the extruder by a given amount (for example to reduce its internal pressure while it does an in-air movement so that it doesn't dribble) simply use G1 to send an E value that is less than the currently extruded length.
Some implementations and RepRaps allow the sensing of endstops during moves to be switched on and off. Adding an S field allows this: G1 X300 S1 will move X to 300 checking for an endstop hit and stopping if it happens. G1 X300 S0 will do the same move with no checking. The default is no checking.
G2: 時計回りの制御移動(Controlled Move Arc Clockwise)
Support | FiveD | Teacup | Sprinter | Marlin | Repetier |
---|---|---|---|---|---|
no | no | no | yes | yes |
例: G2 X90.6 Y13.8 I5 J10 E22.4
樹脂を押出す長さを現在の長さから22.4mmに変更し、樹脂を押出しながら、かつ、 中心点(5,10)から一定の距離を維持しながら、現在の位置(X, Y)から座標(90.6, 13.8)に時計回りに弧を描いて移動する。
G3: 反時計回りの制御移動(Controlled Move Arc Counter-Clockwise)
Support | FiveD | Teacup | Sprinter | Marlin | Repetier |
---|---|---|---|---|---|
no | no | no | yes | yes |
例: G3 X90.6 Y13.8 I5 J10 E22.4
樹脂を押出す長さを現在の長さから22.4mmに変更し、樹脂を押出しながら、かつ、 中心点(5,10)から一定の距離を維持しながら、現在の位置(X, Y)から座標(90.6, 13.8)に反時計回りに弧を描いて移動する。
G28: 原点に移動する(Move to Origin)
Support | FiveD | Teacup | Sprinter | Marlin | Repetier |
---|---|---|---|---|---|
yes | yes | yes | yes | yes |
例: G28
このコマンドは、RepRap機において、X, Y, Z座標が0の位置に戻す。これは、homingとして知られる処理である。 この処理を速く行うために、移動スピードは加速される。しかし、各座標が1mmのところまで戻るとゆっくりと移動し、その後、止まる。これは、より正確な位置に戻るために行われる。
もし、G28コマンドに座標を指定すると、指定された座標を0と扱われる。つまり、
G28 X0 Y72.3
は、XとZは0に戻るが、Yは0に戻らない。実際の座標は無視される。
G29-G32: Bed probing
G29 Detailed Z-Probe
probes the bed at 3 points.
G30 Single Z Probe
In its simplest form probes bed at current XY location.
Some implementations allow more general behaviour: if a Pn field is specified the probed X, Y, and Z values are saved as point n on the bed for calculating the offset plane. Generally n is 0, 1, or 2. If X, or Y, or Z values are specified (e.g. G30 P1 X20 Y50 Z0.3) then those values are used instead of the machine's current coordinates. A silly Z value (less than -9999.0) causes the machine to probe at the current point to get Z, rather than using the given value. If an S field is specfied (e.g. G30 P1 Z0.3 S) the bed plane is computed for compensation and stored. The combination of these options allows for the machine to be moved to points using G1 commands, and then probe the bed, or for the user to position the nozzle interactively and use those coordinates. The user can also record those values and place them in a setup GCode file for automatic execution.
G31 Report Current Probe status
When used on its own this reports whether the Z probe is triggered, or gives the Z probe value in some units if the probe generates height values. If combined with a Z and P field (example: G31 P312 Z0.7) this will set the Z height to 0.7mm when the Z-probe value reaches 312 when a G28 Z0 (zero Z axis) command is sent. The machine will then move a further -0.7mm in Z to place itself at Z = 0. This allows non-contact measuring probes to approach but not touch the bed, and for the gap left to be allowed for. If the probe is a touch probe and generates a simple 0/1 off/on signal, then G31 Z0.7 will tell the RepRap machine that it is at a height of 0.7mm when the probe is triggered.
In Duet-dc42 firmware, separate G31 parameters may be defined for probe types 0, 1/2, and 3 (probe types 1 and 2 share the same set of parameters). To specify which probe you are setting parameters for, send a M558 command to select the probe type before the G31 command.
Duet-dc42 firmware supports additional parameters S (bed temperature in degC at which the specified Z parameter is correct, default is current bed temperature), and C (temperature coefficient of Z parameter in mm/degC, default zero). This is useful for ultrasonic and other probes that are affected by temperature.
G32 Probe Z and calculate Z plane
probes the bed at 3 or 4 pre-defined points (see M557) and updates transformation matrix for bed leveling compensation.
バッファに格納されないGコマンド
The following commands are not buffered. When one is received it is stored, but it is not acknowledged to the host until the buffer is exhausted and then the command has been executed. Thus the host will pause at one of these commands until it has been done. Short pauses between these commands and any that might follow them do not affect the performance of the machine.
Teacup Firmware buffers G20, G21, G90 and G91.
G4: 一定時間待つ(Dwell)
例: G4 P200
上記の例の場合、200ミリ秒間、何も行わない。この何もしていない間、機械の状態(例えば、エクストルーダーの温度)は、維持される。
Marlinの場合、Sパラメータは秒、Pパラメータはミリ秒を示す。つまり、G4 S2とG4 P2000は同じである。
G10: Tool Offset
Support | RepRapPro | Teacup | Sprinter | Marlin | Repetier |
---|---|---|---|---|---|
yes | no | no | (Retract?) | ??? |
Example: G10 P3 X17.8 Y-19.3 Z0.0 R140 S205
This sets the offset for tool (or in older implementations extrude head) 3 (from the P3) to the X and Y values specified. You can put a non-zero Z value in as well, but this is usually a bad idea unless the tools are loaded and unloaded by some sort of tool changer. When all the tools are in the machine at once they should all be set to the same Z height.
Remember that any parameter that you don't specify will automatically be set to the last value for that parameter. That usually means that you want explicitly to set Z0.0.
The R value is the standby temperature in oC that will be used for the tool, and the S value is its operating temperature. If you don't want the tool to be at a different temperature when not in use, set both values the same. See the T code (select tool) below. In tools with multiple heaters the temperatures for them all are specified thus: R100.0:90.0:20.0 S185.0:200.0:150.0 .
The NIST G-code standard mentions an additional L parameter, which is ignored.
This command is subject to discussion.
Note that Marlin uses G10/G11 for executing a retraction/unretraction move.
G20: 単位をインチに指定する
例: G20
単位をインチに指定する
G21: 単位をインチに指定する
例: G21
単位をミリメートルに指定する (RepRapのデフォルトはミリメートルである)
G90: 絶対的な位置を設定(Set to Absolute Positioning)
例: G90
全ての座標は、マシンの原点からの絶対的な位置となる。(これはRepRapのデフォルトである)
G91: 相対的な位置を設定する(Set to Relative Positioning)
例: G91
全ての座標は、最後の位置の相対的な位置となる。
G92: 位置を指定する(Set Position)
例: G92 X10 E90
現在の座標を指定した値にリセットする。これは、原点に対して絶対座標を指定するプログラムを可能にする。 上記の例は、マシンのX座標を10、押出座標を90に設定する。物理的な移動は起きない。
座標を指定しないG92は、全ての軸を0にリセットする。
バッファに格納されないM及びTコマンド
M0: Stop
例: M0
RepRap機は、バッファの中のデータを残したまま、移動を終了してシャットダウンする。全てのモーター、ヒーターの電源はOFFとなる。マスターコントローラのリセットボタンを押すことによって、再度、開始される。M1, M112参照。
M1: スリープ(Sleep)
例: M1
RepRapマシンはバッファにデータを残したまま動作を終了し、シャッドダウンする。全てのモーター、ヒーターの電源がオフとなる。Gコード、Mコードは、まだ送信することができる。GコードもしくはMコードのどちらか最初のコマンドがRepRapマシンをスリープから復帰させる。M0, M112参照。
M3: スピンドルを時計回りでオンにする(Spindle On, Clockwise (CNC specific))
例: M3 S4000
4000RPMのスピードで、スピンドルをOnにする
M4: スピンドルを反時計回りでオンする(Spindle On, Counter-Clockwise (CNC specific))
例: M4 S4000
スピンドル(Spindle)を反時計回りでスピード4000RPMでオンする。
M5: Spindle Off (CNC specific)
例: M5
スピンドルをOffにする。
M7: ミストクーラントをオンにする(Mist Coolant On (CNC specific))
例: M7
(もし、利用できるならば、)ミストクーラントをオンにする
ミストクーラントは以下の映像。 https://www.youtube.com/watch?v=tXcSk3PkaHY
M8: フラッドクーラントをオンにする(Flood Coolant On (CNC specific))
例: M8 (もし利用できるならば、)フラッドクーラントをオンにする
フラッドクーラントは以下の映像。 https://www.youtube.com/watch?v=IkmbmzDuKnE
M9: クーラントをオフにする(Coolant Off (CNC specific))
例: M9
全てのクーラントシステムをオフにする
M10: バキュームをOnにする(Vacuum On (CNC specific))
例: M10
ゴミを取り除くバキューム(掃除機)システムをOnにする
M11: バキュームをOffにする(Vacuum Off (CNC specific))
例: M11
ゴミを取り除くバキューム(掃除機)システムをOffにする
M17: 全てのステッパーモーターの電源を入れる(Enable/Power all stepper motors)
例: M17
全てのステッパーモーターの電源を入れる or オンにする
ステッパーモーター http://simple.wikipedia.org/wiki/Stepper_motor
M18: 全てのステッパーモーターの電源をオフ or 回転をオフ(Disable all stepper motors)
例: M18
全てのステッパーモーターの電源をオフ or 回転をオフにする そして、(軸に自由に動作することを許可する???)
Disables stepper motors and allows axis to move 'freely.'
M20: SDカード上のファイルをリストアップする(List SD card)
例: M20
SDカードのルートフォルダの全てのファイルをリストアップしシリアルポートに対して出力する。 これは、以下のような出力となる。
ok Files: {SQUARE.G,SQCOM.G,}
最後のカンマはオプションである。ファイル名は大文字で出力される。 M23コマンドが送られたとき、ファイル名は小文字にしなければならない。
M21: SDカードの初期化(Initialize SD card)
例: M21
SDカードは初期化される。プリンタの電源がONになったときSDカードがロードされているならば、デフォルトで初期化が起こる。 SDカードは他のSDカードの機能を動作させるために初期化されなければならない。
M22: SDカードの取り外し(Release SD card)
例: M22
SDカードはリリースされ、物理的に取り外すことができる。
M23: SDカードからファイルを選択する(Select SD file)
例: M23 filename.gco
M23 ファイル名
finename.gco(8.3 ファイル名の命名規則をサポートすること)として指定されたファイルを印刷するために選択する。。
M24: SDカード上のファイルからの印刷を開始もしくは再開する(Start/resume SD print)
例: M24
M23コマンドで選択されたファイルから印刷する
M25: SDカードからの印刷を一時停止する(Pause SD print)
例: M25
M23コマンドで選択されたファイルの現在の位置で、SDカードからの印刷を一時停止する。
M26: SDカードの位置を指定する(Set SD position)
例: M26
SDカードの位置をバイト単位で指定する。(M26 S12345).
M27: SDカードからの印刷のステータスをレポートする(Report SD print status)
例: M27
SDカードからの印刷のステータスをレポートする
M28: SDカードに書き込みを開始する(Begin write to SD card)
例: M28 filename.gco
M28 ファイル名
指定されたファイル名のファイルがSDカード上に作成される。プリンタに送信された全てのコマンドがそのファイルに書き込まれる。
M29: SDカードに書き込む(Stop writing to SD card)
例: M29 filename.gco
M29 ファイル名
M28コマンドでオープンしたファイルをクローズする。プリンタに送信された全てのコマンドは、 送信された順番に通常通り実行される。
M30: SDカード上のファイルを削除する(Delete a file on the SD card)
例: M30 filename.gco
M30 ファイル名
filename.gcoを削除する。
M32: SDカードからファイルを選択し、SDカードからの印刷を開始する(Select file and start SD print)
例: M32 filename.gco M32 ファイル名
Marinで使用可能。
M40: Eject
If your RepRap machine can eject the parts it has built off the bed, this command executes the eject cycle. This usually involves cooling the bed and then performing a sequence of movements that remove the printed parts from it. The X, Y and Z position of the machine at the end of this cycle are undefined (though they can be found out using the M114 command, q.v.).
See also M240 and M241 below.
M41: Loop
Example: M41
If the RepRap machine was building a file from its own memory such as a local SD card (as opposed to a file being transmitted to it from a host computer) this goes back to the beginning of the file and runs it again. So, for example, if your RepRap is capable of ejecting parts from its build bed then you can set it printing in a loop and it will run and run. Use with caution - the only things that will stop it are:
- When you press the reset button,
- When the build material runs out (if your RepRap is set up to detect this), and
- When there's an error (such as a heater failure).
M42: Stop on material exhausted / Switch I/O pin
M42 in ???
Example: M42
If your RepRap can detect when its material runs out, this decides the behaviour when that happens. The X and Y axes are zeroed (but not Z), and then the machine shuts all motors and heaters off. You have to press reset to reactivate the machine. In other words, it parks itself and then executes an M0 command (q.v.).
M42 in Marlin/Sprinter
Example: M42 P7 S255
M42 switches a general purpose I/O pin. Use M42 Px Sy to set pin x to value y, when omitting Px the LEDPIN will be used.
M42 in Teacup
Not needed. General purpose devices are handled like a heater, see M104.
M43: Stand by on material exhausted
Example: M43
If your RepRap can detect when its material runs out, this decides the behaviour when that happens. The X and Y axes are zeroed (but not Z), and then the machine shuts all motors and heaters off except the heated bed, the temperature of which is maintained. The machine will still respond to G and M code commands in this state.