586,042 active members*
3,753 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > BobCad-Cam > V23 Post Template
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2008
    Posts
    1577

    V23 Post Template

    BobCAD documentation has always been weak. Where's the V21 scripting manual? 'Nough said.

    There has been some improvement lately, the V23 API Mill Reference is a good example. But one glaring exception is a comprehensive listing of the Post Processor "code blocks". It seems we are only introduced to variables and blocks that are missing in our posts when problems crop up.

    To BobCAD's credit, the Post Processor engine seems to be a "work in progress" so perhaps a full listing of the code blocks with variables that don't yet function (or may be reserved for future use) may just further confuse some folks. But I am always of the mindset that with such a broad user base, we can figure some stuff out on our own, if given the tools.

    So with that said, here is my list of every known code block that I have managed to piece together from various posts from the BobCAD website. This may or may not be useful to anyone, but if you find a block in this file that you don't currently have in your post, just ask what it's used for and very likely you will find someone that has the answer.

    As an addendum, I would add that blocks 2001 - 2100 are reserved for scripting blocks 1-100. I have seen blocks in the 21xx range but I don't know exactly what they are for so I will leave it at that.

    TEMPLATE.zip

    Updated to include 2101 - 2102. Contri by Burr

    TEMPLATE 2009-11-04.zip

  2. #2
    Join Date
    Apr 2008
    Posts
    1577
    I'm reserving this spot to add a section with a complete (known) Post Variable listing.

  3. #3
    Join Date
    Apr 2008
    Posts
    1577
    And one more spot to add corrections and additions to the Mill API reference manual. I have spotted several errors already. Report them and I will add them.

    First, in section F. Miscellaneous in the API reference these lines should be corrected:

    q. MILL_GetUserCheckBoxVariable(short Index)
    r. MILL_GetUserEditIntegerVariable (short Index)
    s. MILL_GetUserEditRealVariable (short Index)
    t. MILL_GetUserEditStringVariable (short Index)
    u. MILL_GetUserSelectComboVariable (short Index)

    v. MILL_GetUserCheckBoxSettingsVariable(short Index)
    w. MILL_GetUserEditIntegerSettingsVariable (short Index)
    x. MILL_GetUserEditRealSettingsVariable (short Index)
    y. MILL_GetUserEditStringSettingsVariable (short Index)
    z. MILL_GetUserSelectComboSettingsVariable (short Index)

    q through u are used for the Feature level Variable pages. These variables only have a life span of the current operation.

    PostName.CustomBoring
    PostName.CustomCenterHole
    PostName.CustomChamferMill
    PostName.CustomContour <---- for the profile feature
    PostName.CustomEngrave
    PostName.CustomEngraveVector
    PostName.CustomFaceMill
    PostName.CustomHole
    PostName.CustomIrregularPocket <---- Pocket
    PostName.CustomOffsetContour <---- equidistant
    PostName.CustomReam
    PostName.CustomSlicePlanar
    PostName.CustomSliceSpiral
    PostName.CustomTap
    PostName.CustomThreadMill
    PostName.CustomVCarve
    PostName.CustomZLevelFinish
    PostName.CustomZLevelRough


    v through z are used for the Current Settings Variable page. These variables can be globally accessed at any time, by any script.

    PostName.CustomSettings

  4. #4
    Join Date
    Dec 2008
    Posts
    4548
    2101. Program Block #101 "To get access to complete NC File"

    2102. Program Block #102 "To get access to each line as it is posted"

    Code:
    3. void MILL_SetReturnString(LPCTSTR ReturnString)
    For the case that the block will output code within an existing posting line
    (i.e n, rapid_move, program_block_1,xr,yr).
    
    This would be used in place of “MILL_OutputText”, and “MILL_ProcessPostLine”.
    
    sets:
    
    Set the return string that will be used to output code with and existing post line.
    Code:
    4. void MILL_OutputText(LPCTSTR OutString)
    
    outputs:
    Line of text with CR/LF to the NC text file.
    
    5. void MILL_ProcessPostLine(LPCTSTR OutString)
    
    outputs:
    Output Line of variables and constants with CR/LF to the NC text file. (i.e. “n,rapid_move,xr,yr,’M08’”). The variables and constants will be treated just as it would in normal posting blocks.
    So in the scripts for the crop circles, it looks like the intelligence is built "hard" into the posting of a file. I think #3 should be used instead. Number 4 and 5, would be for processing code in an entire nc file and blocks 2101-2 give access for these textual inserts. Maybe the ability to do something to the "entire file" as opposed to just that particular operation. So steve is processing the output as it goes, when you may want to perform all the ops then review the code and change or insert something.

    Let me know if I'm off on this.

  5. #5
    Join Date
    Apr 2008
    Posts
    1577
    So if line 540. (Check each output line with scripting? y) is yes then 2101 and 2102 go to work on the text G code file after all other posting ops and scripting are done? That is the assumption that I've made but haven't really verified.

    Looking at the Bird's Haas VF post with the 2102 block script he reads in each line of the NC file:

    Code:
    Dim CurrentString
    CurrentString = MILL_GetOutputLineToNcFile()
    Then does some string manipulation/text parsing. Then passes the modified string back into the NC file.

    Code:
    MILL_SetOutputLineToNcFile(NewString)
    So I would say on 2102. you are correct. I haven't seen any example of how 2101. works.

    I would like to know if a script similar to Steve's crop circle script could be executed on the NC file AFTER it is posted. Would the calls to BobCAD specific functions like MILL_GetArcRadius() work or can you only work with the actual text of the NC file?

    If the answer is the later, then I don't think the crop circle script would work unless it was done inside the post engine where you can access things like the current arc angle, radius, etc. You might be able to calculate that with a script of your own but the only data the script would have to work with is plain text if I follow correctly.

    BTW, here is the crop circle script for reference, user stevespo shared it with us here: :cheers:

    http://www.cnczone.com/forums/showpo...4&postcount=65

  6. #6
    Join Date
    Dec 2008
    Posts
    4548
    Yes that is my understanding. I'm not much of a scripter , so cant get into too much of the detail, but like steves script processes the code "as it is created" inserting the blocks into the actual 64, 65, 66, lines, using the other way would be processing the nc file after it has been created and makeing changes and insertion post post. But I'm not sure if what needs to happen on the crop circles script, "Needs" to happen at runtime or not. Was just pointing out the blocks 2101 and 2102.

  7. #7
    Join Date
    Apr 2008
    Posts
    1577
    Quote Originally Posted by BurrMan View Post
    Yes that is my understanding. I'm not much of a scripter , so cant get into too much of the detail, but like steves script processes the code "as it is created" inserting the blocks into the actual 64, 65, 66, lines, using the other way would be processing the nc file after it has been created and makeing changes and insertion post post. But I'm not sure if what needs to happen on the crop circles script, "Needs" to happen at runtime or not. Was just pointing out the blocks 2101 and 2102.
    Sounds like we are on the same page then, which is good. I had trouble figuring out exactly what happens when you change 540. to yes. You're explanation of 2101 and 2102 put the missing pieces together for me. Now I feel like I'm getting the big picture. Thanks bro!

  8. #8
    Hello out there,

    I know this post is very old but I had to dig out my old V23 to use it again. Now I remember that it was possible to customize the build in features of BobCAD-CAM. I wanted to get rid of the "finish" tool in the reaming feature, because it makes no sense to me and I don't want to comment out a massive number of lines in code.

    So is there someone who still knows how to build those custom features? Would be glad for any help.

    Thank you in advance.
    <!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo-->David Frühling<!--sizec--></span><!--/sizec--><br /><b><!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo-->ER<!--sizec--></span><!--/sizec--></b><!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo-->LAS Erlanger Lasertechnik GmbH<br />Arbeitsvorbereitung<br />Kraftwerkstrasse 26<!--sizec--></span><!--/sizec--><!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo--><br />D-91056 Erlangen, Germany<!--sizec--></span><!--/sizec--> <br /><br /><br /><!--sizeo:1--><span style="font-size:8pt;line-height:100%"><!--/sizeo--><!--coloro:#000080--><span style="color:#000080"><!--/coloro--> <a href="http://www.xing.com/profile/David_Fruehling" target="_blank"><img src="http://www.xing.com/img/buttons/6_de_btn.gif" border="0" class="linked-sig-image" /></a><br /> <!--colorc--></span><!--/colorc--><!--sizec--></span><!--/sizec-->

Similar Threads

  1. Replies: 1
    Last Post: 01-01-2009, 06:05 PM
  2. I need a template made
    By F3RR3T in forum DIY CNC Router Table Machines
    Replies: 8
    Last Post: 09-25-2008, 12:51 AM
  3. CNC Setup Template
    By MartinLogan in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 1
    Last Post: 03-20-2007, 11:02 AM
  4. VQC Template Builder
    By leggetmachine in forum Haas Mills
    Replies: 3
    Last Post: 05-29-2006, 01:00 AM

Posting Permissions

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