![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hello, I am machining a bunch of rings from a lenght of tubing. I am turning, boring , parting off then incrementing my work offsets to start the next part. I would like to repeat the program and keep looping until I am close to the chuck. I want to preset the number of loops because I know how many parts I can make and I dont want to crash and I dont have macro cabability, so, I figure I can use M98 P(prog.)Ln however I am unsure of the syntax. I am running a Haas SL 30 lathe and when I try to type the prog. number after m30 I get a bad code message. Also anyone know if I can set up a safety zone so I dont crash into the chuck! |
|
#2
| |||
| |||
| Put all your operations in a subroutine. Call it something like N1000, this would be the sequence in the program. With the starting work offset active call the subroutine M97 P1000. This will do the first one. Next line increment your offset and call M97 P1000 with a L count. The L count is one less than your total. Next line reset your work offset back to the starting value. End program. |
|
#7
| |||
| |||
| the test program i did worked fine on an actual job. i ran 11 parts from the 1 setting. this was done with a fanuc control, i don't know anything about about a Haas but hope this helps o0001; (main) m98 p0002 L3; g10 L2 p1 w1.5; g28 u0 w0; m30; % o0002; (sub) g28 u0 w0; g00 z0.0 x68.0; s1200 m03; g01 x0.0 f0.5; g10 L2 p1 w-0.5; m99; % Note: if you reset the machine anytime during operation remember to set the p- setting back to zero otherwise it will start from where you last stopped and will crash. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |