<p>I have been playing around with creating scripts to generate some custom G-code for a Malyan M180 and I am having trouble understand what commands to use to switch nozzles. Sometimes I can get the nozzles to switch and it doesn't recenter but sometimes it does.
I have been using:</p>
<pre><code>G54
M108 T0; switch to left
</code></pre>
<p>and</p>
<pre><code>G55
M108 T1; switch to right
</code></pre>
<p>Has anyone else looked into this and have any idea what commands or sequence of commands should be used to change nozzles?</p>

No, M108 does not do that. You are looking for
T#
, where # is the tool position you want:
```
```
T1 ; switch to tool position 1 

T3 ; switch to tool position 3
```
```
This tells the processor to send all heating, cooling and flow commands to this tool until another tool change is specified, and invokes the X/Y(/Z) offset for the new tool position.
See
http://reprap.org/wiki/G-code#T:_Select_Tool