Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Move to Table Base coordinate

  1. #1
    Join Date
    May 2014
    Location
    MA
    Posts
    611

    Default Move to Table Base coordinate

    So here's a question: I'm trying to write a script that moves to a specific TABLE BASE location, not one that is offset from my 0,0 location, so explain further:

    I start my machine up and I do C3. My tool is now zeroed in X and Y off of the prox switches. I can zero my table base coordinates there too. This way I can set software limits for my table so no matter where I zero my job I can't drive the machine off of the table.

    This works nicely for the keypad shortcuts, so even though I zero somewhere else on the table, my preset 1 always goes back to the TABLE BASE 0,0 (that's where I change my bits)

    What I'm looking to do is make a script that sends the tool to a TABLE base location in X and Y, regardless of where my current 0,0 setting is. Does that make any sense?

    Basically what I'm doing is trying to send my machine to a fixed zero plate, even though in my scripts I'm making sure I switch to absolute mode (SA) my moves are started from where ever I have zeroed, not from the table base 0....

    Is there a certain way I do a move for this to work the way that I want?

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

    Default

    Quote Originally Posted by EricSchimel View Post
    So here's a question: I'm trying to write a script that moves to a specific TABLE BASE location, not one that is offset from my 0,0 location, so explain further:

    I start my machine up and I do C3. My tool is now zeroed in X and Y off of the prox switches. I can zero my table base coordinates there too. This way I can set software limits for my table so no matter where I zero my job I can't drive the machine off of the table.

    This works nicely for the keypad shortcuts, so even though I zero somewhere else on the table, my preset 1 always goes back to the TABLE BASE 0,0 (that's where I change my bits)

    What I'm looking to do is make a script that sends the tool to a TABLE base location in X and Y, regardless of where my current 0,0 setting is. Does that make any sense?

    Basically what I'm doing is trying to send my machine to a fixed zero plate, even though in my scripts I'm making sure I switch to absolute mode (SA) my moves are started from where ever I have zeroed, not from the table base 0....

    Is there a certain way I do a move for this to work the way that I want?
    A running tally of the table base corrdinate offsets are stored in System Variables: %(6) for X, %(7) for Y, and %(8) for Z. So one thing you might try is subtract the appropriate system variable from the system variable for the current location.

    Maybe something like:

    M2, &(1) - &(6), %(2) - %(7)

    to move to Table base 0,0

    And just as an FYI, the default XYZero routines reset the Table Base coordinates on every run, I think using the VA command?

  3. #3
    Join Date
    May 2014
    Location
    MA
    Posts
    611

    Default

    Maybe I should have done a better job explaining this...

    When I run XY Zero (The stock Shopbot zero routine) I get my table base, and my current location set to 0,0 at the physical bottom left corner of my machine.

    So let's say I jog over to the middle of the table and zero my X and Y there by hitting Z2. So now my working 0,0 is somewhere in the middle of the table, but my table base coordinates 0,0 remains at the physical bottom left of the machine.

    What I want in my script is to be able to say "Go to this location on the table base coordinates" (not in reference to wherever I've zero'd my current job..

    I think what you're saying is that I can use those commands to MOVE my table base coordinates which is not something I want to do.

  4. #4
    Join Date
    Apr 2007
    Location
    Marquette, MI
    Posts
    3,388

    Default

    Eric...
    I would do it similar, but slightly different than Bill does. In your "go to zero plate" file:

    Lift Z
    &x_offset = 0
    &Y_offset = 0

    &x_offset = %(1) - %(6)
    &y_offset = %(2) - %(7)

    J2, {plate x} + &x_offset, {plate y} + &y_offset

    Then run "normal z zero" code

    You could also put the 2 offsets in the my variables file (and remove the "=0" lines) or even write them to the file. The ATC system uses table based cords for a number of things, look in the SbParts\Custom\ATC folder for more examples
    Gary Campbell
    GCnC Control
    GCnC411(at)gmail(dot)com
    Servo Controller Upgrades
    http://www.youtube.com/user/Islaww1


    "We can not solve our problems with the same level of thinking that created them"
    Albert Einstein


  5. #5
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,768

    Default

    Quote Originally Posted by EricSchimel View Post
    Maybe I should have done a better job explaining this...

    When I run XY Zero (The stock Shopbot zero routine) I get my table base, and my current location set to 0,0 at the physical bottom left corner of my machine.

    So let's say I jog over to the middle of the table and zero my X and Y there by hitting Z2. So now my working 0,0 is somewhere in the middle of the table, but my table base coordinates 0,0 remains at the physical bottom left of the machine.

    What I want in my script is to be able to say "Go to this location on the table base coordinates" (not in reference to wherever I've zero'd my current job..

    I think what you're saying is that I can use those commands to MOVE my table base coordinates which is not something I want to do.
    I'm still feeling like it does what you want.

    In your example, when you move to the middle of the table and zero the X and Y there, the system Variable for your new X location, %(1) , is now 0 and the same for current Y, %(2). Your current working location is 0,0

    The table base offset variables though will be how far you are from your table Base 0,0, the bottom left corner in your case. So for the middle of the table %(6) might be 48 and %(7) might be 24

    To move back to your table base 0,0 you just subtract the table base offset value from the current location value when you make the move, and you should go back to table base 0,0

    Your current location display will be -48,-24, but Table Base will be 0,0. If you want to go to somewhere other than table base 0,0, just add that value into the calculations in your move command.

    Bill

  6. #6
    Join Date
    May 2014
    Location
    MA
    Posts
    611

    Default

    Ah ok, Bills post is making more sense to me now Gary. Let me see if I can explain the code in English...

    Lift Z <Lifts Z axis to predetermined safe level
    &x_offset = 0 <Set's the offset back to 0. So in other words, if I had my tool zeroed out in the middle of the table, running this command would remove that "offset" and instead of my coordinates reading 0,0 out in the middle of the table they would read whatever my current table base coordinate is.
    &Y_offset = 0 <same as above

    &x_offset = %(1) - %(6) <I'm not clear on what these do
    &y_offset = %(2) - %(7)

    J2, {plate x} + &x_offset, {plate y} + &y_offset <Now that my offset is removed via the first two lines this jogs X and Y over to my plate location. It's doing that from the table base 0, adding the offset which we've set to 0 in the previous command?

    Assuming I'm right about how this works, is there a way to do this without resetting the offset, or is that the only way? (Reason being is that one could potentially swap out a tool mid file, re-zero and not lose the offset)

  7. #7
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,768

    Default

    Gary's routine is not resetting anything....either is mine. He's just done a neater job of what I did by putting the value of %(1) - %(6) into a user variable he has created called &x_offset, and the same for the Y axis.

    &x_offset and &y_offset are nothing special in this case...they are just a place to store the result of the calculations to make the Move/Jog command cleaner. There's nothing in either method that resets the Table Base coordinates.

  8. #8
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,768

    Default

    (Good to hear from you Gary..give me a call sometime if you get bored!)

  9. #9
    Join Date
    May 2014
    Location
    MA
    Posts
    611

    Default

    Ahh! I get it now, the % values store the actual location according to the table base coordinates. This all makes sense now!

    I couldn't find that in the ShopBot docs because I was looking in the wrong place (move commands)

    Ok, NOW I can really write my script!

    THANK YOU!

  10. #10
    Join Date
    Oct 2000
    Location
    Willis Wharf, VA
    Posts
    1,768

    Default

    Bingo.

    You can find out more about using system variables and see the list of all of them in the Programming manual...there's a link to it in the Help menu.

Similar Threads

  1. table base coordinates
    By jerryk in forum Assembly & Maintenance
    Replies: 13
    Last Post: 09-22-2016, 03:46 PM
  2. table base coordinate troubles
    By mramsey1136 in forum ShopBot Buddy
    Replies: 6
    Last Post: 09-29-2015, 01:32 PM
  3. Pedastal table base
    By Ajcoholic in forum Folder 2013
    Replies: 31
    Last Post: 05-11-2013, 05:31 PM
  4. A large table base
    By bob_s in forum Folder 2010
    Replies: 2
    Last Post: 12-19-2010, 08:53 PM
  5. Vac table - base board ?
    By dubliner in forum Archives2007
    Replies: 8
    Last Post: 08-21-2007, 08:06 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
  •