585,991 active members*
6,624 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1

    Post

    Hello people,

    could anyone translate that into 840C or 840D? It would be great. I need it for a little quantity of engravings.

    It’s in fanuc language. I can do the most myself, but I don’t have experience with Fix at 840C/840D.

    FANUC:

    #31=#531
    #29=0.1
    WHILE[#31GE1]DO1
    #31=#31/10
    #29=#29*10(ANZAHL DER STELLEN DER ZAHL)
    END1
    (;-)
    #31=#531
    N9997
    IF[#31LE0]GOTO9998
    #30=FIX[#31/#29]
    #31=#31-#30*#29
    #29=#29/10
    #30=#30+10
    GOTO#30
    (;-)
    N10 (ZAHL 0)
    G65P9200 A10. B6. C4. F500. R1. Z-0.1 (0)
    GOTO9997
    N11..... etc

    N9998 G90
    (ENDE VOM PROGRAMM)
    M01 (TASTE M01 DRUECKEN WENN MAN NOCH MAL EINSPRINGT)
    #531=#531+1.(TEILE-ZAEHLER)
    N9999M99

    I would do it the following way for Siemens 840C:

    R31=R531
    R29=0.1
    N9995
    @134 R31 K1 K9996
    R31=R31/10
    R29=R29*10(ANZAHL DER STELLEN DER ZAHL)
    @100 K-9995
    (;-)
    N9996
    R31=R531
    N9997
    @124 R31 K1 K9998
    R30=FIX[R31/R29] R31=R31-R30*R29
    R29=R29/10
    R30=R30+10
    @100 R30
    (;-)
    N10 (ZAHL 0)
    ....
    @100 K-9997
    N11..... usw

    N9998 G90
    (ENDE VOM PROGRAMM)
    M01 (TASTE M01 DRUECKEN WENN MAN NOCH MAL EINSPRINGT)

    R531=R531+1.(TEILE-ZAEHLER)

    N9999M17

    Regards Pi_1

  2. #2
    Hello,

    Trunc should give back integer part of a real number.
    At least 840D should understand it:
    R30=TRUNC(R31/R29)
    I’m not sure about 840C. I would search the documentation for @622.

    Cu TheBlackBird ®

  3. #3
    @TheBlackBird

    Merci.
    I’ll take a look at the PDF and I’ll probably test it this week.

    Regards
    Pi_1

Posting Permissions

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