List of MeshCAM variables? parameters?

Discussion of post processors for various CNC machines

List of MeshCAM variables? parameters?

Postby cnczane » Sat Jul 19, 2014 7:57 pm

[just lost a long involved post because it took over 2 hours to compose while going to-from MeshCAM and I was auto-logged out before I hit Preview... :cry: ]

Summary:
Q1. Is there a list of internal MeshCAM variables that are callable from a post-processor/.con file?
Q2. Is there a list of internal MeshCAM parameters or flags which can be set, and to what effects?

...to make a long story short. er...
I've been looking through the various .con files in posts/ and noticing that things appear in some and not the others.

I've also discovered that there are internal variables in MeshCAM (like PATHNAME) which MC will print in a comment if encountered in a START or END command, like:
START = "(PATHNAME is [PATHNAME])"
END = "(TP = [TP] SZ = [SZ])"

Q1. Is there a list of all internal MeshCAM variables that are callable from a post-processor/.con file?

Further, the WARNING appears to be an internal parameter which is set in a few .con files, pops up a window before saving a g-code program. (I consider something a 'parameter' or flag if it triggers an action just by being defined.)

Q2. Are there other MeshCAM parameters or flags which can be set, and to what effects?

One insight I picked up which might help a later reader wrestling with setting up a post-processor comes from the MillMaster Pro .con file, where you'll find this line:
START = "/*{SLENGTH}: [STOCKX]{SWIDTH}: [STOCKY]{SHEIGHT}: [STOCKZ]}"
The square braces are MeshCAM's internal variables; the curly ones are Sherline MillMaster's. From this START line, I conclude that this is the syntax of a comment (although the .con file does not specify a COMMENT_START as some of the others do) which the MillMaster controller interprets to set the size of the stock before proceeding. (MeshCAM fills in the values of anything it understands, and simply passes through anything that it can't match.)

In that sense, this particular START line is translating MeshCAM's variables relating to the stock to Sherline's syntax. Similarly in the same file, there're a few lines devoted to SETUP which have hard-coded values, but which could be set to the values of some MeshCAM variables.

From this line in Thermwood's config file:
START = "SET ZSHIFT=[STOCKZ]+WASTEBOARD
I take it that the Thermwood controller can do addition, and probably other arithmetic, and (like Sherline's SLENGTH, etc.) has its own internal variables (e.g., ZSHIFT and WASTEBOARD) which are unknown to MeshCAM. In another line:
START = "[ASKWASTEBOARD=1]"
which is passed straight into the g-code output by MeshCAM, indicating it doesn't understand it, I take it that one can "flag" the Thermwood controller to query the user at run-time for a wasteboard thickness (which then gets used in the later SET ZSHIFT line).

Thank you!
--
c'z'
(carefully copying to buffer before proceeding to Preview)
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Re: List of MeshCAM variables? parameters?

Postby cnczane » Sat Jul 19, 2014 8:07 pm

In particular, is it possible, since MeshCAM knows the estimated cutout time, to put that in a START statement?
e.g.,
START = "(Time to execute = [CUTOUT_TIME])"

I always stick a (MSG,) line (which LinuxCNC throws up on the screen at run-time) at the beginning of the code:
START = "(MSG, ETA: n HR m M, Last N: nnnn)"
(That way I can come back and check up on the status, admittedly in a crude way, since "not all lines execute equally quickly.")

but I have to remember the cutout time from the estimate MC gave me at save time, and jump to the bottom of the file to find the last N to fill in.

It would be nice if MC5 could cipher that for me and do it autophantasmically.
--
C.
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Re: List of MeshCAM variables? parameters?

Postby Randy » Wed Jul 23, 2014 8:37 pm

cnczane wrote:...I was auto-logged out before I hit Preview...

I was typing a reply this morning before work and the power went out, so I feel your pain.

Quick reply (though I'm at work now though, and we have a backup generator. :) )

WARNING just displays a canned message. Robert maybe should have called it ECHO, like the DOS command. (WARNING came up in the thread viewtopic.php?f=3&t=15254&p=23417 earlier this year)

You have done a lot more digging than I have, David. But for specific feature or documentation requests, a quick email to Robert is probably the most productive course.

But please do share any reply with the rest of us! Robert did list some variables in the help, but obviously not all...

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: List of MeshCAM variables? parameters?

Postby cnczane » Thu Jul 24, 2014 1:56 pm

I dood it.
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Re: List of MeshCAM variables? parameters?

Postby cnczane » Mon May 25, 2015 10:50 pm

Robert's reply, which I promptly forgot to post here promptly:
All of the postprocessor variables are listed in the manual.


The reason I'm back is that I forgot about the reply(!). These are they, from the (a) manual.
Name Purpose
[F] Current feedrate
[FR] Rapid feedrate
[FP] Plunge feedrate
[FC] Standard feedrate
[N] Current line number
[XH] Tool home position (X)
[YH] Tool home position (Y)
[ZH] Tool home position (Z)
[RH] Tool home position (Rotary angle)
[N] Current line number
[S] Spindle speed
[SZ] Safe Z height
[T] Current tool number
[TP] Previous tool number
[X] Tool position (X)
[Y] Tool position (Y)
[Z] Tool position (Z)
[I] Coordinate of arc center (X)
[J] Coordinate of arc center (Y)
[R] Rotary axis angle
[XMIN] Minimum X value
[YMIN] Minimum Y value
[ZMIN] Minimum Z value
[XMAX] Maximum X value
[YMAX] Maximum Y value
[ZMAX] Maximum Z value
[TOOLDESC] Tool description string
[PATHNAME] Output path
[FILENAME] Output filename
[UNITS] Machine units (MM or INCH)

I was hoping to find a variables for; e.g., LAST_N and ESTIM_CUTOUT_TIME because I put a line in my (LinuxCNC) posts file like:
START="(MSG, ETA )"
START="(MSG, Last line )"
which adds two lines at the beginning (START) of the G-code--before MeshCAM starts outputting G-code. The (MSG,) comment is interpreted by the "AXIS" user-interface for LinuxCNC to "display a message on the screen." I like display information which give some hints about when to expect the job to finish. Not great hints, admittedly, but some.

I now edit this information manually, although I edited the posts config file to, at least, create the place-holders to remind me to do it.

One other thing in the config file, for you LinuxCNC busters out there; LinuxCNC understands variables, so I have the post add lines to define variables like
#<FPLUNGE>=12.0
#<FHORIZ>=32.0

and then I, again manually, change every "F12.0" found to F#<FPLUNGE> (and F32.0 to F#<FHORIZ>) which allows changing the feedrates later by editing just one line.
(I've since discovered that the stock Linux editor I use, 'vi' (shudder), has the capability to read "scripts" of commands when launched; most of my changes are now standardized, so this works pretty well.)

(Hmmm, I'm wondering now if I can have the post do this editing, by changing my Feedrate line... from
FORMAT = [F|#|F|1.1]
to one using LinuxCNC variables...

I'm also wondering if I could distinguish [FC] from [FR] from [FP] in the .con file.)

Yes, yes, I know, much ado about nothing.
--
CNCzANe
Last edited by cnczane on Thu Aug 17, 2017 4:37 pm, edited 1 time in total.
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Re: List of MeshCAM variables? parameters?

Postby cnczane » Tue May 26, 2015 2:01 pm

It would have, I think, been more helpful to provide the links to the Post-Processor sections of the manual:

Overview: http://www.grzsoftware.com/manual/overview.htm

Statements: http://www.grzsoftware.com/manual/statements.htm

To my mind, each post-processor configuration (.con) file (in <MESHCAM_dir>\posts\)
(a) defines/explains to MeshCAM how to format commands to suit a particular machine's tastes/needs, and
(b) also, defines/loads/stacks/collects a number of things to be done together at a particular event,
like START, END, PLUNGE_RATE_MOVE, etc..

BTW, to *reduce* the number of post-processors I have to sift through to find the one I want, I renamed the posts\ directory (to postsORIG\) and made a new posts\ with copies of the few I wanted.

Cheers!
--
David, CNCZANE
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Re: List of MeshCAM variables? parameters?

Postby cnczane » Tue May 26, 2015 4:32 pm

Results of a little more experimenting...

I inserted some temporary "START=" statements into the .con file to see what values are returned for the various MeshCAM post- variables, and was surprised to find that some are just values and some are values with prefixes.

For example [SZ] is just a number, the safe-Z height, while [FC] returns "FC" prefixed to a number for the current feedrate--which then has to be removed manually later to avoid an error.

That is, statements like this in the .con file:
START=(What does MC5 say these VARs are? F:[F] FC:[FC] FP:[FP] FR:[FR]), etc.
produce:
(What does MC5 say these VARs are? F:F0.0 FC:FC32 FP:FP12 FR:FR0)
( XH:XH0.000 YH:YH0.000 ZH:ZH0.100 RH:RH0.000 X:X0.0000 Y:Y0.0000 Z:Z0.0000 I:I0.0000 J:J0.0000 R:R0.000)
( S:S0 SZ:0.100000 T:T0 TP:T0)
( XMIN:0.000 XMAX:3.000 YMIN:0.000 YMAX:3.000 ZMIN:0.000 ZMAX:0.550)
( UNITS:[UNITS])

And that last one is verbatim:
START = "( UNITS:[UNITS])"
returns "(UNITS:[UNITS])" where I expected something like "(UNITS:Inch)".

Cheers.
--
David
Last edited by cnczane on Thu Aug 17, 2017 4:34 pm, edited 1 time in total.
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am

Re: List of MeshCAM variables? parameters?

Postby Randy » Wed May 27, 2015 3:28 am

Hi David, that is rigorous research. :) I wasn't even aware of the "manual", which seems to be just a transcription of the MC help file. As I wrote almost a year ago

Robert did list some variables in the help, but obviously not all...


I was hoping for Robert to divulge other usable parameters, which as you uncovered are being used in various postprocessors. At this point Rob is understandably overwhelmed with the Carbide3D startup and producing machines, so I don't expect a detailed exposition from him in the near future...

Randy
All opinions in this post are mine alone. I am not a MeshCAM employee, I do not have a financial interest in MeshCAM, nor do I speak for MeshCAM. MeshCAM user since Beta 5 in 2003. viewtopic.php?f=11&t=15333 :ugeek:
Randy
 
Posts: 1812
Joined: Wed May 14, 2008 9:50 am
Location: North Texas, USA

Re: List of MeshCAM variables? parameters?

Postby cnczane » Wed May 27, 2015 2:35 pm

Disappointment.

I got the Bright Idea that this line, at least, could save me having to search for/copy the values:
END = "(Last XYZ: [X] [Y] [Z])"
which one would expect, based on the description of the variables, to print the values of X, Y,and Z as they stood at the end of the program, but instead returns:
(Last XYZ: )

From that I conclude that [X], etc. are the "commanded" values of X, etc.--what they would be if a "move" were required. As none is required at the end of the program, they are empty. Well. It's a theory. And I'm sticking to it.

Awww. Shuckins.
--
David
cnzcane
If you have not received a reply from me in over a year, I am not ignoing you: more likely I am fallen asleep under a tree. Again. Please poke me if you think it worth your trouble.
cnczane
 
Posts: 277
Joined: Sun Sep 21, 2008 4:15 am


Return to Post Processors