Page 1 of 1

Post Processor - Planet CNC MK3

Posted: Mon Oct 16, 2017 6:39 am
by kwikway
Hello All,

I was hoping soeone could help me with my sheetcam Post Processor file. I swapped my electronics recently for a Planet CNC Board and per the manufacturer's instructions I am now using the Linux CNC post processor. However I am having some issues with it slow down in corners and cutting the object in segments instead of one complete path. I am not sure if it is an issue with the Post Processor file.

Also, It is possible to run a G-Code command before and after the job is done? Specifically I want to home before starting and once the job is done I want to move X,Y to 100 then Home. Is that possible?

Homing command should be "G10 L8"

Here is my post processor file: https://goo.gl/TsMttz

P.S.
If necessary and if you think its wise. trim the fat from the file. All the table will do is plasma cutting.

Thanks in advance!

Re: Post Processor - Planet CNC MK3

Posted: Mon Oct 16, 2017 6:44 am
by kwikway
P.S.

In case it might be helpful. this is the file I am trying to cut as my first test.

Re: Post Processor - Planet CNC MK3

Posted: Mon Oct 16, 2017 12:44 pm
by tcaudle
The Post is vaguely familiar. It displays its for MACH and the MP1000-THC and not for a Linux based control. LINUXCNC has different G and M codes than MACH. Where did you get that POST? I am surprised it works at all. Part of it will depend on if you are using a THC and if it has an external disable pin. I would recommend you contact the vendors of your hardware to support their product.

Running specific g=codes is easy to do: Just make an Operation uisng the "G": tool and put the G-code snip in that operation. Plav ce the operation in the list of operations or in you case Before and after an operation. Once again it has to be the correct g-code for LINUXCNC

Re: Post Processor - Planet CNC MK3

Posted: Mon Oct 16, 2017 2:01 pm
by kwikway
tcaudle wrote:The Post is vaguely familiar. It displays its for MACH and the MP1000-THC and not for a Linux based control. LINUXCNC has different G and M codes than MACH. Where did you get that POST? I am surprised it works at all. Part of it will depend on if you are using a THC and if it has an external disable pin. I would recommend you contact the vendors of your hardware to support their product.

Running specific g=codes is easy to do: Just make an Operation uisng the "G": tool and put the G-code snip in that operation. Plav ce the operation in the list of operations or in you case Before and after an operation. Once again it has to be the correct g-code for LINUXCNC
Hello,

Thanks for the reply.

I emailed the vendor of the Planet CNC MK3 board. I am currently waiting for a reply. I have figured out that the Post processor and the G-Code it generates functions correctly. I suspect there is a setting somewhere in the "CNC USB Controller" software that is causing the problem I am seeing. basically its not combining all the line segments into one smooth line and that results in the plasma torch stutters as it cuts.

For now I will wait for a reply from the vendor.

Re: Post Processor - Planet CNC MK3

Posted: Mon Oct 16, 2017 8:13 pm
by tcaudle
Well, it took some reading but several assumptions I made are false

1. PlanetCNC has their own control software (TNG) that runs in Windows or LINUX. Its just another application that runs in Linux and uses drivers to talk to their MK3 hardware.
2. It's not LINUXCNC so it does not use any of the LINUXCNC G-codes, M-codes or POSTS
3. It would appear the THC interface is the simple UP and DOWN inputs
4. As far as the motion ( trajectory planner) and things like CV and corner control it will all be in their software.

I did not dive deep enough to look at the g-code or M-codes they use beyond the typical low number G0 thru G11

It kinda contused me at first because "TNG" has been a SheetCAM moniker for years . There won't be a lot of embedded knowledge here in PS of other US forums.

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 17, 2017 7:07 am
by kwikway
Hello,

I found the problem in the "CNC USB Controller" software. I figured out the correct valuas for the "Lookahead" and it seems to be cutting fine now. I have still not heard anything from the vendor but at least I know for sure now its not sheetcam. Therefore I a closing this thread/topic.

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 17, 2017 8:44 am
by acourtjester
Something that may help if you think the line segments are not connected, SheetCam will have start points and rapid lines for each line.
If you see them and want to connect them you will need to go back into the drawing software to correct them.

Re: Post Processor - Planet CNC MK3

Posted: Wed Oct 18, 2017 11:21 am
by kwikway
Hello again,

Long story short. vendor told me to use a different software and I found their post processor for sheetcam. But it has errors in it.

Can someone help?
https://drive.google.com/file/d/0B_qdl7 ... sp=sharing

Re: Post Processor - Planet CNC MK3

Posted: Wed Oct 18, 2017 12:36 pm
by Les Newell
What errors do you get? I can't see anything obviously wrong with the post.

Re: Post Processor - Planet CNC MK3

Posted: Wed Oct 18, 2017 1:03 pm
by kwikway
Les Newell wrote:What errors do you get? I can't see anything obviously wrong with the post.
Hello Les,

While waiting I poked and prodded the code and found the problem. It had these two lines:
post.CancelModalText()
post.CancelModalNumbers()

Sheetcam error said the value was "null" and when I removed them everything worked fine again. Must have been a mistake by the vendor.

Could you explain how I can add G-Code that runs before the job and after the job? I want to make the table home before and after.

- Thanks

Re: Post Processor - Planet CNC MK3

Posted: Sat Oct 21, 2017 2:28 am
by robertspark
Is this thread still live, do you still want help on the post processor?

In short yes it is possible to do what you want, post your current post processor and tell me what gcode you want inserted where, and I'll post it back is the quickest option, but happy to explain it as well

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 24, 2017 12:06 pm
by kwikway
robertspark wrote:Is this thread still live, do you still want help on the post processor?

In short yes it is possible to do what you want, post your current post processor and tell me what gcode you want inserted where, and I'll post it back is the quickest option, but happy to explain it as well
Hello Robert,

The issue I has is solved and I can now cut. I am looking to make it more user friendly for my father at the moment. I want to add G-Code to tell it to home before and after the jobs. Just not sure how to do that.

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 24, 2017 1:58 pm
by robertspark
Firstly plasma cutters don't tend to be homed (there isn't really a requirement to home a machine, because all you do is place a piece of plate on the cutting bed, and zero the axis (x,and y) and then cut your shape out from there.


Secondly I am not a planetCNC user, hence I'm looking at this manual and hope it is the right manual:
https://planet-cnc.com/wp-content/uploa ... roller.pdf

PDF page 171/210 states the following:
3.14.12 G10 L8 - Home Machine Axes
Machine will home axes.
Use P1 is for X-, P2 for X+, P4 for Y-, P8 for Y+, P16 for Z-, P32 for Z+
P64 for A-, P128 for A+, P256 for B-, P512 for B+, P1024 for C-, P2048 for C+
P4096 for U-, P8192 for U+, P16384 for V-, P32768 for V+, P65536 for W-, P131072 for W+
Examples:
G10 L8 Pn X- Y- Z- A- B- C-

I am not sure which way your homing switches are, but lets say they are X- (extreme left) and Y+ (extreme up / furtherest away from the operator, North direction if you are facing the table) and Z+ (highest up towards the roof position).
You would run:

Code: Select all

G10 L8 P32
G10 L8 P1
G10 L8 P8

Open up sheetcam, go to Options >> Machine >> Post Processor Tab

Select "edit post"


Scroll to / find the function "OnInit()" ..... On initialization.

It will look something like this:

Code: Select all

function OnInit()

   post.SetCommentChars ("()", "[]")  --make sure ( and ) characters do not appear in system text
   post.Text (" (Filename: ", fileName, ")\n")
   post.Text (" (Post processor: ", postName, ")\n")
   post.Text (" (Date: ", date, ")\n")
   if(scale == metric) then
      post.Text (" G21 (Units: Metric)\n") --metric mode
   else
      post.Text (" G20 (Units: Inches)\n") --inch mode
   end
   post.Text (" G64")    -- set machine in constant velocity mode
   post.Text (" G80")    -- clear canned cycles
   post.Text (" G90")    -- set to distance absolute mode
   post.Text (" G91.1")  -- set to absolute IJK mode (not used in UCCNC at present)
   post.Text (" G40\n")  -- clear tool offsets (not used in UCCNC at present)
   post.Text (" F1\n")   -- clear current feedrate setting (modal)
   
   bigArcs = 1 --stitch arc segments together
   minArcSize = 0.05 --arcs smaller than this are converted to moves
   end

All you do is look for the last bit of code (before the "end" of the function) and add the below bold lines, which in this case is:

bigArcs = 1 --stitch arc segments together
minArcSize = 0.05 --arcs smaller than this are converted to moves
After that, add the following code:
post.Text (" G10 L8 P32 \n") -- home Z axis in a (+) direction
post.Text (" G10 L8 P1 \n") -- home X axis in a (-) direction
post.Text (" G10 L8 P8 \n") -- home Y axis in a (+) direction

end


Then find the function that is called "OnFinish()" ..... which is the the last function called, and will look something like this

Code: Select all

function OnFinish()
   post.Text (" M5 M206 M30\n")
end
Ok, now this one is a little more work, because you need to look at the code, in my case it makes sure the torch is off (M5), turns off the AVC {THC} via M206,

But M30 will rewind the gcode file and end the programme .... not sure if PlanetCNC has or uses M30.... if it does then you will need to modify the code as follows (because you dont want to rewind the gcode file and end the programme before you've homed the axis):

function OnFinish()
post.Text (" M5 M206 \n")
post.Text (" G10 L8 P32 \n") -- home Z axis in a (+) direction
post.Text (" G10 L8 P1 \n") -- home X axis in a (-) direction
post.Text (" G10 L8 P8 \n") -- home Y axis in a (+) direction

post.Text (" M30\n")
end

The "\n" is a line feed, carriage return that forces the post programmer to step to the next line, hence only one Gcode will be on one line, and this is the way we want the programme to run, one task at a time.

Hope it works ok,

Rob

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 24, 2017 2:14 pm
by robertspark
pdf page 194 of the above manual lists:
3.15.4 M30 - Program End, Pallet Shuttle, and Reset
To exchange pallet shuttles and then end a program, program M30.

so it looks like planetcnc does have / use M30 to rewind the programme.

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 24, 2017 5:00 pm
by tcaudle
What homes do for you:
1. Establishes a known TABLE (MACHINE) zero points that are in the same exact spot every time
2. Allows using soft limits and things like Load Material as absolute positions from Machine zero
3. Allows using a position jig or stops and cutting in the same exact spot even if the sheet is moved or taken off the table
4. Allows optimum, use of sheet material to position later cuts in partially cut sheets using the CAM to nest the cut.
5. Its always good to know where you really are inside the cut envelope of the table
Work zeros should be offsets from machine zero rather than moving the machine zero to match the material edge. If you want to throw a piece of material on the table and cut otu a shape then jog to the corner and set the WORK zeros

You can set parking position in SheetCAM (Options/Job options/parking to send it so some spot. If you hard code it in the OnFinsh() then that will take precedence

Re: Post Processor - Planet CNC MK3

Posted: Tue Oct 24, 2017 5:39 pm
by robertspark
Item #5, because I sometimes use part sheets / bits of sheets, I use this,
http://forum.cncdrive.com/viewtopic.php?f=15&t=629

which I based on this
http://www.machsupport.com/forum/index. ... 154.0.html