Page 1 of 1

Axis moving wrong direction from file

Posted: Wed Feb 14, 2018 2:08 pm
by spindle Nerd
I am having a issue with the z axis moving the wrong direction from g code files,if i command x-.5 from mdi it moves the correct direction ,but if you load a g code file and run it you get this .

The x moves correctly the z axis will go + when it's commanded to go - and the dro shows it is moving - direction ,and it is cumulative so it just keeps going till it hits a limit.

It also jogs correctly ,i am at a loss to explain this little feature! :lol:

Re: Axis moving wrong direction from file

Posted: Wed Feb 14, 2018 2:14 pm
by spindle Nerd
Sorry forgot to mention this is a two axis lathe using DMM servos And Dyn4 drives with x and z limits and servo spindle drive 1:1
Latest board and cnc 12 software.

Re: Axis moving wrong direction from file

Posted: Wed Feb 14, 2018 3:55 pm
by Dave_C
This may not be your issue but with a lathe there is the front/rear tool post issue. Tormach handles this issue by having you program in - number when in front of the spindle and in positive numbers when you are behind the spindle such as in the case of a rear tool post. This keeps everything in coordination with real Cartesian coordinates.

Mach 3 on the other hand lets you check a box in the setup and you can run + numbers from the front or the back of the spindle. I have a front mounted tool post and all diameters are posted as positive numbers.

Just a thought,

Dave C.

Re: Axis moving wrong direction from file

Posted: Wed Feb 14, 2018 4:10 pm
by spindle Nerd
This may not be your issue but with a lathe there is the front/rear tool post issue. Tormach handles this issue by having you program in - number when in front of the spindle and in positive numbers when you are behind the spindle such as in the case of a rear tool post. This keeps everything in coordination with real Cartesian coordinates.

Mach 3 on the other hand lets you check a box in the setup and you can run + numbers from the front or the back of the spindle. I have a front mounted tool post and all diameters are posted as positive numbers.

Just a thought,
The problem is the Z axis not the x or diameter , i did a test from the conversational did the same thing .
Thanks for helping, as soon as we get this figured out i might be able to make a part.

Re: Axis moving wrong direction from file

Posted: Wed Feb 14, 2018 6:19 pm
by Dave_C
The problem is the Z axis not the x or diameter
I guess it would help if I would learn to read, at least read a little slower! :roll:

I'm not sure what is wrong on the Z. But I think if it were my machine and I changed some things, I'd start looking at all the things I changed.

Like did you have to mess with reversing the motor, or changing the direction of the jog keys, invert the step or direction in the wizard? If the DRO says it is going one way but it actually goes the other then something got changed in the setup.

I know I have trouble when it comes to jogging a mill verses jogging a lathe. For me a lathe is simple. Z + is to the right and it is the right hand key on the job board. Same for X! The top key moves the tool in toward the work and the bottom key moves it toward me. All very natural but not so on a mill as the jog keys are movements of the tool and not the table. (actually both are tool movements)

You'll get it figured out!

If all else fails, start with a fresh install, put the servo back to start up state, test for movement and see what you get. If you jog the Z +, see if the DRO moves up in distance and the carriage moves to your right.

If it moves to the left but the DRO goes up in numbers then just reverse the motor direction in the Wizard setup.

Don't reverse any jog keys! (Not even sure that can be done but someone probably knows how to do it)

Dave C.

Re: Axis moving wrong direction from file

Posted: Thu Feb 15, 2018 7:43 am
by diycncscott
Change this:

Image

Re: Axis moving wrong direction from file

Posted: Thu Feb 15, 2018 8:46 am
by eng199
spindle Nerd wrote: Wed Feb 14, 2018 2:08 pm if i command x-.5 from mdi it moves the correct direction ,but if you load a g code file and run it you get this .
MDI and running a file are the same thing, so this is not possible.
There is probably some confusion due to CAD/CAM setup, incremental / absolute mode, tool setup, or part zero setup.

One other possibility...your MDI move was not slaved to the spindle, your program is, and the spindle encoder is counting backwards.

Re: Axis moving wrong direction from file

Posted: Thu Feb 15, 2018 10:09 am
by Dave_C
This may not be the problem either but can you manually move the Z axis in both directions by jogging it?

IF you can then it is taking both step and direction inputs. If not, then maybe it is seeing step inputs but no change of direction? So look for a loose wire or a missed wire for the direction input on that motor.

When things are going wrong we can "think" it is doing something when it is not and that can cause us to describe the issue wrong. Been there, done that! I thought I had all my wiring tested out as well and it turned out I had labeled a wire wrong on one of my limits. A very short one, but still wrong. Simple fix!

Dave C.

Re: Axis moving wrong direction from file

Posted: Thu Feb 15, 2018 2:54 pm
by Centroid_Tech
Turns out that the issue is with the programmed feedrate of F1.5 in G99, which is feed per revolution. A value that high is more of a value is more of a feedrate for feed per minute or G98 moves. A fix would be to either replace the G99 with a G98 or have the feedrate set to something like 0.001 rather than 1.5.

Re: Axis moving wrong direction from file

Posted: Thu Feb 15, 2018 3:04 pm
by spindle Nerd
Turns out that the issue is with the programmed feedrate of F1.5 in G99, which is feed per revolution. A value that high is more of a value is more of a feedrate for feed per minute or G98 moves. A fix would be to either replace the G99 with a G98 or have the feedrate set to something like 0.001 rather than 1.5.
Thank you to the centroid gentlemen that solved the problem ,i was going nut's with it and i will report the issue to BOBcad cam for modification of there software and post files. :D