COMPONENT to Enable/Disable THC from within Gcode
25 Apr 2017 11:48 - 25 Apr 2017 11:51 #92051
by rodw
COMPONENT to Enable/Disable THC from within Gcode was created 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.
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.
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.
- Wellingtonv18
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
17 Jan 2020 18:01 #155068
by Wellingtonv18
Replied by Wellingtonv18 on topic COMPONENT to Enable/Disable THC from within Gcode
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
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.
17 Jan 2020 19:00 #155071
by rodw
Replied by rodw on topic COMPONENT to Enable/Disable THC from within Gcode
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
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.
- Wellingtonv18
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
17 Jan 2020 19:23 #155073
by Wellingtonv18
Replied by Wellingtonv18 on topic COMPONENT to Enable/Disable THC from within Gcode
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.
17 Jan 2020 19:43 - 17 Jan 2020 19:43 #155074
by AgentWD40
Replied by AgentWD40 on topic COMPONENT to Enable/Disable THC from within Gcode
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
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.
- Wellingtonv18
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
17 Jan 2020 20:14 #155077
by Wellingtonv18
Replied by Wellingtonv18 on topic COMPONENT to Enable/Disable THC from within Gcode
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.
- Wellingtonv18
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
17 Jan 2020 20:43 #155080
by Wellingtonv18
Replied by Wellingtonv18 on topic COMPONENT to Enable/Disable THC from within Gcode
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.
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.
17 Jan 2020 23:27 #155086
by phillc54
What do you mean by "autostart"?
Please keep support correspondence on the forum so other users may benefit.
Replied by phillc54 on topic COMPONENT to Enable/Disable THC from within Gcode
Plasmac uses motion.digital-out-02 pin to enable/disable THC from GCode as described in the PlasmaC User GuideI'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.
What do you mean by "autostart"?
Please keep support correspondence on the forum so other users may benefit.
Please Log in or Create an account to join the conversation.
Moderators: snowgoer540
Time to create page: 0.087 seconds