587,754 active members*
2,864 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > BobCad-Cam > BobCad Post Processors > My Grizzly G0704 mill post that launches GWizardE editor with posting
Page 1 of 2 12
Results 1 to 20 of 35
  1. #1
    Join Date
    Feb 2004
    Posts
    1311

    My Grizzly G0704 mill post that launches GWizardE editor with posting

    Attached in the zip file is my Grizzly G0704 mill with Mach3 controller (inches) post and a sample g-code file. This post uses script to launch the GWizardE g-code editor and backplotter rather than the Preditor editor. Actually, this script will launch whatever your default application for .nc files happens to be. So if it is Preditor, it will launch that, if notepad or something else, that will get launched.

    This post also does a little more "pretty" structured formatting. The example .nc is for a simple ring cut in 1/8" sheet, it is 3" diameter with a 2" hole. I used this as an example to demonstrate a feature I learned from BC support and to ask a question. When I cut parts like this on a fixture that holds 12 parts, I mill the holes out first. Then I want the machine to pause/stop while I install hold downs that clamp the parts so the perimeters can be milled without using tabs. The trick is to use two (or more) milling operations. The machine will stop at the end of the operation and allow the clamps to be installed. My question is this - with my current CAM I created a post that allows me to insert a comment "Install hold downs" at this point in the program. Mach3 will display these comments so it makes a nice visual reminder to install them. I couldn't find a way to create a comment for each mill operation - that would have allowed me to script putting the comment in the right place. I suppose I could use the set of comment lines and maybe write some script that creates a g-code comment block, say the first mill operation gets comment_1, the second operation gets comment_2, etc. I really only need a couple of these but if I did it for, say 5, I'd have some comments left over to do other things. Does anyone have any other ways of doing this? You can actually see a quick and dirty test of this in the post and .nc file I posted. Look at block 16 in the post, I used comment_1 for it and in the .nc file you'll see that it shows the "Install hold downs" comment.

    cheers,
    Michael
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  2. #2
    Join Date
    Sep 2012
    Posts
    1195

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    It may be possible to script this at the end of your post processor in such a way as there is a text window for adding a comment at the start of each operation. While I know the post processor system well enough to work a little outside the box at times, that's going beyond my knowledge of scripting and I'd have a hard time pointing you in the right direction. If you just want to define specific comments, I don't think that would be too difficult either, but how you link those specific comments to specific operations would be a challenge. IMHO, providing a comment text box, or providing check boxes for pre-defined comments (checking the box inserts the comment) within the operation wizard would be the easier way to link the comments to the operation. My guess is any of those methods could be used with some work.

  3. #3
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    I'm all for the KISS principle! Actually, all I need/would like is a canned comment when needed "Install the hold downs dummy!" to remind myself. A canned comment that I could link to a specific operation would be perfect, if that could be a check box in the operation wizard, that would be perfect. I had tried to use the UI extension (custom files) but it didn't work for me, but that was also the time when scripting didn't work because I had changed the version number in the post header from 10.0 to 1.0! Maybe that was causing the issue with the custom file? These seemed to be associated with a specific CAM wizard or the Current Settings but not with an operation (like a milling operation). Perhaps I got it wrong? But, this mechanism seems like a reasonable approach if it can be made to work.

    cheers,
    Michael
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  4. #4
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Still no glory with the custom UI stuff. I am sure it is something silly I'm not doing correctly. Here's what I did:

    My mill post is called: Mach3-Mill-G0704
    So I created a text file named Mach3-Mill-G0704.CustomProfile in the same Posts/Mill folder.

    Then I edited this file to create a single checkbox and have it checked by default:

    CHECK_BOX,1,Install hold downs
    DEFAULT_CHECK,1,1

    I restarted BC. Now, I create a simple part (a circle) and create a 2-1/2D mill operation for profiling. I expected to see the checkbox somewhere or a new wizard page for Custom Profile or Advanced Posting. I don't see anything different. I tried a few permutations and other machining types (drill). Is there anything else that needs to be in the file like a header like the posts have?

    Does anyone have an example of a working UI extension?

    regards,
    Michael
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  5. #5
    Join Date
    Apr 2008
    Posts
    1577

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    What version of BobCAD are you using? I just noticed something in the Help file for V26 that I did not notice before. There is a page titled "Advanced Posting V25 to V26 Map" which says that the name of the Custom Posting pages has been changed. I was going to comment to say the variable page *.CustomProfile does not exist but according to the help file it does. It was formerly known as *.CustomContour

    I checked my post that has a *.CustomContour variable page and it still appears to work (or at least I get the Advanced Posting page, don't know if it actually "works"). I need to look at this a little further before I continue.

  6. #6
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Sorry, should have stated V27 - I'm a brand new user with a brand new version!

    Yes, they changed the naming convention in V27. If you see the advanced posting page in V27 that is more than I see!

    regards,
    Michael
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  7. #7
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Ok, I found an example here: http://www.cnczone.com/forums/bobcad...ing-issue.html

    I had to change the post name (remove the "copy 2" part) and this example shows the Adv Posting tab. So now I know what to look for!
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  8. #8
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    And I was able to save the file to a .CustomSettings and now have the Adv Posting tab on the edit settings page.

    So, I was hoping I could add this adv posting to a milling operation but that does not seem to be the case. I can either add it to the top-level job or to an individual machining feature. Since I almost always do the hold down installation prior to a profiling operation on the part, I can probably get by with just creating the adv posting config on that operation. Or is there a better way to do it?
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  9. #9
    Join Date
    Apr 2008
    Posts
    1577

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Ok, I don't have V27 full version but I do have the Demo. Try this *.CustomProfile and see if it works for you. It works in my V27 Demo.

    Ok, looks like you already have it working but I'll post it anyway.

    I'm out of time right now to look at this but I'll take a stab at it later if you're still working on it.
    Attached Files Attached Files

  10. #10
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Yes, it works and I am making progress. Now I just need to figure out how best to use this to do what I want to do (add the ability to insert a comment that reminds me to install hold downs). Ideally, I would be able to add the adv posting tab to the setup, but that is not an option. So I think the next best thing is to add the ability for a machining operation. There is a convenient settings option: .CustomMilling All non-hole Milling operations (2 Axis-through-Multiaxis) so I can cover all of the normal milling operations including profiling at once.

    Now I need to add the script to the post to retrieve and insert the comment.
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  11. #11
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Well, now I have the Adv Posting tab showing up but I can't access the UI components in the post script. I used the sample I linked above as a reference and it does not work in v27. I checked the scripting function names against the help file and verified everything. The script does not return the value, it returns nothing.

    Here are the scripts. Note that 2002 is exactly he same as the example and should return a default value. The default shows up on the adv posting tab. 2003 is my attempt to add a string.

    2002. Program Block 2.
    VALUE = MILL_GetUserEditRealVariable(2)
    MILL_SETRETURNSTRING(" Q" & VALUE )

    2003. Program Block 3.
    VALUE = MILL_GetUserEditStringSettingsVariable(4)
    MILL_SetReturnString(VALUE)


    I call them like:

    n,"(",program_block_2,")"
    n,"(",program_block_3,")"

    and the result is"

    10 (Q)
    20 ()

    (I had these at the start of the file).
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  12. #12
    Join Date
    Apr 2008
    Posts
    1577

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Just a couple things worth noting.

    Make sure your indices are properly matched up. When capturing the value for Edit Box #3 (EDIT_BOX,3,REAL) remember that you must call MILL_GetUserEditRealVariable(2). In the *.MillPst the array starts at 0 (zero) instead of 1, 2, 3. You may already know and you said you copied it verbatim so that is not likely the problem.

    The other thing worth noting is that you put n,"(",program_block_2,")" at the beginning. Program Block 2 is referencing MILL_GetUserEditRealVariable(2) which is a "by feature" variable. A "Settings" variable like you have in Program Block 3 is available throughout the post at any time (like a global variable) while the rest of the variables are more local. If they aren't called in the right spot they can return results you may not expect.

    It sounded like in your previous post like you were going to use the .CustomMilling method that makes the same Advanced Posting page available in all 2D milling operations. If you put program_block_2 in the beginning and the first operation is, say a hole, and you didn't enter a value for MILL_GetUserEditRealVariable(2) in the Hole Advanced Posting page it won't return anything.

    Clear as mud? Good

    Try putting program_block_2 in a different spot, like at the start of program (Block 2) or a tool change (Block 3) and see if it spits anything out and if so, where.

  13. #13
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Wow, that is exactly the problem. I don't even have to test it as I read this. I used the same index in both the post and ui file. I actually had scattered the call to the program block in several places.

    I updated the script to conditionalize it, if the string is null, it returns nothing. In the process of testing I added a 2nd string and saw some strange behavior but was getting something in the post. Your index comment above explains perfectly what I saw as I used index 2 and 3 in the UI file and was calling 2 and 3 in the post. Of course "2" was returning the values for "3" and "3" was returning null. Thanks!

    I'll make the updates and test it. Is the index offset documented somewhere? I don't recall seeing that anywhere.

    cheers,
    Michael
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  14. #14
    Join Date
    Apr 2008
    Posts
    1577

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Just to make sure there is not a bug in the V27, try this file with this post and variable page *.CustomProfile. Before the profile operation you should get the same as you did above:

    Code:
    N42 ( Q0)
    N43 ()
    At the Profile operation you should get:

    Code:
    N51 M05
    N52 M00
    (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~)
    (Machine Setup - 1  Profile Rough)
    (PROFILE ROUGH)
    (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~)
    (Tool: 0.500 x 2.000" 3F ACCUPRO EM - ALUM ZrN)
    N53 T4 M6
    N54 S3819 M03
    N55 G90 G54 X3.265 Y1.265
    N56 G43 H4 Z1. M08
    N57 ( Q25.3999996185303)
    N58 ()
    N59 G00 Z.1
    Attached Files Attached Files

  15. #15
    Join Date
    Apr 2008
    Posts
    1577

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    I don't recall if it is in the documentation. It was mentioned by one of the BobCAD techs a long time ago on a different forum when the post scripting was introduced and I (mostly) just remember it. It gets me every now and then and is an odd quirk.

    I'm still going to take a stab at posting an example of how I would tackle this problem. My own post needs a little work in this area, maybe I will find some enlightenment. Glad it worked for you Michael!

  16. #16
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Well, the index mismatch was indeed the issue! So that gives me the glue to now figure out exactly how I want this to work. In my current post on VCarvePro, where a new machining operation starts where I need to install hold downs, I insert:

    (Install Center Hold Downs)
    G0Z4
    G0X0Y0
    M0

    This was a manual process and required inserting a comment into the machine op and a special post processor that I wrote to extract this comment and insert it as code into the g-code file. "Error prone" is a better way to describe it. It seems like I'll be able to automate it with BC down to having support in the CAM UI to add the comment.

    In BC, I asked support how to "trigger" an M0 to allow installing the hold downs. The answer seemed to be to use multiple setups in the CAM tree. That makes a lot of sense. If I could use this UI extension mechanism to add a comment to a setup, it would be golden, but that is not supported. So, the next best option is to add the comment to the machining operation. Now I just need to make sure that I can get the comment to show up in the right spot with respect to the M0 that gets generated. This is what I am getting in my post now:

    (------------------------------------------)
    (Machine Setup - Perimeter)
    (------------------------------------------)
    N230 (install hold downs)
    N240 M00
    N250 G0 Z4.
    N260 G0 X0. Y0.

    But the comment "install hold downs" was added to the last mill operation BEFORE the machine setup change. The comment on the first mill operation in the new setup is not available when this block (#16) is called. I don't know if there is a way to script looking ahead by one? There may be other ways to do this too that I need to think about.
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  17. #17
    Join Date
    Apr 2008
    Posts
    1577

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Now you are at the exact same spot I'm at with my post (in a short amount of time, impressive).

    Yes, I agree that it seems the best way to get an M0 and insert instructions seems to be at a Machine Setup change. Unfortunately I ran into the same issue as you did and couldn't "look ahead" to use my next operation.

    One of the things I would like to do is like a conditional program stop. If the first tool in the next Machine Setup is the same as the tool in the last operation of Setup 1, I only want the tool to jump to clearance then move my table forward for clamp relocation, then stop. When the program restarts, I need a few safety codes to ensure that the height offset is applied properly (for mid-tape restarts) otherwise it's possible to have a crash. If the first operation in Setup 2 is calling a different tool than what is in the spindle, I would prefer the tool to retract to tool change position, then move the table forward, then preload the next tool, then stop.

    I've thought about a dozen ways to try to do this and none of them are ideal. I'm very interested in how you approach your problem as I think it may be key to figuring out mine.

  18. #18
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Thanks. It sounds like you basically need to do the same thing - position or relocate clamps/hold downs - at pre-defined places in the program. I have an idea to try tonight. Wish me luck!
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  19. #19
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    Ok, now I'm having trouble reading the value of a check box! I added to my ui file:

    CHECK_BOX,1,Insert Stop
    DEFAULT_CHECK,1,0

    And then added a new program block to my post:

    2004. Program Block 4.
    STOPVALUE = MILL_GetUserCheckBoxSettingsVariable(0)

    MILL_SetReturnString(STOPVALUE)

    No matter how the check box is set, this returns a 0. I tried using the same index # on both sides but that didn't work either. I must be misunderstanding something about checkboxes.
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

  20. #20
    Join Date
    Feb 2004
    Posts
    1311

    Re: My Grizzly G0704 mill post that launches GWizardE editor with posting

    So here is my idea...

    Every machine operation begins with a call to one of the two tool change blocks:

    3. Tool Change

    4. Null Tool Change

    So my idea is to insert the "Install Hold Down" comment program_block in these two. If it is a legitimate tool change, the stop calls (coolant_off, spindle_off and stop) are already called so it is just a matter of inserting the comment right before them. In the case of a null tool change, I'll use a checkbox on the Adv Posting page (along with the comment text field) called something like "Force Stop". If this checkbox is unchecked, then nothing is inserted in the code. If this is checked, then I'll insert the same coolant_off, spindle_off, stop code as 3. Tool Change does. I just don't need to insert a tool change (M6 Tx). I can even add a couple of extra fields to specify the X, Y, Z coordinates to move the spindle to so it is not in the way of installing the hold downs. If I can get the checkbox to work (see previous post) I think this is workable.
    Reelsmith, Angling Historian, and Author of "The Reelsmith's Primer"
    www.EclecticAngler.com | www.ReelLinesPress.com

Page 1 of 2 12

Similar Threads

  1. A Warning about Grizzly and the G0704 mill
    By wheeliecake in forum Benchtop Machines
    Replies: 84
    Last Post: 11-27-2014, 04:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •