Rules for THC On and THC Off

Having problems with or questions about SheetCam? Post them here.
User avatar
Les Newell
Site Admin
Posts: 2179
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: 81
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: 18
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 17 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: 2179
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: 18
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: 2179
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: 18
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 8 times
triagalna.job
(6.83 KiB) Downloaded 4 times

User avatar
Les Newell
Site Admin
Posts: 2179
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: 18
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: 2179
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: 18
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 !!!

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

Re: Rules for THC On and THC Off

Post by stivemaster » Fri Apr 26, 2019 7:29 am

Hello, Les you think about a poll in the forum about the cutting rules. Allow it to evaluate each of the rules.
Such a poll could give rise to a topic with suggestions for improvements and help you rethink some things.

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

Re: Rules for THC On and THC Off

Post by Les Newell » Fri Apr 26, 2019 3:43 pm

Go ahead and make a poll. Go to the new features forum and select new topic. At the bottom of the text box you will see a tab that allows you to create polls.

rodw
Posts: 12
Joined: Fri Feb 15, 2019 3:35 am

Re: Rules for THC On and THC Off

Post by rodw » Wed May 01, 2019 10:39 am

Interesting thread. I use LinuxCNC which is coming ahead in leaps and bounds with plasma. Its taken a couple of years of hard work to show people what can be done in LinuxCNC if you forget the paradigms set by Mach3 and external THC's when we have access to the trajectory planner and the full power of a 64 bit CPU running a real time operating system at our disposal. For example, the Velocity anti-dive feature is a trivial exercise requiring about 10 lines of code.

I have to say I had some issues with sheetcam rules for arcs and looked for other solutions. Earlier this year, with some help in the community I identified a couple of mathematical techniques that could be used by a LinuxCNC component to dynamically calculate the radius of an arc as it was being cut at a rate of 1000 times a second on the LinuxCNC servo thread. I coded one of these methods and concluded it did not work. I have not tried the second method which emerged after I started and appeared to have a greater probability of success. I got a bit distracted modifying my table to support ohmic sensing (which was a bigger task than I first thought) but you've reminded me I must revisit this idea.

Our current experimental open source plasma config with internal THC is already regarded as rivalling high end commercial systems and streets ahead of the run of the mill external THC units mentioned here for Mach and UCCNC etc. I don't have any experience to make a call on this.

I've disabled all the sheetcam cutting rules I was using and depend on the antidive feature but I think it would be cool if I can crack the arc radius calculations at the system level outside of the post processor and Gcode as some sophisticated algorithms would follow pretty quickly! One of the issues I had was chain cutting holes in 16mm plate. Slowing the cut for holes was useful but for this job it had to be done on arcs and then it caused problems in sections I did not want to slow down.

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

Re: Rules for THC On and THC Off

Post by stivemaster » Thu May 02, 2019 7:33 pm

First of all, I want to call my colleague that you are on the right track with the Linux CNC. We are also working in this direction and I hope we will soon have a decent result. Look at what I wrote about determining the distance that is critical for changing direction on your machine. Then, if you have enough knowledge to experiment with hall-level LinuxCNC, then you can also take a look at the Python features.
Using free python software, you can analyze each contour and divide it into parts as well as add parts automatically. Part that is a lead in, a part that is executed at a speed other than 100%, a part that is at maximum speed then delay again and so ......
Only in this way can you get a good job. Of course you can always experiment with the M10 / M11 and the time that there are no accelerations and delays that the LinuxCNC can include in real time.
I myself after many experiments with ohmic contact I gave up the complicated circuits and now the machines do them only with a 24 volt circuit and a separate relay power supply is a separate adapter for $ 5. This relay switches on when the burner touches the material and closes the input sample. which can be damaged costs $ 6.

Post Reply