am I doing this right?


Results 1 to 4 of 4

Thread: am I doing this right?

  1. #1
    Member burdickjp's Avatar
    Join Date
    Aug 2014
    Location
    United States
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default am I doing this right?

    I've written a short parametric program for doing vise clamps out of bar stock. I'm new to this and am wanting to learn and implement best practices for programming in G-code. Would anyone be willing to comment on what I've done here:
    Code:
    (tableClamps)
    (program cuts in quadrant I)
    
    #<countparts> = 3 ;how many parts to do
    #<spaceparts> = 8 ;distance between repititions of the parts
    #<zstep> = 1 ;distance to feed in z for every pass around
    
    #<positionslot> = 9
    #<heightslot> = 7.5
    #<depthslot> = 5.5
    #<diameterclearance> = 10.5
    #<diametercounterbore> = 16.0
    
    #<widthclamp> = 19
    #<lengthclamp> = [#<positionslot> + #<diameterclearance>/2 + #<diametercounterbore>/2 + #<depthslot>]
    
    G21 G90
    G00 X0 Y0 Z10.0
    G00 X0 Y-8.0
    M03 S1200
    
    o100 repeat [#<countparts>]
      M01
      G00 Z0
      G41.1 D6
      G01 Y0 F300
      o200 while [#<_z> GT [-#<widthclamp> + #<zstep>]]
        G91
        G01 Z-#<zstep>
        G01 Y[#<heightslot> + #<positionslot>]
        G02 X#<positionslot> Y0 I[#<positionslot>/2] J0
        G03 X#<positionslot> Y-#<positionslot> I#<positionslot> J0
        G01 X[#<lengthclamp> - #<positionslot> *2]
        G01 Y-#<heightslot>
        G01 X-[#<lengthclamp>]
      o200 endwhile
      G90 G40
      G00 Y-8.0
      G00 Z1.0
      G00 X[#<_x> + #<lengthclamp> + #<spaceparts>]
    o100 endrepeat
    
    M30
    %




  2. #2
    Member
    Join Date
    Feb 2006
    Location
    india
    Posts
    1792
    Downloads
    0
    Uploads
    0

    Default Re: am I doing this right?

    It is not Custom Macro B. Someone who knows about your control may help you.
    But you should come up with specific problems. People may not have patience to read and analyze your whole program.



  3. #3
    Registered Mhoppe's Avatar
    Join Date
    Oct 2014
    Location
    USA
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default Re: am I doing this right?

    Is that program for an Okuma control?



  4. #4
    Member burdickjp's Avatar
    Join Date
    Aug 2014
    Location
    United States
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: am I doing this right?

    It's for LinuxCNC.

    Sent from my E5803 using Tapatalk



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

am I doing this right?

am I doing this right?