Post processor development function reference

Post processor development function reference

lekonna
Enthusiast Enthusiast
2,071 Views
4 Replies
Message 1 of 5

Post processor development function reference

lekonna
Enthusiast
Enthusiast

Hi,

 

So i'm looking into implementing a post processor for a device (Brother tc-215) that doesn't actually really support G-code. However it is possible to edit the programs in the computer, so in theory i think it would be possible to modify the post processors within certain limits to also suite this machine.

 

My question is:

Is there a function reference to the post processors somewhere available?

 

What functions do i have in my use, what variables do i have provided by the system? 

 

What are the member functions for currentSection ect, is this information somewhere available? 

 

When i look at the ready made posts, and find things like this:


function onCyclePoint(x, y, z) {
var probeWorkOffsetCode;
if (isProbeOperation()) {
var workOffset = probeOutputWorkOffset ? probeOutputWorkOffset : currentWorkOffset;
if (workOffset > 99) {
error(localize("Work offset is out of range."));
return;
} else if (workOffset > 6) {
probeWorkOffsetCode = probe100Format.format(workOffset - 6 + 100);
} else {
probeWorkOffsetCode = workOffset + "."; // G54->G59
}
}

if (isFirstCyclePoint()<--not defined in this file) {
repositionToCycleClearance(cycle<--huh?, x, y, z);

// return to initial Z which is clearance plane and set absolute mode

var F = cycle.feedrate;
if (properties.useG95) {
F /= spindleSpeed;
}
var P = (cycle.dwell == 0) ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds

switch (cycleType) {

        ^^^^^^^^^---first reference to this variable in the whole file

 

 

It makes me feel like there is most likely a lot that i'm missing. I've found a PDF document that described some of this, but that was out of date and the examples provided did not work. 

 

So, is there a reference on what all is usable for the post developer ? I mean with the examples provided one could in theory modify the current ones with trial and error to suit, but seems like a really backwards way of approaching this problem.

 

best regards,

Janne

 

0 Likes
Accepted solutions (1)
2,072 Views
4 Replies
Replies (4)
Message 2 of 5

Trigg3r
Advocate
Advocate

If you choose dump.cps as the post-processor in the post dialogue, that will pump out all the functions and variables available to you IIRC.

 

Which I've just tried and it crashed Fusion 😮

 

 

 

 

I've attached the dump.dmp file that it generates.

 

 

0 Likes
Message 3 of 5

Trigg3r
Advocate
Advocate

I forgot to add that there is a specific forum for Post Processor help located here ->

 

http://forums.autodesk.com/t5/hsm-post-processor-forum/bd-p/218

 

 

HTH 🙂

Message 4 of 5

Steinwerks
Mentor
Mentor
Accepted solution

Specifically pay close attention to these threads:

 

http://forums.autodesk.com/t5/hsm-post-processor-forum/getting-started-modify-posts/td-p/6371381

 

http://forums.autodesk.com/t5/hsm-post-processor-forum/help-my-post-processor-needs-to-be-edited-now...

 

The Post.chm in @Laurens-3DTechDraw's post is the key here for looking up variables (outside of the dump.cps post which will give you real-world and current CAM output).

 

If you're in the CAM already and just need to check things like tool variables you can also hold Shift and hover over a field to see what variable that outputs:

 

Shift Hover.jpg

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 5 of 5

lekonna
Enthusiast
Enthusiast

Thanks the post.chm indeed seems to have a function reference, very helpful!

 

Also the trick with shift to see the variables is real handy.

 

 

 

 

0 Likes