Results 1 to 10 of 10

Thread: Two quick programming/compatibility questions

  1. #1
    Join Date
    Oct 2014
    Location
    Somerville, MA
    Posts
    13

    Default Two quick programming/compatibility questions

    Greetings,

    I apologize if these are super noob questions, I'm still a little iffy on what gcode gets converted properly to SB and what gets discarded or misinterpreted. I've been having a really hard time with some Mastercam X6 (generic mill) WYSIWYG vs ShopBot 3 preview/WYSIWYG visualization inconsistencies, and I have two questions:

    1. Does the shopbot Preview always assume top of stock is zero? I almost never set zero to TOS because I use material that is really inconsistent in its thickness and I want to make sure that I get the breakthrough that I need. The SB preview always shows the tool going through my stock from the machine origin to get to the first cut. I have cut a handful of parts, and didn't have any problems (I also, as I have mentioned in previous posts, have run a similar CNC router for five years with Mach3 prior to getting the Shopbot), but now that I'm regularly using the Preview tool to check files (after a crash) I'm starting to second guess my programming.

    2. Does the shopbot not recognize something about gcode drilling operations, or something about planes or coordinate systems? I'm using a Default Mill post processor inside of Mastercam and the following code is supposed to drill two holes. Does anyone see anything that is unsupported code in the following routine:

    ( T62 | 1/8 DRILL | H62 )
    N100 G20
    N102 G0 G17 G40 G49 G80 G90
    N104 T62 M6
    N106 G0 G90 G54 X5.6012 Y6.315 A0. S2139 M3
    c6
    N108 G43 H62 Z.75
    N110 G98 G81 Z.1325 R.6575 F4.11
    N112 X10.3988
    N114 G80
    N116 M5
    N122 M30
    I'm just trying to get a handle on what I can and can't do in terms of programming, I'm afraid of generating code that is not recognized and losing valuable material or destroying the machine. Everyone that I talked to at SB prior to purchasing this machine said that it runs gcode fine, but compared to Mach3, it seems to be missing a lot of stuff, and that makes me really nervous.

    Thanks in advance for any words of wisdom,

    Aaron

  2. #2
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,769

    Default

    Hey Aaron,

    1) There's a setting in the previewer for the ZZero location. Look on the left side of the Preview window and there's a flyout menu for Material Setup...you'll find it in there.

    2) The ShopBot software only understands a subset of G Code commands. There's a list of supported GCode commands in the ShopBot wiki: http://shopbotwiki.com/index.php?title=GCodeMain

    There's also a MasterCam post that generates ShopBot files, but I have no experience with it:

    http://www.shopbottools.com/msupport/drivers.htm

  3. #3
    Join Date
    Oct 2014
    Location
    Somerville, MA
    Posts
    13

    Default

    Quote Originally Posted by BillYoung View Post
    Hey Aaron,

    1) There's a setting in the previewer for the ZZero location. Look on the left side of the Preview window and there's a flyout menu for Material Setup...you'll find it in there.

    2) The ShopBot software only understands a subset of G Code commands. There's a list of supported GCode commands in the ShopBot wiki: http://shopbotwiki.com/index.php?title=GCodeMain

    There's also a MasterCam post that generates ShopBot files, but I have no experience with it:

    http://www.shopbottools.com/msupport/drivers.htm
    Bill,

    Thanks. The preview is still showing me that the machine is starting from 0,0 and jogging through my stock (a red line) to get to the first move, but I think that this must be an error in the Preview, since it doesn't change even when I say that top of stock is the spoilboard, and as far as I can tell, there is no line of code that is commanding the tool to do so. The only way that I can get the preview to not jog through my part is if I reprogram the file such that the stock is below zero.

    I'll take a look at the supported commands again on the wiki page. And I tried to use that Mastercam post/definition, but I think that it is like 10 versions behind current.

    Aaron

  4. #4
    Join Date
    Dec 2000
    Location
    Thorp, WI
    Posts
    2,845

    Default

    Aaron,

    You could try using a FANUC format, but since there are some canned drilling cycles, most of it will be unsupported.

    The SB user guide pdf in C:\Program Files (x86)\ShopBot\ShopBot 3\Help folder has a good section on working with G-code on pages 50-58.

    There are several unsupported commands in your sample and also, G-code files are limited to one G instruction and one M instruction per line. In the event that there are two instructions, the first G-code on the line will be the one processed. In your sample....

    ( T62 | 1/8 DRILL | H62 ) OK.
    N100 G20 Inches OK.
    N102 G0 G17 G40 G49 G80 G90 Only the G0 is processed
    N104 T62 M6 Unsupported.
    N106 G0 G90 G54 X5.6012 Y6.315 A0. S2139 M3 Only the G0 is processed again, followed with a rapid move to X5.6012 Y6.315 Z.0 A0.0 with a spindle speed of 2139 and the M3 gets ignored because of the previous S command.
    c6 Unsupported.
    N108 G43 H62 Z.75 G43 tool offset unsupported. Z0.75 likely not processed due to previous G0 being cancelled and needed to be on it's own line with G0 preceding it.
    N110 G98 G81 Z.1325 R.6575 F4.11 G98/81 drill cycles unsupported and only the first G would be process and Z.1325 doesn't get processed, R unsupported.
    N112 X10.3988 Probably didn't do anything because of no G0 or G1.
    N114 G80 Canned cycle unsupported.
    N116 M5 Spindle off.
    N122 M30 Program end.

    So, all it does is jog to that one XY location at a depth of Z 0.00.

    If you have VCP or Shopbots version of VCP that came with your machine, toolpath it in there with the drilling toolpath and output native SB code.
    Scott




  5. #5
    Join Date
    Oct 2014
    Location
    Somerville, MA
    Posts
    13

    Default

    Thanks, Scott. Man, this is a bummer. FYI, the C6 is supported, I added that manually to the NC code to turn the spindle on. So I guess now I'm just trying to make lemonade...

    So, what is my best bet for converting the code into fully recognized SB code?

    Do you think that I would have better luck running a Router definition in Mastercam? I'm hesitant to leave mastercam or allow myself to be converted fully from NC to the SB syntax, because I want to stay within machine tool industry standard...so that I can run and work on other machines without a severe learning curve.

    Here is a snippet from the Router post showing a drill operation and then some normal 2d contour work:
    N100 G17 G20 G90 G40 G80 G64 G49 G0 M05
    N102 G8 P1
    N104 G90 M05 Z0
    N106 G52 X0. Y0. Z0.
    N108 T1 M6
    N110 G0 G90 G54 X5.6012 Y6.315 C0.
    N112 S18000 M3
    c6
    N114 G43 H1 Z2.
    N116 G17 G98 G83 Z.1325 R.5 Q.005 F18.41
    N118 X10.3988 Z.1325
    N120 G80
    N122 G54 X7.9625 Y5.7264 Z.75
    N124 Z.5
    N126 G1 Z.1033 F11.74
    N128 Y4.8976 F18.41
    N130 G2 X7.9 Y4.8351 I-.0625 J0.
    N132 X7.8913 Y4.8357 I0. J.0625
    N134 X7.7924 Y4.9323 I.0162 J.1155
    N136 G1 X7.7094 Y5.437
    N138 G2 X7.7829 Y5.6291 I.2987 J-.0042
    N140 G3 X7.839 Y5.74 I-.1903 J.1659
    N142 G2 X7.9 Y5.7889 I.061 J-.0136
    N144 X7.9625 Y5.7264 I0. J-.0625
    N146 G1 G54 Z.0492 F11.74
    N148 Y4.8976 F18.41
    N150 G2 X7.9 Y4.8351 I-.0625 J0.
    N152 X7.8913 Y4.8357 I0. J.0625
    N154 X7.7924 Y4.9323 I.0162 J.1155
    N156 G1 X7.7094 Y5.437
    N158 G2 X7.7829 Y5.6291 I.2987 J-.0042
    N160 G3 X7.839 Y5.74 I-.1903 J.1659
    N162 G2 X7.9 Y5.7889 I.061 J-.0136
    N164 X7.9625 Y5.7264 I0. J-.0625
    N166 G1 G54 Z-.005 F11.74
    N168 Y4.8976 F18.41
    Here is the same snippet from the Default Mill post:
    N100 G20
    N102 G0 G17 G40 G49 G80 G90
    N104 T1 M6
    N106 G0 G90 G54 X5.6012 Y6.315 A0. S48896 M3
    c6
    N108 G43 H1 Z2.
    N110 G98 G83 Z.1325 R.2575 Q.005 F50.
    N112 X10.3988
    N114 G80
    N116 X7.9625 Y5.7264 Z.75
    N118 Z.5
    N120 G1 Z.1033 F11.74
    N122 Y4.8976 F50.
    N124 G2 X7.9 Y4.8351 I-.0625 J0.
    N126 X7.8913 Y4.8357 I0. J.0625
    N128 X7.7924 Y4.9323 I.0162 J.1155
    N130 G1 X7.7094 Y5.437
    N132 G2 X7.7829 Y5.6291 I.2987 J-.0042
    N134 G3 X7.839 Y5.74 I-.1903 J.1659
    N136 G2 X7.9 Y5.7889 I.061 J-.0136
    N138 X7.9625 Y5.7264 I0. J-.0625
    N140 G1 Z.0492 F11.74
    N142 Y4.8976 F50.
    N144 G2 X7.9 Y4.8351 I-.0625 J0.
    N146 X7.8913 Y4.8357 I0. J.0625
    N148 X7.7924 Y4.9323 I.0162 J.1155
    N150 G1 X7.7094 Y5.437
    N152 G2 X7.7829 Y5.6291 I.2987 J-.0042
    N154 G3 X7.839 Y5.74 I-.1903 J.1659
    N156 G2 X7.9 Y5.7889 I.061 J-.0136
    N158 X7.9625 Y5.7264 I0. J-.0625
    N160 G1 Z-.005 F11.74
    N162 Y4.8976 F50.

  6. #6
    Join Date
    Dec 2000
    Location
    Thorp, WI
    Posts
    2,845

    Default

    Hey Aaron,

    I was hoping that someone with MasterCam experience would jump in here, but...

    I don't know what other posts are available in MC, but you could try a FANUC or do they have an ISO, norm emc or maybe a Mach3 post? Is there the capability of modifying a default post to output as needed? If the MC posts on the SB site won't work in your version, then maybe MC should update these to work with the current version (doesn't seem to be too much to ask for what you pay for MC and ongoing support!). I can output a Mach3 post from Aspire and run it on my machine without problems if desired.

    "Industry Standard" is a bit loose, when I look at my PostP folder for Aspire and there's 400 different post processors there. Looks like each manufacturer has their own idea on "standard". I recently had to look through some code for a Big Buselatto machine and at first glance, I didn't have a clue as to what was going on.

    In looking at your code snips, one really has to know his G-M commands and follow closely to see/decipher what's going on. There are many G commands in those snips that aren't supported and are preparatory or canned cycle commands. There are some that cancel out some positional values because of having other commands on the same line. Some with positional commands and no motion command like G0/G1 because modality has been changed since the last motion command.

    If looking at the code needed to do the same thing, or what you are wanting done, in openSB code, one could easily understand what's happening and with a lot less preparatory code. For someone that already knows G-code, learning SB speak is a piece of cake. When it comes down to it, how many of us really take the time to look at the code? Your problem is with the way MC outputs it. As far as drilling routines/toolpaths, they're just a set of plunges with the Z axis at specific locations. Here is a small file from Aspire for Mach3 that just peck drills 4 holes 0.75 deep and it runs fine on my machine...

    ( Drill 1 )
    ( File created: Tuesday, January 13, 2015 - 03:44 PM)
    ( for Mach2/3 from Vectric )
    ( Material Size)
    ( X= 11.250, Y= 6.000, Z= 0.875)
    ()
    (Toolpaths used in this file)
    (Drill 1)
    (Tools used in this file: )
    (15 = End Mill 5mm)
    N100G00G20G17G90G40G49G80
    N110G70G91.1
    N120T15M06
    N130 (End Mill 5mm)
    N140G00G43Z1.0000H15
    N150S16000M03
    N160(Toolpath:- Drill 1)
    N170()
    N180G94
    N190X0.0000Y0.0000F360.0
    N200G00X1.6117Y2.0218Z0.2000
    N210G00Z0.0200
    N220G1Z-0.3750F48.0
    N230G00Z0.0000
    N240G1Z-0.7500F48.0
    N250G00Z0.2000
    N260G00X3.3143Y2.1910
    N270G00Z0.0200
    N280G1Z-0.3750F48.0
    N290G00Z0.0000
    N300G1Z-0.7500F48.0
    N310G00Z0.2000
    N320G00X5.7889Y2.0324
    N330G00Z0.0200
    N340G1Z-0.3750F48.0
    N350G00Z0.0000
    N360G1Z-0.7500F48.0
    N370G00Z0.2000
    N380G00X8.0943Y2.3285
    N390G00Z0.0200
    N400G1Z-0.3750F48.0
    N410G00Z0.0000
    N420G1Z-0.7500F48.0
    N430G00Z0.2000
    N440G00Z1.0000
    N450G00X0.0000Y0.0000
    N460M09
    N470M30
    %
    Here's the same actual movement part of the code in SB. Pretty simple and concise. J is jog feed and M is move/cut feed. Speeds are set at the start. Coordinates are X, Y, Z, and A, B if using them.

    MS,6.0,0.8
    JZ,1.000000
    J3,1.611711,2.021794,0.200000
    J3,1.611711,2.021794,0.020000
    M3,1.611711,2.021794,-0.375000
    J3,1.611711,2.021794,0.000000
    M3,1.611711,2.021794,-0.750000
    J3,1.611711,2.021794,0.200000
    J3,3.314300,2.191000,0.200000
    J3,3.314300,2.191000,0.020000
    M3,3.314300,2.191000,-0.375000
    J3,3.314300,2.191000,0.000000
    M3,3.314300,2.191000,-0.750000
    J3,3.314300,2.191000,0.200000
    J3,5.788900,2.032400,0.200000
    J3,5.788900,2.032400,0.020000
    M3,5.788900,2.032400,-0.375000
    J3,5.788900,2.032400,0.000000
    M3,5.788900,2.032400,-0.750000
    J3,5.788900,2.032400,0.200000
    J3,8.094300,2.328500,0.200000
    J3,8.094300,2.328500,0.020000
    M3,8.094300,2.328500,-0.375000
    J3,8.094300,2.328500,0.000000
    M3,8.094300,2.328500,-0.750000
    J3,8.094300,2.328500,0.200000
    JZ,1.000000
    J3,0.000000,0.000000,1.000000
    If you want to get crazy and make some very custom routines, you can also use basic programing language. A quick glance at the programming handbook will show that there are many options to controlling your machine.

    I understand not wanting to learn another program for toolpathing, but If you have VCP that came with your SB, give it a try. Or, a call to MC to see what they have to say.

    Give openSB a chance, and you'll see it's not a lemon at all! I've always liked this section in the programming handbook...

    Why We Have a ShopBot Part File Format ...
    For those who are interested in such things, we would like to convey that the reason for having a specific Part File format is to make the process of producing, understanding, and maintaining your project files as easy as possible. There is an industrial standard for CNC files. This standard is referred to as 'g-code'. We could have run ShopBots directly from g-code. However, g-code is a language that was created in the days when cutting files were stored on punched tape and its format was optimized for brevity. These origins have left g-code unnecessarily arcane and difficult to understand when just inspecting a file. Moreover, it is a very loosely implemented standard with virtually every manufacturer using a different version and implementing it in idiosyncratic fashions.
    We felt that a Command language with mnemonically meaningful commands which were the same Commands used for direct control of the tool offered the best option for new robotics tool users. These types of Commands would be easier to learn, easier to understand, and easier to use in everyday work.
    In addition, we believed that if additional functionality were provided as 'programming' instructions in the format of the BASIC language, it would make them ready for use by anyone familiar with programming. This convention would also provide a clear set of prescriptions for the format in which functions should be added to the ShopBot control language.
    If you are already an experienced CNC programmer and prefer g-code or have software that generates g-code, our converter makes it possible to rapidly make the translation from a g-code file to a ShopBot Part File. Moreover, you will find that when you inspect a Part File, it will make perfect sense to you because it is functionally resembles a g-code file, being primarily a list of coordinates through which the tool is moved.
    Back to your main problem though, I guess it really comes down to what MC is willing to do to support ShopBot machines. They have to make posts for many others, so what's one more to keep customers using their product?
    Scott




  7. #7
    Join Date
    Oct 2014
    Location
    Somerville, MA
    Posts
    13

    Default

    Scott,

    I apologize for the late reply, the last few days got away from me. I also want to thank you for taking the time to work through this with me.

    I don't know what other posts are available in MC, but you could try a FANUC or do they have an ISO, norm emc or maybe a Mach3 post? Is there the capability of modifying a default post to output as needed?
    I think that the fanuc post is the standard output for the Default Mill in MC (MPFAN.pst). I managed to download an EXE for a machine definition for a different version of MC (x7), then pull the EXE apart (using Universal Extractor), remove the post processor file (attached for anyone interested), then I did a test by renaming the shopbot post to MPFAN and running my default mill machine definition with this post processor. It kind of worked, but it left a bunch of NC snippets in with the SBP code, which would be a real pain to remove in a large file.

    I think that I'm just going to stick with the Fanuc processor, and just avoid using subroutines that are not supported in MC when programming. And make sure to preview everything before I run it. But I just grabbed a Mach3 post/def for x6 and I'll see if that works better, I'd be very interested if it cuts out some subroutines, like the code that you put up.

    Give openSB a chance, and you'll see it's not a lemon at all!
    I do really like the quick subroutines, what I have seen of the language, and the ease of use of the machine, because of these shortcuts, etc. I really like that I can program hybrid code, and insert prompts and whatnot. The issue is that the Shopbot control software is one step in my larger workflow (the ultimate goal is making things, which I'm sure is universal among everyone on this board), in a series of tools that I use and like. I was basically trying to hot swap my old machine with the new one, without having to majorly disrupt my workflow, so that is where the frustration comes in. I'm not a machinist, and I don't have 20yrs of experience using and troubleshooting NC code (I'm open to new things and am a quick study), but I would like to be able to program and troubleshoot for other machines in the future, or if I needed to get a new job or something, I don't want to be dependent on a language and control style that is only used on one brand of machine.

    I'll keep you updated about the Mach3 post. I'll be running some tests shortly.

    Thanks again.
    Attached Files Attached Files

  8. #8
    Join Date
    Oct 2014
    Location
    Somerville, MA
    Posts
    13

    Default

    Ok, I just ran a test and I seemed to have less errors with the code generated by the Fanuc control than the Mach3.

    I have attached the Mach3 MasterCam x6 machine definition and post, and also noted the Shopbot Mastercam x7 machine definition and post origins**, for anyone interested in it.

    Thanks again everyone for your help, I'll update this thread if I make any breakthroughs.

    Aaron

    **http://www.patongroup.com/downloads.html
    Attached Files Attached Files

  9. #9
    Join Date
    Sep 2009
    Location
    Surrey, UK
    Posts
    1,271

    Default

    To be honest you're going to have a learning curve on any machine whether it supports "gcode" or not. It's a very loose standard.

    I see the way the CNC, 3D printing world is going (or even gone) being very similar to the programming industry in the 70's/80's. When I started if you couldn't program in machine code/assembler you weren't considered a "real" programmer and using higher level languages was considered a bit soft.

    With the advances in CAD/CAM programs I personally can only see very specialised needs to delve into the actual code. 99% of work will be done through the high level design programs.

    I used to spend a lot of time poring over code looking for optimisations etc but these days I just push the button on the code produced by the Vectric software from my designs and save hours of work. I have several friends who work in the automotive and racing industries with complex multi-axis machines and they don't touch the code that the design programs output either.

    Just my two pennies worth.
    The answers to a lot of questions can be found at http://www.shopbottools.com/ShopBotDocs/ or http://support.vectric.com/

  10. #10
    Join Date
    Oct 2014
    Location
    Somerville, MA
    Posts
    13

    Default

    Adrian,

    I totally agree with you about the direction that things are heading. Up until this issue with the Shopbot, I had never looked at my code, and I trusted the toolpaths that MC created completely.

    I'm a designer/engineer, not a machinist or programmer. The machine is just a tool that helps me be more self-sufficient, not my focus. If I never had to look at the code that would be fine with me.

    I'm trying to get this system dialed in so that I can get back to focusing on the things that I am trying to make. I'm not afraid of a learning curve, I just wasn't anticipating the programming language to be something that held me up, since everyone who I talked to at Shopbot (and the previous owner of the machine) said that gcode was supported. It is my fault for not reading the handbook for the machine prior to purchasing one, but I was under the impression that the SB language was just a bonus, not a higher prioritized language for the machine. I guess that is what it really comes down to.

    But, I don't want to linger on this. I'm at a point where I think that I have my workflow figured out and I'm ready to get back to work. I'm optimistic about the Shopbot and the parts that I have cut have been acceptable.

    Thanks everyone.

    Aaron

Similar Threads

  1. programming using SK
    By Justin G in forum Designing and Creating the sbp cutting file
    Replies: 7
    Last Post: 02-16-2016, 05:49 AM
  2. Compatibility mode for Win98/SB2.38
    By artbot in forum ShopBotter Message Board
    Replies: 6
    Last Post: 02-11-2014, 05:58 PM
  3. 2 Quick Spindle Questions
    By Mark Farris in forum ShopBotter Message Board
    Replies: 1
    Last Post: 08-07-2013, 05:37 PM
  4. opinions, board switch compatibility (pics)
    By artbot in forum ShopBotter Message Board
    Replies: 2
    Last Post: 07-16-2010, 01:13 PM
  5. Probe Compatibility
    By zeke in forum ShopBotter Message Board
    Replies: 11
    Last Post: 03-13-2009, 11:03 PM

Posting Permissions

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