588,711 active members*
5,607 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > GibbsCAM > Compost3 programming
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2015
    Posts
    9

    Compost3 programming

    Hi,

    I want my postprosessor to output Z-stock data in my NC-code

    ZStockDelta# does that, but comes with six decimals. How can i specify that I want just 1 decimal.

    Example:

    Output in NCfile is: 60.000000
    Want it to be: 60.0

    Can anybody help me?

    Thanks in advance

  2. #2
    Join Date
    Jan 2009
    Posts
    104

    Re: Compost3 programming

    Use the Format command:
    FORMAT(ZStockDelta#,12) then make sure you have
    #12 = '####.0;0.' in the format definitions, let me know if that
    formats the way you need it

  3. #3
    Join Date
    Oct 2015
    Posts
    9

    Re: Compost3 programming

    Thank you very much for the replay.

    I will test that out, but what does #12 mean?

    my code looks like this now:

    '( ------NULLPUNKT------ )' EOL {Makro for  sette nullpunkt til Okuma genos L200E-M}
    'N000 EMNE=' ZStockDelta# ' ' 'BAKE=53.0' EOL
    'N000 CALL ONUL' EOL
    '(---)' EOL

    Should I rewrite it like this then:?


    #12 = '####.0;0.'
    FORMAT(ZStockDelta#,12)

    '( ------NULLPUNKT------ )' EOL {Makro for  sette nullpunkt til Okuma genos L200E-M}
    'N000 EMNE=' ZStockDelta# ' ' 'BAKE=53.0' EOL
    'N000 CALL ONUL' EOL
    '(---)' EOL

    Quote Originally Posted by mcode View Post
    Use the Format command:
    FORMAT(ZStockDelta#,12) then make sure you have
    #12 = '####.0;0.' in the format definitions, let me know if that
    formats the way you need it

  4. #4
    Join Date
    Oct 2015
    Posts
    9

    Re: Compost3 programming

    It worked out!

    Thank you.

    But I had to change from 12 to 1, because the program multiplied the value by 2.

    Which format command do use to get no decimals
    On this format: 60

  5. #5
    Join Date
    Jan 2009
    Posts
    104

    Re: Compost3 programming

    The Format command only formats and doesn't change the the value. at the beginning of the code
    you will see a list of format definitions that are numbered:
    #1 = '#.00'
    #2 = '####0.0##'
    #3 = '*####0.0##'
    #4 = '###0.0###'
    #5 = '#######0'
    #6 = '###0.0'
    #7 = '##0.0#'
    #8 = '###0.0########'

    Place the format definition at the bottom of that list and give it the next available number, in the example list
    above it would be #9 = '####.0;0.'
    then when you want to use the FORMAT command it would be FORMAT(ZStockDelta#,9)
    you can use definition #5 in the list above for no decimal.

  6. #6
    Join Date
    Oct 2015
    Posts
    9

    Re: Compost3 programming

    Quote Originally Posted by mcode View Post
    The Format command only formats and doesn't change the the value. at the beginning of the code
    you will see a list of format definitions that are numbered:
    #1 = '#.00'
    #2 = '####0.0##'
    #3 = '*####0.0##'
    #4 = '###0.0###'
    #5 = '#######0'
    #6 = '###0.0'
    #7 = '##0.0#'
    #8 = '###0.0########'

    Place the format definition at the bottom of that list and give it the next available number, in the example list
    above it would be #9 = '####.0;0.'
    then when you want to use the FORMAT command it would be FORMAT(ZStockDelta#,9)
    you can use definition #5 in the list above for no decimal.

    I found out on friday.Thank you very muck for your reply though. You were very helpful!

Similar Threads

  1. Edit a post processor with compost3
    By snaasbo in forum GibbsCAM
    Replies: 15
    Last Post: 06-13-2024, 01:29 AM
  2. Compost3 Debug DLL
    By cncrunner in forum GibbsCAM
    Replies: 13
    Last Post: 06-18-2015, 08:17 PM
  3. Xilog 3 Parametric Programming Offline Programming
    By julioykaly in forum Commercial CNC Wood Routers
    Replies: 1
    Last Post: 04-27-2013, 09:22 PM
  4. Programming
    By mschmitz88 in forum Fanuc
    Replies: 1
    Last Post: 03-06-2012, 10:46 AM

Tags for this Thread

Posting Permissions

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