Page 1 of 1

Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Fri Sep 23, 2016 7:51 am
by shad
Hi Balazs,
Is there a possibility to check current THC ON/OFF state inside plugin when the M205/M206 macros executes?
May be "THCenabled" (LED #66) - exactly what I needed?

Re: Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Fri Sep 23, 2016 12:54 pm
by cncdrive
Hi Andrej,
Currently there is no THC enabled output, but I talked to my collegue and we can easily add one.
The signal you can also read from the LED code you mentioned, that is refreshed in about 60msec intervals.

Re: Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Fri Sep 23, 2016 3:23 pm
by shad
I understand. 60 msec is very slow. On the 6000 mm/min cutting speed it's will be 6 mm of the moves.
May be there is a way to refresh this LED for example every 10 msec. Or just add function for check THC state?
This is very important for THC. Just I like you antidive future based on the checking acceleration/deceleration of the moves, because we need to insert all codes for THC ON/OFF during cutting in the CAM program (corners, end of cut, holes.....) and this is a problem - rules any time works incorrectly.
All industrial CNC has this future inside CNC kernel.
So it's will be great to add all futures for THC to the UCCNC.

Re: Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Fri Sep 23, 2016 4:56 pm
by cncdrive
Currently the API is getting the THCenabled signals with 50Hz (20msec),
but as said the update on the screen and LEDs is done in a 60msec loop, I did not think this is required with so high latency.

I don't think we can do much better than 20msec, I mean we probably could make it faster with the ethernet controllers, but not with the USB ones.
Also there may be some small variations in the update frequency, because you know Windows is not realtime and this 20msec time interval is so low.
And then your plugin has to send the data down to your THC controller which again takes some time.

I think it would be better to go the way which Keith adviced is to create a configurable physical output on the motion controller for the THC enable signal
and then connect that directly to your THC controller. This way the data can be there with no delays, realtime-like.
What do you think?
Do you have a THC enabled signal input on your THC?

All industrial CNC has this future inside CNC kernel.


Yes, the UCCNC also handles the THC internally, enabling and disabling the THC in syncron with the motion buffer,
but to output this information to the external world is the not so easy task. :)

Re: Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Fri Sep 23, 2016 11:51 pm
by shad
OK, In this case, the best solution is to use a hardware output that will not have any time-delay. All my controllers has hardware input for THC ON/OFF.
We will wait new UCCNC release.
Also please do not forgot to add UC.Getbuttonstate function to the plugin entry.
Thank you!

Re: Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Sun Sep 25, 2016 10:22 am
by shad
Balazs, please tell me how fast THC Antidive function works? I am about calculating and update period.
Thank you!

Re: Check current THC ON/OFF state when the M205/M206 issue

PostPosted: Sun Sep 25, 2016 1:32 pm
by cncdrive
It works instant.