Editing a Post Processor in BobCAD-CAM

Posted July 24, 2024 4:02 pm   Published by    BobCAD-CAM ">

Modifying your post processor in BobCAD-CAM can greatly enhance the output of your NC programs and customize them to fit your specific machine requirements. BobCAD-CAM offers a wide range of pre-configured post processors that have been proven on numerous machines. However, users often want to format the output differently to match their personal preferences or specific operational needs. Whether you need to adjust the output for better readability or to include specific commands unique to your setup, updating your post processor is easier than you might assume.

Understanding Post Processors

The post processor controls the output of your NC programs (G-code) based on the type of machine that will run the program. Each post processor is defined in a .BCPst file, which can be opened in any text editor, and located in the BobCAD-CAM Data folder. This file translates job information into an .nc file (or other supported extensions) used by your machine.

Setting Up Your Post Processor 

First, ensure that all machines you use are defined, and assign a post processor to each using the Current Settings Default dialog box. To do this, right-click on CAM Defaults in the CAM Tree and select Current Settings. This launches the Current Settings dialog, where you can select a machine in the Machine Parameters page, and then assign a post processor to it in the Posting page. When creating a new CAM job, the post processor is then automatically set based on the selected machine. You can modify these settings for the current jobs at any point​.

Lesson

Debugging and Modifying a Post Processor in BobCAD-CAM

Modifying post processors in BobCAD-CAM is essential for customizing the output of your NC programs. This lesson will guide you through the steps to debug and edit your post processor efficiently.

  1. Locate Your Post Processor FilePost processor files are stored in specific directories based on the type of machine:
    • Mill: C:\BobCAD-CAM Data\*(Current Version)*\Posts\Mill
    • Lathe: C:\BobCAD-CAM Data\*(Current Version)*\Posts\Lathe
    • Mill Turn: C:\BobCAD-CAM Data\*(Current Version)*\Posts\MillTurn
  2. Open the File in a Text EditorOpen the post processor file using a text editor such as Notepad++ or Visual Studio Code.
  3. .
  4. Enable Debug Mode
    .
    To help identify which sections of the post processor are generating specific parts of the output, you can enable the debug mode.

      • Locate the Debug Line: Find the line in the post processor file that controls the debug mode. This line typically looks like this:
        .
        26. Set debug comments for post editing
        debug_off

    .

      • Enable Debug Mode: Change debug_off to debug_on to turn on debugging.
        .
        26. Set debug comments for post editing
        debug_on

    .

    • Save the File: Save your changes to the post processor file.
  5. Generate and Analyze Output:
    .
    Generate a G-code file using BobCAD-CAM. With debug mode enabled, the output will include additional information that indicates which blocks of the post processor are responsible for each part of the G-code.
  6. .
  7. Make Adjustments:
    .
    Using the debug information, locate the specific blocks in the post processor file that you want to modify. Make the necessary adjustments to the code.
  8. .
  9. Turn Off Debug Mode:
    .
    Once you have made and verified all your adjustments, disable debug mode by setting it back to debug_off:
    .
    26. Set debug comments for post editing
    debug_off
  10. .
  11. Save and Finalize:
    .
    Save the file again to finalize your changes. Generate a final G-code file to ensure the output is as expected without the debug information.

.

Advanced Modifications

For those looking to dive deeper into post processor customization, BobCAD-CAM offers advanced features:

  • Post Scripting: This involves using VBScript to create custom scripts for your post processor, allowing for more complex and tailored outputs​.
  • Advanced Posting with Custom Files: This includes adding custom files to some feature dialog boxes for more intricate modifications​.
  • Formatting Variable Output: Learn how to format the output of post variables to suit your needs.

Learning Resources

BobCAD-CAM provides several resources to help you get started with modifying your post processors. By leveraging these tools and resources, you can tailor your post processors to enhance your machining operations, ensuring that your NC programs are optimized for your specific requirements:

Post Processor section of the BobCAD-CAM Help System 
BobCAD-CAM Post Processor Help System
Launchpad Post Processor and Machine Definition Bundle

Conclusion

Modifying your post processors in BobCAD-CAM can significantly enhance the customization and efficiency of your NC program outputs. By enabling debug mode, you can precisely identify and adjust the necessary sections of your post processor file to meet your specific needs. This process, while straightforward, opens up extensive possibilities for tailoring your G-code outputs, ensuring that they align perfectly with your machine requirements and personal preferences.

Remember to always save and test your changes thoroughly to ensure they produce the desired results. With the resources and support provided by BobCAD-CAM, including comprehensive documentation and detailed courses, you have all the tools at your disposal to become proficient in post processor modification.

 

Questions? Call Us to speak with a CAD CAM Pro!

Leave a Reply

Your email address will not be published. Required fields are marked *