Enable and Disable THC in Gcode

18 May 2018 03:39 - 18 May 2018 03:41 #110831 by rodw
Looking at he source code for master

velocity_tol is a parameter and vel_tol is a pin that is not used anywhere in the code.

I kinda think this is a bug so maybe get JohnT to clarify and update the code.

In my view it really needs to be a pin so it can be changed from the console.

Also it looks like the tolerance is the other way to the way you described earlier so to set a corner lock tolerance that is 90% of requested velocity, velocity_tol needs to be 10% (eg enabled while the velocity is within a tolerance of 10% of the commanded velocity).

Personally, I think I would remove the parameter and replace all instances of the velocity_tol parameter with vel_tol
Last edit: 18 May 2018 03:41 by rodw.
18 May 2018 03:54 - 18 May 2018 04:06 #110832 by islander261

Like I said I am just a hacker. I'm sure I would of found this if I had tried to make it work. I am sure that very few people have actually tried to make this work. I don't know if you can change hal parameter pins on the fly or if they can only be initialized from external code. I t seems a little convoluted to me that you would set the difference in velocity instead of the percentage the way the code is. I guess I am stuck in the old way of doing things.

I am 3/4 of the way to having C********C ported to my hardware ( this is for the PlasmaSpider group that needs the latest sexy GUI). Most of the GUI is done and I can home and jog using my XHB pendant. I will be leaning on your work to get an RS-485 connection using Mesa HW to speak to a HT power supply which I don't have ( maybe Grotius wants to be an alpha tester).

Last edit: 18 May 2018 04:06 by islander261. Reason: expanding reasoning
The following user(s) said Thank You: rodw
18 May 2018 10:21 #110838 by rodw
Flamecutter, after John and I got carried away with this, I noticed in your hal file you had this
#added EW
setp thc.velocity-tol 5 # NOTE: There is a velocity tolerance bug in thc component!!!
As I mentioned, the bug was the pin was never referenced.

Try this replacement thc.comp component

File Attachment:

File Name: thc.comp
File Size:4 KB

I have not checked it compile becasue I've done this on a Chromebook but it should. I think this changed component will solve the bug you had noted in your config. You don't need to change your hal file.
Time to create page: 0.114 seconds
Powered by Kunena Forum