Rules for THC On and THC Off

Having problems with or questions about SheetCam? Post them here.
User avatar
Les Newell
Site Admin
Posts: 2136
Joined: Thu May 11, 2006 8:12 pm

Re: Rules for THC On and THC Off

Post by Les Newell » Wed Apr 17, 2019 4:13 pm

And if you read this, what you will think about this software?
That is an annoying bug but it is easily fixed in a post processor. Use:
post.SetOptions(post.ARC_SEGMENTS)
This will break circles into at least 2 arcs.
Regarding the rules I can not describe exactly what the problem creates, just the rules do not work as a system but they interfere with each other.
I put quite a lot of work into making the rules not interfere with each other. They can (and often do) overlap but SheetCam does it's best to sort out the overlaps in a logical way. For feed rates, the rule with the lowest feed rate will have priority. For THC on and THC off codes only the first and last THC on/off codes will be used.

Make sure you only have one code snippet to turn THC on and one snippet to turn THC off. If you have multiple code snippets for these functions you can get problems when rules overlap.

mancavedweller
Posts: 66
Joined: Tue Feb 25, 2014 6:53 am

Re: Rules for THC On and THC Off

Post by mancavedweller » Thu Apr 18, 2019 12:06 am

stivemaster wrote:
Wed Apr 17, 2019 3:23 pm
On the occasion of the UCCNC I will give a link and only say that they have codes that work in sync really BUT they MUST BE ACTIVATED AT THE PRESENT TIME OF THE G CODE !!!
If I had a simple straight line 100mm long and I used Path Rules to insert M205 (THC on) 10mm after the start, and M206 (THC off) 10mm before the end, the generated gcode will put M205 at the 10mm point and M206 at the 90mm point on the line.

There is no "timing" involved, it is just generated gcode and the synchronous commands being placed in the gcode at the correct positions. In UCCNC the gcode commands are then sent to the motion control in a transmit buffer, and the "real" timing is done there in a fast ARM microcontroller.
In my experience so far, synchronous commands do exactly what you expect them to do, and where you expect them to do it.

As I mentioned earlier, my testing showed there was great accuracy in the positional placement of the synchronous commands and very accurate execution of those synchronous commands, without any interruption at all to the step pulse stream. If Sheetcam Path Rules generated gcode to put a synchronous command at say X10.41 mm, then that is exactly where that synchronous command would be placed and executed.

And as mentioned earlier I tested this accuracy by recording the step pulse stream and the synchrounous O/P with a logic analyser, and painstakingly counting the quantity of step pulses to get an idea of the accuracy of the operation of the synchronous command. Accuracy was very high, to about plus or minus one step pulse.

stivemaster
Posts: 13
Joined: Sat Apr 13, 2019 6:46 am

Re: Rules for THC On and THC Off

Post by stivemaster » Thu Apr 18, 2019 7:39 am

Unfortunately, I would not say that this will help even I think it will worsen the situation. Holes should be treated as holes or even shapes and holes like arcs because in the case of offshore, it should be off-off and other off-on. I get a picture to show what I want Sheetkam to do.
The purpose is if I have set only one variable, we give (minimum distance) = 15mm, the software will define all zones with R <15mm including holes, arcs and angle (in the picture are red) and add where necessary 15mm are zones with blue) before and after these zones, where THC does not work again.
Primer za Les-Model.pdf
(4.86 KiB) Downloaded 6 times
Dear mancavedweller, we are going back to the beginning because we are talking about the same things, but you just do not want to find out what I suggested. That their codes work well does not mean that they turn alone when needed !!!
And I'm sure you have what to say constructively if you think about it because the ability to explore UCCnC actions means you are the right person , in my opinion

User avatar
Les Newell
Site Admin
Posts: 2136
Joined: Thu May 11, 2006 8:12 pm

Re: Rules for THC On and THC Off

Post by Les Newell » Thu Apr 18, 2019 11:54 am

Looking at your pdf it looks pretty straight forward to do that using a few rules.

stivemaster
Posts: 13
Joined: Sat Apr 13, 2019 6:46 am

Re: Rules for THC On and THC Off

Post by stivemaster » Thu Apr 18, 2019 2:18 pm

I have already described the problem - in the end, just before M5 there is always a code for the release of THC.

User avatar
Les Newell
Site Admin
Posts: 2136
Joined: Thu May 11, 2006 8:12 pm

Re: Rules for THC On and THC Off

Post by Les Newell » Thu Apr 18, 2019 2:54 pm

Could you post an example job file here on the forum so I can take a look.

stivemaster
Posts: 13
Joined: Sat Apr 13, 2019 6:46 am

Re: Rules for THC On and THC Off

Post by stivemaster » Thu Apr 18, 2019 5:07 pm

I use a modified by me post Mach3 plasma. The code for THC are M10Q255 and M11. I put them with a space forward to be seen easily.
triagalna.tap
(1.15 KiB) Downloaded 4 times
triagalna.job
(6.83 KiB) Downloaded 2 times

User avatar
Les Newell
Site Admin
Posts: 2136
Joined: Thu May 11, 2006 8:12 pm

Re: Rules for THC On and THC Off

Post by Les Newell » Fri Apr 19, 2019 12:23 pm

I found one problem. In your 'On small shapes' rule you have your start code and end code both set to 'thc off'. This will output more THC off commands than you expect.
Is the 'THC on' at the end of the cut a problem? This is enabling the THC ready for the next cut. If this is causing a problem for you, you could add a THC off command in your OnPenUp() function in the post.

stivemaster
Posts: 13
Joined: Sat Apr 13, 2019 6:46 am

Re: Rules for THC On and THC Off

Post by stivemaster » Fri Apr 19, 2019 3:21 pm

I have grown the THC to work extremely fast, and when this happens, it switches on just before the plasma stops, and then the Z axis travels about 3mm downward to activate the anti-collision sensor. That is why I use only some rules and manually set the action point where it is needed. That's why I opened this topic too. If I myself could program a python so far I would have done it and I would not have persuaded you how much it would make it easier I would just suggest it for you.
In the end, do you think it is so difficult to make such an algorithm that, if it is set at a minimum distance, divides the internal shapes and the contour into parts where the direction is changed for a distance less than or equal to the specified distance. It does not matter whether it is an arc if the arc R is less than or equal to the minimum distance or angle. So it automatically adds this distance before and after these zones and there we have THC Off.
In the beginning after the start THC is again Off until the zone after the Lead in + minimum distance then THC becomes On. So follow - minimum distance + angle + minimum distance, ........... to the end where there is a minimum distance + Lead out. I hope you understand me ! ?

User avatar
Les Newell
Site Admin
Posts: 2136
Joined: Thu May 11, 2006 8:12 pm

Re: Rules for THC On and THC Off

Post by Les Newell » Fri Apr 19, 2019 5:00 pm

This is exactly what rules were designed to do. The only problem you seem to be seeing is that it turns the THC back on at the end of the cut. As I said it is easy enough to modify the post to turn it back off again.

stivemaster
Posts: 13
Joined: Sat Apr 13, 2019 6:46 am

Re: Rules for THC On and THC Off

Post by stivemaster » Fri Apr 19, 2019 5:55 pm

I start thinking that you do not understand what I mean and what is valuable in what I offer, so I will try to analyze the rules that you have created:
1.After start - this rule is not done well because it does not conform to the Lead in length and should always be changed! If it has to be configured as THC Off-Off, it does not make sense for it.
2.On Lead in - enters into a conflict apparently with the arc rule if Lead in is an arc - also not a good enough solution!
3.On corners - the fact that there are three rules for corners is a bad decision because it complicates logic and makes ambiguous assumptions about what exactly they are serving!
4. On small chapes / circles - the fact that here again two rules is also strange and unclear!
5.On arcs - conflicts with both Lead in and Lead out if they are arcs because the logic is different!
6.Near pierce - I have no idea what this rule is intended for!
Now let's imagine that these rules replace them only as a variable - a minimum distance! This distance will be determined experimentally on each machine by the way I described earlier and the post will be included in a formula to proportionally increase this distance along with the change of F.
And finally, I make the offer completely free without expecting anything in return. For me, it's important for people who like Sheetcam like me to enjoy the program even more easily and with no effort and nerves !!!

Post Reply