r26D

The Future Belongs to the Creators ™

Improved: Creating a ShopBot Custom Cut File with a Menu Shortcut

The other day we added a Menu Shortcut to run our SuperZero routine.

After cutting some part files, turning off the machine and returning the next day, our menu shortcut failed. It threw an error warning that it couldn’t find Custom4.sbc in the current directory, which was the one where our project cut files were or the last directory we opened in the Control software.

After a little investigation, we found out that by simply copy and pasting the original XYX_CRNR.sbp in our custom cut file the Control software lost the source directory location. Doing some research pointed us to the FS command which allows you to set the location of the SbParts directory, which isC:\SbParts, that you can include in your Custom Cut file. We reset the Control software and the C4 menu shortcut worked again.

Looking into another command used on the original XYZ_CRNR.sbp file, we saw the line FP XYZ_INIT. FP tells the software to open a part file. Immediately we realized that we were doing it wrong and not following the DRY principle - Don’t Repeat Yourself. Instead of copy and pasting the part file into our Custom Cut, we can just reference the original and reduce duplication and future-proof the Custom Menu Shortcut. If we ever receive an updated XYZ_CRNR.sbp, we can just replace it the original location and the Custom Cut file will open the updated version.

As for added a model dialog to remind the Operator to connect the SuperZero and place the bit in the right place, you add a comment and a PAUSE command.

Our copy and pasted file was over a hundred lines long. Our new and improved version is:

` *** Hit ENTER When Ready - SuperZero connected & Bit over pocket ***
PAUSE  
SA
FS C:\SbParts
FP XYZ_CRNR