Lathe G code program debug help needed

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

martyscncgarage
Posts: 9914
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: Lathe G code program debug help needed

Post by martyscncgarage »

Sorry! There were several reports within your REPORT file. I was looking at one from last year, not this year. (I'm not a coffee drinker and it was early :) )
Here is what is in the most current file and it is what you have in your screen shot:
Axis Label Motor Encoder Lash Comp. Limit Home Dir Screw
revs/in counts/rev. (inches) - + - + Rev Comp
1 Z 5.0835 6400 0.0000 0 0 0 1 Y N
2 X 7.1136 6400 0.0000 0 0 0 1 Y N
3 N 5.0000 1600 0.0000 0 0 0 1 N N
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
martyscncgarage
Posts: 9914
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: Lathe G code program debug help needed

Post by martyscncgarage »

adrewfis wrote: Tue Oct 06, 2020 11:07 am I'm curious where you are seeing 5 revolutions per inch? I am on a lathe and only use the first 2 axis (Z & X respectively). See attached screenshots showing the Axis Configuration page where it seems I do have 6400 revs filled in for both of my motors. They the are the ClearPath CPM-SDSK-2321S-ELN stepper motors (enhanced version for both).

The X-axis has 4 threads per inch and Z-axis has 5 TPI. I initially used these numbers with Marty's spreadsheet to calculate the turns ratio several times plus a dial indicator to get within .0000" or .0005" for each axis. I couldn't use a dial indicator this time because the MDI program/settings are so screwed up it knocks the whole dial indicator & base down as it exceeds the travel by multiple inches. That is why I used a tape measure WITH the MP4 and did not soley rely on what the MP4 said. The tape measure approach got it extremely close per the display settings on the MP4. I will do the same approach with the MDI later this evening but will have to set the Z axis close to home so it doesn't exceed the limits I had set. I think that was the reason I went with the MP4 last night as the MDI was knocking over the base and exceeding travel limits.

I don't have the part program with me. However, I seriously doubt 8 inches per minute is too fast for my setup. I believe the near catastrophe with that part program was the set screws on the pulleys were loose. Once I tightened them down hard, I recalibrated everything and I was still left with this issue. FYI, I'm not trying to run a part until I get these settings corrected. Things seem to work in JOG mode just not in program mode or MDI.

Marty, the limit switches you recommended came in last night and I will now have to modify my brackets (make them higher) since the tail is super short and I had accounted for the longer tails originally. I was surprised that this machine homes really good for how sloppy the current limit switches I have installed. Irregardless, I plan to swap them out later this week. Thanks for all your input.
Do take the time to read the manuals I sent, they may help and perhaps watch the video.
Use a dial indiator. Using MDI, if you command a G01Z-1.0F5, it should move the carriage toward the headstock 1" at 5 inches a minute. (provided you set part zero at the starting point first)
Would be great if you could post a video to YouTube (Mark unlisted and SHARE the link here) of what you are seeing and how you are going about it.
Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
adrewfis
Posts: 39
Joined: Sat Aug 29, 2020 7:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe G code program debug help needed

Post by adrewfis »

Marty, I've watched your video and looked at the manual. The video was most helpful and is where I learned how to do the overall turns ratio. I don't see the point in fine tuning anything (ballscrew comp, backlash, or fine tune DRO) until this gets a lot closer to what I command in the MDI. I'll do a video of the Z-axis taking out my dial indicator tonight and post it on here.
spindle Nerd
Posts: 89
Joined: Fri Jan 19, 2018 8:21 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No

Re: Lathe G code program debug help needed

Post by spindle Nerd »

I believe you are Feed per revolution instead of feed per minute ,and if you put 8 in FPR ,Acorn will run away to the max extent of your z axis and blow thru any limit you have set up, home or limit ask me how i know .
I looked at your g code file for facing and you had it in a G99 instead of a G98 i went thru this with support about two years ago they could not figure out what was causing it so they called a old guy that uses it all the time and he found the mistake i made .
You have to toggle the feed to get feed per minute when you write your program in centroid.
adrewfis
Posts: 39
Joined: Sat Aug 29, 2020 7:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe G code program debug help needed

Post by adrewfis »

spindle Nerd, that problem was caught and fixed over the last week. I noticed the feedrate was grayed out when you select a Rapid instead of Feedrate for the Line option. I swapped all my programs out with the correct feedrate. I appreciate you letting me and others know about that. I have a different issue now which I will post the video here shortly.

*Edited: I see what you're saying now. Thanks for the input!
Last edited by adrewfis on Wed Oct 07, 2020 10:11 am, edited 1 time in total.
adrewfis
Posts: 39
Joined: Sat Aug 29, 2020 7:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe G code program debug help needed

Post by adrewfis »

Marty, I tried doing what you said and nothing happens now when I use the MDI. The link to the video of me attempting this is below.

tblough
Posts: 3110
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Lathe G code program debug help needed

Post by tblough »

Your feedrate on the screen clearly shows 5.0 INCHES PER REVOLUTION and the spindle is not turning which is why you have no movement. If it was, you would once again blow through your indicator.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
adrewfis
Posts: 39
Joined: Sat Aug 29, 2020 7:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe G code program debug help needed

Post by adrewfis »

tblough, it's in inches per minute until I typed what Marty said and then it automatically switches to 5 in/rev. Is there a parameter that's automatically assigning any MDI input as in/rev? Actually just tried in fast mode G0 and it finally moved but only once. Was off .0166. Now it won't move in MDI or when I try to run a sample program. It only works when I jog manually and it's really close to dead on when I move it -6.0000.
cncsnw
Posts: 3859
Joined: Wed Mar 24, 2010 5:48 pm

Re: Lathe G code program debug help needed

Post by cncsnw »

Note the highlighted "G99" in the live G code status display below the MDI prompt. You have to type a G98 every time you start a new MDI session in order to have inches per minute.
adrewfis
Posts: 39
Joined: Sat Aug 29, 2020 7:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe G code program debug help needed

Post by adrewfis »

Thanks for pointing the G99 code out, cncsnw. The G98 code worked and I was able to move it in the negative direction but not back to zero. I will have to tweak the turns ratio based on the negative direction moves and then I'm guessing after a few times this will get me back to zero. The sample part and one of my own worked after typing in the G98 code. Will have to do the tweakin' tomorrow as morning is callin'.
Post Reply