How to add M1 after each part

Having problems with or questions about SheetCam? Post them here.
Post Reply
mancavedweller
Posts: 161
Joined: Tue Feb 25, 2014 6:53 am

How to add M1 after each part

Post by mancavedweller »

Hi Les,

when plasma cutting parts with tip up risk, it can be useful to put M1 at the end of SafeZ after a cut. The gcode stops and if all is well the operator simply presses Cycle Start and the cut continues. Or if the part tipped up, pick it out, then press Cycle Start.

I can easily insert M1 in the post processor in the OnPenUp function. The problem with that is it does it for every individual cut, not every part. So even for a tiny hole, etc the M1 would be inserted after the rise to SafeZ.

So my first question is how could I modify the post to only insert M1 after rise to SafeZ after a PART is completely cut.

Being more ambitious, regarding a part like a flange. You have the inner ring cut out and the outer ring cutout. Then you also have all the bolt holes. So would there be any way to only insert M1 after the rise to Safe Z for only the inner and outer rings but not the bolt hole cuts. I realise that may not be possible because Sheetcam may have no way of differentiating the large inner ring from the holes.

If that's the case, could it be done any way in the Path Rules based on shape size larger than a given amount.

Cheers,

Keith
WyoGreen
Posts: 257
Joined: Wed May 07, 2014 10:02 pm

Re: How to add M1 after each part

Post by WyoGreen »

You could separate each "part" into it's own layer, then make each layer it's own operation, inserting code (M1) between each operation using the operations menu. You may have to make a code segment "m1" to insert using the operation menu.
Screenshot_2021-01-19_17-55-45.png
Screenshot_2021-01-19_17-55-45.png (11.62 KiB) Viewed 1551 times
mancavedweller
Posts: 161
Joined: Tue Feb 25, 2014 6:53 am

Re: How to add M1 after each part

Post by mancavedweller »

Thanks Wyogreen,

that would do for just a few parts but was looking for something a little more "automated" if for example I brought in a single nested "part" then used "Break Up Manually Nested Drawing" to make each shape a separate part in Sheetcam.

I'll look into the OnNewPart() function in the post processor and see how I can get creative to make that do what I want.
User avatar
Les Newell
Site Admin
Posts: 3667
Joined: Thu May 11, 2006 8:12 pm

Re: How to add M1 after each part

Post by Les Newell »

There is a variable called entityLength that contains the length of the current cut. Maybe something in OnPenUp() would work:

Code: Select all

if entityLength > 200 then
   post.Text(" M1\n")
end
This would output an M1 only if the last cut was more than 200mm.
mancavedweller
Posts: 161
Joined: Tue Feb 25, 2014 6:53 am

Re: How to add M1 after each part

Post by mancavedweller »

Thanks Les,

that's definitely going to help.
Post Reply