COMPONENT to Enable/Disable THC from within Gcode

More
25 Apr 2017 11:48 - 25 Apr 2017 11:51 #92051 by rodw
rodw created the topic: COMPONENT to Enable/Disable THC from within Gcode
Spurred on by John The Islander, I've written a component that allows you to use the eoffset_pid component's hold_request pin to turn off THC control from within Gcode. Why would you want to do that?

Well if you are using Sheetcam to generate your gcode, you can create cutting rules that can be inserted at certain points in the generated code. It is common practice to disable THC as you approach a corner and only enable it as you get past the corner.

M68 E0 Q10 will hold THC control and
M68 E0 Q20 will resume THC control

To be consistent with existing post processors, a value of 10-19 will hold the THC and 20-29 will re-enable THC control. In some systems, the second digit is used to alter the preset amps but if you are like me, you don't have that control on your plasma cutter anyway.

If you use the right sheetcam post processor, the snippets of code to achieve this will already exist in sheetcam so you just need to set up the cutting rules. If you do a bit of googling or watch a few youtube tutorials, you will soon come up with a few cutting rules.

Note that M68 sends a float over to Hal and this code currently converts that to an int to save a few clock cycles. I don't think there is any reason to change that but be aware that this will round your input down to the nearest whole number.

Note that this component will be competing with my kerfcrossing component for access to the eoffset_pid.hold_request pin. In a complete setup, you will need to or2 the output from the two components before requesting the THC to hold.

Please review the text file which contains documentation from the man command, including an example config.

If anybody has any comments, questions or feedback, please update this thread.

File Attachment:

File Name: gcodehold_...4-25.txt
File Size:1 KB

File Attachment:

File Name: gcodehold_...-25.comp
File Size:1 KB
Attachments:
Last Edit: 25 Apr 2017 11:51 by rodw.
The following user(s) said Thank You: tommylight
Time to create page: 0.117 seconds
Powered by Kunena Forum