COMPONENT to Enable/Disable THC from within Gcode

More
9 years 6 months ago #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.

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
6 years 9 months ago #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 to join the conversation.

More
6 years 9 months ago #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 to join the conversation.

More
6 years 9 months ago #155073 by Wellingtonv18
I have Plasmac installed, but i dont know where i can put this file

Please Log in to join the conversation.

More
6 years 9 months ago #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

Please Log in to join the conversation.

More
6 years 9 months ago #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 to join the conversation.

More
6 years 9 months ago #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.
wellingtonv.k.silva@hotmail.com

Please Log in to join the conversation.

More
6 years 9 months ago #155086 by phillc54

Wellingtonv18 wrote: 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.

Please Log in to join the conversation.

Time to create page: 1.736 seconds
Powered by Kunena Forum