CNC x-axis motor not moving

Thread Starter

quique123

Joined May 15, 2015
405
Im using UniversalGCodeSender in Java to control my cnc shield with 2 axes. At some point i remember both motors moving fine. But right now that I actually wanted to calibrate it, the X-axis motor makes the noise like its moving, but it doesnt move. Where do i start debugging, could it be a software issue or definitely hardware? The motor looks fine and so does the gear part. Im using utp cable from the motors to a female jumper cable for all 8 wires.

At config start I get this in the console.

>>> $$
$0 = 10 (step pulse, usec)
$1 = 25 (step idle delay, msec)
$2 = 0 (step port invert mask:00000000)
$3 = 0 (dir port invert mask:00000000)
$4 = 0 (step enable invert, bool)
$5 = 0 (limit pins invert, bool)
$6 = 0 (probe pin invert, bool)
$10 = 3 (status report mask:00000011)
$11 = 0.010 (junction deviation, mm)
$12 = 0.002 (arc tolerance, mm)
$13 = 0 (report inches, bool)
$20 = 0 (soft limits, bool)
$21 = 0 (hard limits, bool)
$22 = 0 (homing cycle, bool)
$23 = 0 (homing dir invert mask:00000000)
$24 = 25.000 (homing feed, mm/min)
$25 = 500.000 (homing seek, mm/min)
$26 = 250 (homing debounce, msec)
$27 = 1.000 (homing pull-off, mm)
$100 = 250.000 (x, step/mm)
$101 = 250.000 (y, step/mm)
$102 = 250.000 (z, step/mm)
$110 = 500.000 (x max rate, mm/min)
$111 = 500.000 (y max rate, mm/min)
$112 = 500.000 (z max rate, mm/min)
$120 = 10.000 (x accel, mm/sec^2)
$121 = 10.000 (y accel, mm/sec^2)
$122 = 10.000 (z accel, mm/sec^2)
$130 = 200.000 (x max travel, mm)
$131 = 200.000 (y max travel, mm)
$132 = 200.000 (z max travel, mm)



 

Thread Starter

quique123

Joined May 15, 2015
405
nevermind...got it working. took the motor out and it worked fine, something must have gotten stuck upon reassembly the first time.

actually i found out that its whenever i screw it back onto its frame, this part of the motor is pressed against the frame and causes the motor not to move.

25E20279-41F4-4E26-9442-14AA3257DA12.png
 

Thread Starter

quique123

Joined May 15, 2015
405
What do you mean out in the open?

Ok so I have both motors working (theyre from dvd drives). Im using universal gcode-sender with arduino UNO + cnc shield.

I downloaded the circle.nc file and tried sending that to the cnc, but I dont have my laser yet, so I cant mount it, so I tried gluing a pencil to it (where the laser reader lens is) and I think its making the right movements, but it seems to run into issues because it tries to go further than the motor shaft will allow. Im guessing I need to tell it where the max and min are so thats in the config, but Ive modified those values from 200 to 100 now to 20 and I still see the motor try to go over the max. Im thinking that even if I tell it thats the max, if the file calls for a bigger circle itll try to draw it.

I dunno what im doing wrong. need some guidance please.
 

Picbuster

Joined Dec 2, 2013
1,047
Hi,
The Gcode below describes the normal standard creating a circle.
G02, G03 - Circle movements
G02 means circle movement clockwise
G03 means circle movement counter clockwise!
You start from the present starting position, and give the centre of the circle in relative measure.
You must indicate the rotation angle in degrees (0 to 360), e.g. circle arc clockwise in X/Y-level, rotation angle 50 degrees:
G02 D50 I40 J-5
Or give the ending position instead of the rotation angle:
G01 X20 Y60 ;go to starting point
G02 X20 Y40 I0 J-10 ;180 degree-arc
Circle, counter clockwise, in X/Z-level, rotation angle 120 degrees:
G03 D120 I70 K25
Or give the ending point:
G01 X10 Y80 ;go to starting point
G03 X30 Y80 I10 J0 ;180 degree-arc right
G02, G03 - Circles in 3 dimensions
The CNC-programming allows the machining of circles in 2 1/2 D-mode. That means that circular movements can be made in the X-Y-level, the X-Z-level or the Y-Z-level. The level is indicated by the adjustment of the relative measures. The command .....
G02 D360 J10 K17 F100
...stands, for example, for a circular movement in the Y-Z-level.
The relative measures for the distance between starting point and center of the circle are generally adjusted as follows:
I to X-axis,
J to Y-axis,
K to Z-axis.

here is a working code for a std cnc milling machine
G00 Z5.00 ;pen to 5mm above object
G00 X110.00 Y110.00 ; move high speed to x,y
G00 Z0.50 ; move .5mm above object
G01 Z-1.00 F200 ; move 1mm into object seep 20 meters per minute
G02 I-20.00 J0.00 X110.00 Y110.00 ; drwa circle
G00 Z5.00 ; z up 5mm

G00 max speed
G01 as defined by Fxx
Picbuster
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
The axis is obviously trying to reach a position it cannot possibly complete, this would be a programmed position, the other possible cause is 'axis run-away'
Most CNC equipment have a means of preventing either, over-run L.S. etc.
Max.
 

Thread Starter

quique123

Joined May 15, 2015
405
I dunno...I don't know how to write gcode. Do you know of a resource I could learn from? I've looked for videos and sites and so far I've gotten how to install and use ugs by uploading files, but not about how to write gcode files.
 

Thread Starter

quique123

Joined May 15, 2015
405
OK I did it with G00 before you replied and it works I guess. So what's the difference between G00 and g01?

What about F? What do I set it to?
 

Thread Starter

quique123

Joined May 15, 2015
405
OK the software had a feed rate set at 25 by default. So I'm entering these commands manually in the ugs console one by one.

There are 2 issues:

1. Eventually I have to put this into a file. I've read that manual jogging parameters are different than file parameters? Dunno if it's true. But this will only be an issue when I get there.

2. The problem at hand is that for some reason when I manually enter these commands, the actual spindle or motor moves different amount along the X than along the Y. The X moves 2.5 cm vs 2.0 cm on the Y axis. This shouldn't happen I think.
 

Thread Starter

quique123

Joined May 15, 2015
405
Ok Im getting the hang of this. I just created an actual .nc file called square.nc. I added the lines mentioned above:

G00 X00 Y00
G01 X10 Y00
G02 X10 Y10
G03 X00 Y10

But it moves in a Z pattern, I'm guessing due to the order of the commands. But the issue of the 2.5 vs 2.0 cm difference remains.

The only issue solved is that it doesn't overshoot the max and min so I'm guessing it has to due with the size of the circle in the circle file I downloaded.
 
Last edited:

Thread Starter

quique123

Joined May 15, 2015
405
Sorry, I posted the wrong data:

G00 X00 Y00
G00 X10 Y00
G00 X10 Y10
G00 X00 Y10

As for F, do I simply add it at the end of the file like this:

F25
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
You realize those are all rapid (G00) moves?
F applies to maching modes, G01 etc.
I have no idea of the features of your system, but they can be metric or Imperial based commands.
Also it is common to have the ability to set your tooling dia etc in a tool table, this is so that when a certain tool is specified in the program, T1 etc, the diameter is taken in to account, this allows the tool path to be programmed in the desired final dimensions.
If you are looking to proceed in programming in G-code, I would suggest looking for some basic tutorials first.
Also establish the features and constraints of what your system can do
Max.
 
Top