. .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Neale View Post
    I'm used to seeing code that has something like:
    G28 G91 Z0
    G90
    near the end - meaning raise to machine Z0 before going to ref posn in XY, so you don't clout anything on the way.
    No Neale it doesn't mean that, this is what confuses people. G91 sets the mode to incremental so "Z0" doesn't mean go to ZERO. It means the intermediate move length is ZERO units long and then the Axis moves to the ZERO position. So in your case, it's just moving to ZERO, the result is the same thing but only because the value is ZERO, if it had been Z-10 then it would move -10 from the current position then moved to ZERO. Try it.!

    The reason G91 is often used is that sometimes you don't know the current location (ie: after a canned drilling cycle) so can't specify the current location as the intermediate location for the G28 move. So G91 incremental works better because you are now telling it to move a distance rather than to a location, Hence Z0 is moving ZERO units then it goes to MACHINE ZERO.

    Quote Originally Posted by Neale View Post
    What I'm not sure about (because the manual isn't that easy to understand) is whether this sequence would work on the SZGH controller as there is something about not moving along an axis if it is not specified in the G28, so you would actually need something like:
    G28 G91 X Y Z0
    G90
    - but maybe not!
    Looking at G30, I get the impression that it does exactly the same as G28 except that it uses the current work coord zero. But I'm guessing a bit here as the manual is not at all clear. In particular, it describes G28 in detail, then mentions G281/282/283/284 which do the same thing but only in X/Y/Z/A axis. It also talks about G301/302/303/304 which are similar but G30 is not mentioned in this section at all - although it is in the table of recognized gcodes.

    So, in practice, on this controller, if you have a fixed position tool setter or tool change position, would you arrange for this to be at machine coord zero, and arrange home switches at limits of travel but with appropriate offsets for the home position? Then G28 would work in the way that we currently know and love (including use of G91/90 as in my code snippet above).
    If it follows the common Fanuc standard, which I think it does, then it should work as I explained where G28 just moves to Machine ZERO but through an intermediate position. Only G30 with it's secondary parameters can move to different positions which are defined in the controls parameters and as shown called with a "p" call in the code ie: G91 G30 P301 Z0 where the "P301" is the parameter address in the controller and the value in this parameter is the location. The Z0 is again saying move Zero units for the intermediate move because we are in G91 Mode.

    What I think the manual is saying with G281/282/283/284/ is that it stores the ZERO values for each axis in these parameters, these parameters can then be called in macro's, etc using the "p" address. ie: G0 P282 is like saying G28 Y
    Last edited by JAZZCNC; 13-11-2020 at 11:39 PM.
    -use common sense, if you lack it, there is no software to help that.

    Email: [email protected]

    Web site: www.jazzcnc.co.uk

  2. #2
    Something else I think should be pointed out for sake of clarity and might also explain why G28 sometimes doesn't work as expected is better explination of the intermediate move and how it works. The intermediate move is NON optional for both G28 and G30 and it must be included along with an Axis definition for it to work. But this is what can make it appear to work strangely.?
    The G28/G30 commands is exclusively a move to MACHINE Zero Position, however, there's a sting in it's tail which is what bites people, so lets say you command:
    G90 G28 X0 Y0 Z0 what do you think will happen.?
    You'd assume X0,Y0,Z0 would mean move the axis to Machine Zero. . . .But it won't.!
    Remember the intermediate move MUST happen, so in this case X0,Y0,Z0 are the intermediate move coordinates but in what Coordinates system.? Machine or Work.?? . . Yep the intermediate moves are in WORK coords, so in this case it would go to the WORK ZERO, then to the MACHINE ZERO. And you can imagine the carnage that could happen if the tool was located at the other end of the machine and all 3 axis set off going for WORK ZERO together before heading to MACHINE ZERO.!!

    So this is why G90/G91 become so important when using G28/30. Often G28 will be proceeded with G91 to put into incremental mode to make it easier with the intermediate move then straight after the G28 move the next line will be G90 to put back into Absolute mode which is safer to work in.

    Little differences BIG end results if get it wrong.!
    Last edited by JAZZCNC; 14-11-2020 at 01:22 AM.
    -use common sense, if you lack it, there is no software to help that.

    Email: [email protected]

    Web site: www.jazzcnc.co.uk

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Upgrade questions fro beaver mill VBRP Mk2 with Anilam Crusader II controls
    By Breg90 in forum Milling Machines, Builds & Conversions
    Replies: 11
    Last Post: 25-05-2020, 08:08 PM
  2. RFQ: Semi automatic welding system Linear beam control system
    By richway in forum Projects, Jobs & Requests
    Replies: 0
    Last Post: 24-01-2017, 08:54 PM
  3. Replies: 3
    Last Post: 18-05-2014, 03:40 AM
  4. Replies: 0
    Last Post: 06-02-2014, 09:52 PM
  5. drive control system
    By oadamo in forum General Electronics
    Replies: 1
    Last Post: 22-05-2011, 07:30 PM

Bookmarks

Posting Permissions

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