LinuxCNC stopping/freezes at G1 code but G1 works via MDI

More
01 Oct 2017 01:11 #99710 by lrsmith
I'm trying to setup a Sherline Mill using LinuxCNC and I have a pretty simple program that should work but everytime I run it, it hits the G1 code and just stops, still running but doesn't do anything. If I go through the MDI and enter the Gcode one at a time it works. I'm on LinuxCNC 2.7.11

The initial Gcode is below and it will hit line N21 and then just stop there and not continue.

%
(1001)
N10 G7
N11 G18
N12 G90
N13 G20

(PROFILE)
N14 T1 M6 G43
N15 G54
N16 G97 S500 M4
N17 G95
N18 G90 G0 X2.05 Z0.2656

N19 G0 Z-1.434
N20 X1.41

N21 G1 X1.25 F10
N22 X1.17
N23 Z0.
N24 X1.2831 Z0.0566

N25 G0 X1.33
.....

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
01 Oct 2017 04:28 #99721 by rodw
I'm only a novice but it looks like N20 is missing a G code. Should this
N20 X1.41
Be something like
N20 G1 X1.41?

Please Log in or Create an account to join the conversation.

More
01 Oct 2017 16:14 #99737 by lrsmith
It should still be in 'G1 mode' and do a move at feed-rate from line N21. I did try this as in, typing each line in on the MDI command it it behaved as expected. It should return an error if the g-code is bad but it loads, and runs up to that point and doesn't throw any errors,warnings, etc. It just hits line N21 and seems to freeze/stop.

But I was wondering that and I did modify the code and explicitly added the G1 commands and passed in the F parameter to each but it still behaved the same way, stopping at line N21.

I also tried stepping through each line, rather than run it all at once. It gets up to N21 and I cannot step past it, again no errors, warnings or any other messages

Please Log in or Create an account to join the conversation.

More
02 Oct 2017 00:30 - 02 Oct 2017 00:33 #99756 by jmelson
Do you have limit or home switches on the machine? Did you home the axes? If not, then you can have a random machine position left over from previous use of the machine. if that random position is near the soft limits, it will not go past that position. You SHOULD get a warning, right as you press R, that some limit is exceeded. But, it is possible for that dialog box to end up BEHIND the main Axis screen. I'm just guessing, as I have never seen this behavior, except in relation to the soft limits.

Oh, one other possibility is there is some odd character in the G-code file that is being interpreted as an end of file.
You can use the od program to see the binary character codes in a file.

So, do :

od -c <g-code file name>

and see if there are any odd characters near the N20 line.

Jon
Last edit: 02 Oct 2017 00:33 by jmelson.

Please Log in or Create an account to join the conversation.

More
02 Oct 2017 03:15 #99759 by lrsmith
Jon,

I'm using it with a standard Sherline Lathe, so no limit switches, etc. I did home all the axes and selected the Sherline lathe from the HAL setup. I didn't think to check for invisible chars I'll give that a check.

Thanks
Len

Please Log in or Create an account to join the conversation.

More
03 Oct 2017 22:17 - 03 Oct 2017 22:18 #99871 by andypugh
G95 (feed per rev) mode is active. That is typical for a lathe, but won't move at all without a spindle encoder.
Last edit: 03 Oct 2017 22:18 by andypugh.
The following user(s) said Thank You: lrsmith

Please Log in or Create an account to join the conversation.

More
06 Oct 2017 17:42 #100020 by lrsmith
It was indeed the G95 code. Thank you

Please Log in or Create an account to join the conversation.

Time to create page: 0.142 seconds
Powered by Kunena Forum