Variables sub routines?


Results 1 to 3 of 3

Thread: Variables sub routines?

  1. #1
    Member
    Join Date
    Sep 2011
    Location
    USA
    Posts
    40
    Downloads
    0
    Uploads
    0

    Default Variables sub routines?

    I'm trying to write a warm up program that steps through rpm values. I found you can use Variables in Section 5 LINK of the manual. When I load this into the cnc (fadal 4020 with 88HS in format 2) all I get is "ERROR" with no explanation on the MU-47 screen.

    Any ideas?

    %
    O1001 (WARM UP)

    L0100 // Define Sub 01
    S+R0 M3 // Sets spindle speed to current R0 value
    R0+500. // Increase rpm by 500 each loop
    L0201 // Run sub 02
    M17 // End Sub 01

    L0200 // Define Sub 02 - draw two circles close to the extents of machine travel
    G0 G53 X-0.025 Y0.
    G2 X-19.975 I-9.975 F100.
    X-0.025 I9.975
    G1 X0.025 Y0. F100.
    G3 X19.975 I9.975 F100.
    X0.025 I-9.975
    M17 // End Sub 02

    M30 // End of sub section

    G90 G94 G17
    G20
    G28 G91 Z0.
    G90

    R0+500. // Sets initial rpm of 500
    T2 M6 // Put tool in spindle for warm up
    L0120 // Call sub 01 twenty times

    M5
    G28 G91 Z0.
    G90
    M30

    %


    I've also tried reducing the program to limit what could be wrong and it still doesn't work:

    %
    O1001 (WARM UP 10)

    # Clear (Clears all variables)
    # V1 = V1 + 500.
    # R1 = V1

    G90 G94 G17
    G20
    G28 G91 Z0.
    G90
    T2 M6 (Put tool in spindle for warm up)
    S+R1 M3
    G4 P1000

    M5
    G28 G91 Z0.
    G90
    G53 Y9.75
    M30

    %

    Similar Threads:


  2. #2
    Member
    Join Date
    Sep 2011
    Location
    USA
    Posts
    40
    Downloads
    0
    Uploads
    0

    Default Re: Variables sub routines?

    Bump, any hints?



  3. #3

    Default Re: Variables sub routines?

    Try this program tested on my Fadal Both Format 1 and 2

    %
    N1O3456(WARM UP)
    N2L100
    N3S+R0M3
    N4G4P1000
    N5#R0=R0+500.
    N6L201
    N7M17
    N8L200
    N9G0G90G17G80
    N10G53X-0.025Y0
    N11F100.
    N12X-0.025Y0I-1.G2
    N13X-0.025Y0I1.G3
    N14G1
    N15M17
    N16M30
    N17G90G94G17
    N18G20
    N19G28G91Z0
    N20G90
    N21T1M6
    N22#R0=500.
    N23L120
    N24M5
    N25G28G91Z0
    N26G90
    N27M30
    %



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Variables sub routines?

Variables sub routines?