<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CNC programming - M function</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/ffa67d7820/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Motion/thread/ffa67d7820/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Motion/thread/ffa67d7820/</id><updated>2020-02-27T18:39:12.803000Z</updated><subtitle>Recent posts to CNC programming - M function</subtitle><entry><title>CNC programming - M function</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/ffa67d7820/?limit=25#6e6e" rel="alternate"/><published>2020-02-27T18:39:12.803000Z</published><updated>2020-02-27T18:39:12.803000Z</updated><author><name>dwpessoa</name><uri>https://forge.codesys.com/u/dwpessoa/</uri></author><id>https://forge.codesys.comf0c60c8ad51ebaafc44e09ecc9056e162108490c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Peter,&lt;/p&gt;
&lt;p&gt;I don't know if you can find a solution yet, but I'll post an answer here, because it might be useful for someone else.&lt;/p&gt;
&lt;p&gt;When a M function is called, the &lt;span&gt;[SMC_Interpolator]&lt;/span&gt; block will indicate the function number at output &lt;span&gt;[wM]&lt;/span&gt;, and then stop all movements and wait for &lt;span&gt;[bAckM]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;It is possible to send parameters using &lt;span&gt;[SMC_GetMParameters]&lt;/span&gt; too (I didn't get to test this).&lt;/p&gt;
&lt;p&gt;According to DIN 66025, there are some fixed M-functions (like M30 = end program), but I did not find a definition in the codesys documentation. As far as I tested, the limit for function M would be 2^16.&lt;/p&gt;
&lt;p&gt;\o_&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CNC programming - M function</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/ffa67d7820/?limit=25#08a4" rel="alternate"/><published>2020-02-27T18:39:11.674000Z</published><updated>2020-02-27T18:39:11.674000Z</updated><author><name>Peter.skokanek</name><uri>https://forge.codesys.com/u/peter-skokanek/</uri></author><id>https://forge.codesys.com3679b25f10f5e0d88228c79d7a473a0bfd13a7b8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
Is it possible to find somewhere more detailed description how to use M function. The explanation in "Codesys online Help" is not very usefull.&lt;br/&gt;
Peter&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>