Welcome to Our Community

Some features disabled for guests. Register Today.

Add variables to OB post processor

Discussion in 'General Talk' started by Rink, Jan 6, 2024.

  1. Rink

    Rink Well-Known
    Builder

    Joined:
    Mar 7, 2020
    Messages:
    160
    Likes Received:
    35
    Good evening.
    My NewtWave Piranha post processor inserts comments, by using variables, at the top of the gcode to describe things like material dimensions, safez height, tool name, etc.

    Any problem if I edit my OB post processor to insert those?

    Thx, rink.
     
  2. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,490
    Likes Received:
    1,927
    I take it you mean in Fusion360?
    The OB post already inserts a bunch of info about the job, but not as 'variables' because GRBL does not understand and will abort with an error.
    The new grblHAL based controllers (BB X32) will support variables in the future but only the X32 specific post will support that.

    However, since the post is open source you can modify it to do anything you need (it is Javascript), but you will need to merge your changes into any future upgraded version we release.
     
  3. Rink

    Rink Well-Known
    Builder

    Joined:
    Mar 7, 2020
    Messages:
    160
    Likes Received:
    35
    Good morning.
    Not using Fusion 360 for CNC (yet). I'm using Vectric VCarve Pro. But I've upgraded from a NextWave Piranha to an OB LEAD 1515. I previously used the Piranha PP, but I now use the OpenBuilds GRBL PP. The Piranha PP had the following:

    +---------------------------------------------------
    + Commands output at the start of the file
    +---------------------------------------------------

    begin HEADER

    "( [TP_FILENAME] )"
    "( File created: [DATE] - [TIME])"
    "( for Next Wave Automation from Vectric )"
    "( Material Size)"
    "( X= [XLENGTH], Y= [YLENGTH], Z= [ZLENGTH])"
    "( Z Origin for Material = [Z_ORIGIN])"
    "( XY Origin for Material = [XY_ORIGIN])"
    "( XY Origin Position = X:[X_ORIGIN_POS], Y:[Y_ORIGIN_POS])"
    "( Home Position)"
    "( X = [XH] Y = [YH] Z = [ZH])"
    "( Safe Z = [SAFEZ])"
    "([FILE_NOTES])"
    "(Toolpaths used in this file:)"
    "([TOOLPATHS_OUTPUT])"
    "(Tool used in this file: )"
    "([TOOLS_USED])"
    "([TOOLNAME])"
    "(|---------------------------------------)"
    "(| Toolpath:- '[TOOLPATH_NAME]' )"
    "(|---------------------------------------)"

    So, I'm wondering if I can put some of that in my OpenBuilds GRBL PP? At present, the OpenBuilds GRBL PP does not insert any of this into my gcode file. I'd like it to be there for reference.

    Thx, rink.
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,202
    Likes Received:
    4,346
    "comments" not "variables" :)

    You can edit posts yes, just always at own risk and keep an eye on updates
     
  5. Rink

    Rink Well-Known
    Builder

    Joined:
    Mar 7, 2020
    Messages:
    160
    Likes Received:
    35
    Sorry. I meant “variables” in the sense that the term [XH] is a variable that represents a numeric location. That variable is then inserted in the comments in order to display that Lyon the final gcode.

    So I guess my question is: can I insert comments containing things like this in my OB PP so that I can see those actual values in the final gcode? BB32 handles that?

    I will give it a try and see what happens.
     
  6. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,449
    Yes, comments are allowed.
     
  7. Rink

    Rink Well-Known
    Builder

    Joined:
    Mar 7, 2020
    Messages:
    160
    Likes Received:
    35
    Update, in case it helps someone else...

    YES, it works.

    I inserted this block of comments into my OB Post Processor, in the HEADER section, just above the T1 command. Posted out a toolpath and opened it it OB Control. In Control, on the gcode tab, I could see all of these comments with the relevant values shown, and the toolpath ran without any problems.

    Thx, rink.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice