<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>

[{'answer_id': 3697, 'author': 'Davo', 'author_id': 4922, 'author_profile': 'https://3dprinting.stackexchange.com/users/4922', 'pm_score': 3, 'selected': True, 'text': '<p>No, M108 does not do that. You are looking for <strong>T#</strong>, where # is the tool position you want:</p>\n\n<pre><code>T1 ; switch to tool position 1 \n\nT3 ; switch to tool position 3 \n</code></pre>\n\n<p>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.</p>\n\n<p>See <a href="http://reprap.org/wiki/G-code#T:_Select_Tool" rel="nofollow noreferrer">http://reprap.org/wiki/G-code#T:_Select_Tool</a></p>\n'}, {'answer_id': 15454, 'author': 'Yannik Z.', 'author_id': 26522, 'author_profile': 'https://3dprinting.stackexchange.com/users/26522', 'pm_score': 1, 'selected': False, 'text': '<p>As @tbm0115 has mentioned - it differs. Your <code>M108 T{index of tool}</code> command is perfectly fine on some FlashForge printers, a company known for its different sorts of proprietary code. It is indeed used for tool changing here.</p>\n<p>While on the common Marlin firmware (e.g. used on the popular Creality Ender printers), <code>M108</code> does a completely different thing-namely acting as a break sequence if the G-code parser is in a closed-loop-condition (after certain commands like <code>M109</code> that wait until a certain action takes place).</p>\n'}]
['https://3dprinting.stackexchange.com/questions/3696', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/1476/']