Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

CNC programming - M function

Motion
2018-06-22
2019-12-13
  • Peter.skokanek

    Peter.skokanek - 2018-06-22

    Hello,
    Is it possible to find somewhere more detailed description how to use M function. The explanation in "Codesys online Help" is not very usefull.
    Peter

     
  • dwpessoa

    dwpessoa - 2019-12-13

    Hello Peter,

    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.

    When a M function is called, the [SMC_Interpolator] block will indicate the function number at output [wM], and then stop all movements and wait for [bAckM].

    It is possible to send parameters using [SMC_GetMParameters] too (I didn't get to test this).

    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.

    \o_

     

Log in to post a comment.