; This demonstrates doing an M61 remapped to a named oword sub ; ; to activate, incantate as follows in the ini file: ; ; [RS274NGC] ; # remap M61 to a named oword subroutine. ; # parameter #1: the Q value ; M61_COMMAND=ocall ; ; O sub ; ; O if ;; trigger error report ; (DEBUG,m61demo.ngc: M61 Q=#1) ; test fail-change line from gladevcp M66 P2 L0 O if [#5399 EQ 1] (DEBUG, digital-input-02=#5399 - returning -1 to fail M61) ; a return value < 0 fails the M61 O return [-1] O endif ; return the tool number to commit the change. ; return a negative return to abort the interpreter with a message like ; "M61 failed ()" - the tool number will be unchanged ; O endsub [#1] m2