Les…Is there a way to add comments to a job then have them automatically inserted into the gcode at the post level? Perhaps a system variable that contains the comments?
What I’m wanting to do is enter the overall job size as a job comment then have that appear toward the top of the gcode file as a comment. What I have now is a code snippet called “Job Size” which I modify for every job then insert at the top of the program. This works, although I get a warning when the post runs. It doesn’t seem to cause any issues, other than for piece of mind, I don’t like seeing red when I run a post.
just looking for a more automatic solution.
Thanks
Anything in the ‘Notes’ tab should appear in your G-code as a comment. When you set up your cut, add any extra info in the notes tab and it will appear in the code just before that operation runs.
I may have found a slightly easier way. I defined a width and height variable in the post, then I set those variable values as the first operations. Problem is that the variables are showing as “nil” in the gcode. It could be the way I’ve defined them.
I just copied the refDistance variable definition and changed the name. What I’d like to do is just have one text variable instead of two number variables. I’m not sure how to define a text variable. Could you show me how to do that?
Thanks
Cool. That works. Still getting those warnings only when I insert the code snippet, but the code looks fine.
I think setting a text variable inside the post would be easier. Could you show me how to do that?
I know this defines a number…
post.DefineVariable(“refdistance”,sc.unitLINEAR,0,1e17)
How would I define a text variable?
Try post.DefineVariable(“textVariable”,-1)
Works good. I like that better.
Something for the wish list would be a feature that automatically kept track of the total job size (width and height) and stored it in a variable that was accessible from the post.
When CAM is running in the office and the machines are out in the shop, you almost have to put the job size in the gcode or make hand written notes. Making that automatic would be a huge benefit.