Speed reduction on small holes (plasma)

dan721
Posts: 11
Joined: Sat Dec 28, 2019 7:55 pm

Speed reduction on small holes (plasma)

Post by dan721 »

Hello.
I'm trying to implement speed reduction when cutting small holes.
I've set my CAM to push M3 for normal cutting and M103 for small holes.
When M103 is run, I want to set feed overspeed (gvar 7072) to value given by user, and recover it in M5.
When I change gvar 7072 in hardware PLC (M103), it changes on the screen, but the cutting speed stays the same. When I press + or - in ovespeed section on the screen, it's incremented/decremented from the "old" value (before writing it in M103).
I guess that I need to push some message to the controler to update the overspeed value. The same is about the feedrate gvars.
Maybe you have some better way to have such feature?
It's important for me to have feedrate value which is dependant on the feedrate from cutchares. Maybe it's possible to add a second cutting speed to cutchart?

ivan
Posts: 296
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Speed reduction on small holes (plasma)

Post by ivan »

The path planner will plan out the motion path and the speeds prior to the start of the program, while if you are launching a PLC from within the program code, that will run after the path has already been calculated. The only way to set the speed currently is to have it in the original program code when loading the program - that can be achieved through using a CAM which is capable of that (from what I remember, a CAM like WRYKRYS is able to do so: http://www.wrykrys.cz/en/)

We are looking at small hole speed reduction as a feature built-in natively into myCNC, however, it will probably take us a little while to implement it. If you have any suggestions about how the speed reduction should be done, we can consider them when implementing our native version - things like whether you want only two speeds (normal and low) or some sort of a sliding scale of speeds depending on the hole radius, etc.

dan721
Posts: 11
Joined: Sat Dec 28, 2019 7:55 pm

Re: Speed reduction on small holes (plasma)

Post by dan721 »

Thanks for a fast reply.
I have in mind that the path planner looks forward in code, so I thought about changing the feed override (because it works in realtime as the user clicks +/- buttons on the screen). Isn't it possible to do the same thing as +/- buttons in the KSpinBox2, but in PLC?

I'm using WRYKRYS, but in that software you have two options: hardcoded feedrate like F3000 line in g-code or use different start/stop macros for small holes (small loops in general). The problem is that you can't build-in the cutcharts in WRYKRYS - if you want to hardcode the feedrate, user has to input it manually each time according to sheet thickness.

In another CAM software, LANTEK (much more expensive and powerful) you can assign the cutting technology (for example cut1, cut2, cut3) to part edges depending on what cutting precision is needed. It usually involves holes (not necessairly circular), but not always, so I don't recommend you implementing speed reduction as built-in myCNC algorithm which detects small holes. I'd rather do it as a separate process, like marking - where the information of speed reduction is included in g-code, but the feedrate value depends on cutcharts and/or some variable controlled by user (like reduction factor).

I don't think that a sliding scale is needed - up to 3 cutting speeds should be enough.

The same need appears in laser cutting.

To sum up, I have to do the speed reduction in myCNC, otherwise the cutcharts feature in myCNC (which i appreciate very much) is unuseful for me.

ivan
Posts: 296
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Speed reduction on small holes (plasma)

Post by ivan »

The feed override on the KSpinBox2 does it in a way that will speed up or slow down everything, including acceleration. For that reason it will not be ideal, as the acceleration still needs to be fairly high when switching between the low and the normal speeds, as opposed to being tied to the motion speed. To be clear, you can still do it through feed override, but it is probably not the best solution.

Alternatively, you can create something like two macros (not PLCs) named something like M103 and M203 for normal and slow cutting. Inside these two macros you can add something like the following two lines

Code: Select all

G10 L80 P7605 Q1000 (cut speed set to 1000)
M3
and

Code: Select all

G10 L80 P7605 Q500 (cut speed set to 500)
M3
Macros, as opposed to PLCs, should be able to influence the path planner by virtue of being effectively G-code. In this setup, you should not be using M3 anywhere in the G-code, just M103 and M203 (or their equivalents).

I'll be testing to see how this works - you can do likewise if you have more ideas on how you would want to use these macros.

dan721
Posts: 11
Joined: Sat Dec 28, 2019 7:55 pm

Re: Speed reduction on small holes (plasma)

Post by dan721 »

I've created such macros, but with [#gvar] notation to have feedrate which depends on cutcharts values, but when I stop the g-code and change the cutting speed in user-speed-plasma tab, it changes #7031 and #7032 only, where #7030 and #7605 (in macros I write to 7605 as you suggested) remain with old values: (5588 is the old cutting speed, 4500 is the new one)
3.PNG
3.PNG (5.94 KiB) Viewed 332 times
On the other side, writing to 7605 from macro affects 7605 and 7030 values only, and the real velocity changes too.
The result is that the speed reduction in g-code works fine, but it doesn't see the changes of cutting speed which user does, even when g-code is stopped.

PS: What is the way of changing speed for plasma marking? Is it set natively based on number of called macro/PLC? I don't see any instruction that sets the speed in M45 for example...

ivan
Posts: 296
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Speed reduction on small holes (plasma)

Post by ivan »

The #GVAR notation is not implemented to be registered fully on-the-fly, unfortunately - the only way to change values reliably would be through the G10 L80 command. This will also override the user input from the user settings, as you are effectively setting a command in the G-code to have a certain feed rate at a certain point in the program. We'll try to think of something.

Marking speed (for M45) is changed through the user settings:

Image

dan721
Posts: 11
Joined: Sat Dec 28, 2019 7:55 pm

Re: Speed reduction on small holes (plasma)

Post by dan721 »

By the #gvar notation I meant:
G10 L80 P7605 Q [ #98 ],
and it works well (i control #98 via soft PLC basing on the nominal cutting speed and reduction factor set by the user), but then the user input doesn't take effect on cutting speed.
The question about marking speed was about how it works inside - how the software knows if it's cutting or marking process? I thought about treating small holes as a different process like marking.

ivan
Posts: 296
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Speed reduction on small holes (plasma)

Post by ivan »

You can use the G10 L80 P7605 Q [ #98 ] command, however what will happen is the program will use a value for #98 that was recorded at the start of the program (upon pressing the Start button). That means that any changes to #98 will not have an impact on the cutting speed after the Start button is pressed.

L80 is designed to write a constant into a global variable. What will probably be beneficial to you is the L81 command, which is designed to copy a value from Register Address Q to Register Address P instead - we will be releasing an update soon which will allow you to use that. I'll let you know when it's out.

For marking speed, it is done through the M45 and M46 PLC commands to start and stop plasma marking, that's what indicates to the program to use the marking speed. However, if the program code contains f-code to set the feed rate, that feed rate will supersede the marking speed (which has been set through the User Settings), even if the f-code is used before the M45 PLC is called. Marking speed is also set once, and does not change unless the operator changes it - from what I understand, this is fairly different from your case where the hole cutting speed changes on every cutting job.

dan721
Posts: 11
Joined: Sat Dec 28, 2019 7:55 pm

Re: Speed reduction on small holes (plasma)

Post by dan721 »

I've done speed reduction using M45/M46 (myCNC treats small holes as plasma marking). I'm setting "marking speed" (which is small holes cutting speed for me) in an infinite soft PLC loop as cutting_speed*slowdown_factor, where slowdown_factor is given by the user. I haven't tested it deeply yet, but appears to work correctly.
I'm looking forward to some built-in functionality, because in future machines I'll be probably using plasma marking. Slowdown on small holes is commonly used in plasma cutters and gives a remarkable improvement in cutting quality.
The second, more generic way is to implement some feature of creating and assigning many different feedrates to PLC's/macros. Just like it is about M3s and M45s, but customizable.
Thanks for your support and quick replies. I have some experience with other control systems for plasma/laser cutters and I'll be glad to share my opinion if you had some questions about how should it work.

ivan
Posts: 296
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: Speed reduction on small holes (plasma)

Post by ivan »

Glad to hear your 'marking speed' solution is working well. We'll continue working on a built-in solution so that our users can utilize both the marking speed and a small-hole slowdown speed in the same program. I'll let you know when we have something.

Post Reply