===== Tangential knife (Oscillating knife) control in myCNC ===== //NOTE: This article is superseced by the newer manual on tangential cutting control: [[quickstart:mycnc-quick-start:tangential-knife-setup|Tangential Cutting Setup]]// ---- myCNC software has built-in features for tangential knife control. ==== What is Tangential control in myCNC ==== Tangential knife control activated if the value of "1" is written into Global variable #7005. In this case, input g-code file is modified automatically to support tangential knife: - Positioning blocks (G0-code) is modified. CNC Control software looks at the next motion code, calculates motion direction angle and add C-axis rotation into the G0 code to follow the next motion. - For Arc interpolation codes (G2, G3) - CNC control add C-axis rotation to follow motion direction - For Linear interpolation (G1 code) - CNC control calculates an angle between two line segments and - If the angle less than **Knife Min Angle**, then C-axis rotation built-in into the G1 line to follow motion direction on smooth curves. - else If the angle less than **Knife Min Angle (2) **, then C-axis rotation is added between the lines and made in the material - else Lift up, C-axis rotation and Move Down is added between the lines to handle sharp corners. All this control is performed automatically if global variable #7005 is set to "1". There are many possible ways to set the variable and have tangential control enabled permanently or switched on-off on-the-fly (for example if switching between Spindle, Marker and tangential nife in G-code program) ==== How to enable Tangential Control permanently ==== It's possible to set the variable #7005 by checking a "Knife Enabled" checkbox in "Tangential Knife" configuration widget. {{mycnc:setup:mycnc-tangential-knife-001.png}} The #7005 variable can be set in Software PLC, "HANDLER_INIT.plc". Software PLC procedure HANDLER_INIT is running at the start of myCNC control software right after a complete configuration sent to the controller. It's very easy to add a line to set the variable 7005 - gvarset(7005,1); For example main() { gvarset(60000,1); //run Servo ON procedure gvarset(7005,1); //Enable Tangential Knife control exit(99); }; {{mycnc:setup:mycnc-tangential-knife-002.png}} {{youtube>gU8MtJpsN8o?800x500}}