603,946 active members*
2,969 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    175

    G Code Change

    Recently a customer sent a few files into the control and then saved them back out via the RS232 port on the Haas.

    They noticed that the G code was changed. For example,

    G1 and M6 were changed in the CNC control when they went to edit the NC program. The code was changed to G01 and M06. When punched out, the code came out as G01 and M06.

    Is this a parameter in the control that adds a leading zero? Or is this just the way the control handles it? Also, the program number changed from O1234 going in and back out as O01234.

    Thanks in advanced if you know what is going on...

    Greg Mercurio
    Shop Floor Automations, Inc.
    www.shopfloorautomations.com
    [email protected]

  2. #2
    Join Date
    Apr 2005
    Posts
    3634
    It's the same code.

    .

  3. #3
    Join Date
    Oct 2004
    Posts
    12
    Yep, same code. The machine just adds the 0s.
    If you go to MDI and type G1 and enter it, it will show up as G01.

  4. #4
    Join Date
    Mar 2005
    Posts
    1498
    070901-1152 EST USA

    gm3211:

    I am fairly certain (more or less provable from external experiments) that HAAS processes all incoming programs to an internal format that is not the external ASCII code. Generally the file size of the source program is smaller after loading into HAAS.

    I believe that when HAAS loads a program the ASCII number 12.0051 is considered to be an integer 120051 that is converted to binary which is 1D4F3 in hex format. A number 12.1 would be converted to 12.1000 and to 1D8A8 . Storage in binary most likely would be in 32 bit words. The number 12.0051 in the source file would occupy 56 bits of space vs 32 internal to HAAS.

    My assumption is that for normal positioning purposes that HAAS uses 32 bit integer arithmetic because this would eliminate cummulative errors. As a signed number 31 bits provides much more displacement range than any normal CNC would require. This range is 214,748.3647" to -214,748.3648" for a resolution to 0.000,1" .

    Note: however, if you used incremental motions of small displacements and did not use the decimal point, then a number like 15 (0.001,5") which in the source file requires 16 bits would expand to 32 bits in HAAS. I have not experimented to see if the size grows in HAAS.

    Considering functions like G01 or G1 and maybe G00001 (never tried this) and O34 or O00034 and so on HAAS will convert these to an internal format of some type. This conversion will not retain information on the exact nature of the source, and thus uses a standardized format on export. So G1 becomes G01 on output.

    On older HAAS machines the O number was limited to four base 10 digits. So on export you had an O45 from input change to O0045 on output. But on input O00045 is an error. On newer HAAS machines five digits are allowed and so five are output. But loading this into an older machine causes an error.

    .

  5. #5
    Join Date
    Jul 2004
    Posts
    175

    Haas Resolved

    Thanks everyone for the replies. I tested this locally on a Haas and it is true that G1 going into the CNC is changed to G01.

    Even MDI does the same thing.

    The customer thought that the software was doing this but then again, some guys have bad memories and it was the machine doing it.

    I appreciate the support!

    Greg Mercurio
    Shop Floor Automations
    Predator Software Dealer
    www.cncnetworking.com

Similar Threads

  1. To hand Code? or to CAD Code?
    By automizer in forum Polls
    Replies: 84
    Last Post: 07-22-2015, 09:58 PM
  2. How to change Tool change position(About MAZATROL T1 control)
    By liushuixingyun in forum Mazak, Mitsubishi, Mazatrol
    Replies: 6
    Last Post: 01-07-2014, 01:33 AM
  3. learning g code or cad-cam code output?
    By slow_rider in forum G-Code Programing
    Replies: 3
    Last Post: 02-28-2010, 03:48 AM
  4. G-code for beginners - want to learn G-code
    By FPV_GTp in forum G-Code Programing
    Replies: 7
    Last Post: 11-18-2008, 06:25 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
  •