COMPONENT to Enable/Disable THC from within Gcode

More
25 Apr 2017 11:48 - 25 Apr 2017 11:51 #92051 by rodw
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: jo_key, tommylight

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 18:01 #155068 by Wellingtonv18
Hi, please say me, where and how i will put this file?
I have a plasma with gmoccapy and i have problema with the THC, your code will solved my headache :)

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 19:00 #155071 by rodw
You need to compile and install it using halcompile.
Its been obsoleted by the Plasmac config which does this in different ways and is now a part of the Linuxcnc core code. See
linuxcnc.org/docs/devel/html/plasma/plasmac-user-guide.html

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 19:23 #155073 by Wellingtonv18
I have Plasmac installed, but i dont know where i can put this file

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 19:43 - 17 Jan 2020 19:43 #155074 by AgentWD40
I think what Rod is saying is that you don't need this file anymore. PlasmaC has the functionality built in.
linuxcnc.org/docs/devel/html/plasma/plas...user-guide.html#_thc
Last edit: 17 Jan 2020 19:43 by AgentWD40.

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 20:14 #155077 by Wellingtonv18
I'm sorry for my ignorance, I used this code before, but it didn't work, my Plasmac doesn't seem to recognize this command ... another problem I'm having is with "autostart" when I activate it, it doesn't reference the z axis every time before starting the cut, and turns on the torch very high, he is referencing only in the first cut and in the next ones this problem happens.

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 20:43 #155080 by Wellingtonv18
I need someone to help me with my machine to keep it running smoothly, Rod, I'm going to leave my email and I kindly ask you to contact me, thanks.
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

More
17 Jan 2020 23:27 #155086 by phillc54

I'm sorry for my ignorance, I used this code before, but it didn't work, my Plasmac doesn't seem to recognize this command ... another problem I'm having is with "autostart" when I activate it, it doesn't reference the z axis every time before starting the cut, and turns on the torch very high, he is referencing only in the first cut and in the next ones this problem happens.

Plasmac uses motion.digital-out-02 pin to enable/disable THC from GCode as described in the PlasmaC User Guide

What do you mean by "autostart"?

Please keep support correspondence on the forum so other users may benefit.
The following user(s) said Thank You: Clive S, rodw, thefabricator03

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.087 seconds
Powered by Kunena Forum