Deviation problem with configured axis

More
14 Oct 2011 11:57 #13910 by Tilman
Hi,

I just set up my first cnc. After finding out that Windows/Mach3 just makes trouble I installed Ubuntu/EMC². I used the stepconf wizard to go through the configuration and everything worked well. I was able to configure all axis to 0,01mm precision. How I did it:

- Fixing a caliper at the rail so that the axis runs against the caliper.
- Running the axis a few mm forward to eliminate play from the nut.
- Resetting the caliper and start a 100mm forward run

I repeated these steps many times to find the perfect leadscrew pitch and ended up with 3 digits behind the comma. My result is pretty satisfying and the caliper always shows a distance between 99,99 and 100,01mm, regardless of the driven speed. The precision is the same with F20 or F400.

Now I opened EMC² with the created configuration and loaded a simple code:
F200
G21 G90
G1 Y105
G1 Y0
G1 Y5
M2

After running the code once I should be able to get exactly 100mm (distance from 5 to 105mm) and no play should affect the result since the axis already ran 5mm to eliminate play from the nut.

But the result differs depending on the driven speed. The faster I run the axis, the more deviation I have:
- F50: 99,97mm
- F200: 99,15mm
- F500: 97,73mm

My first idea was lost steps since I still have a problem with max. jitter. The average (base thread) is about 15.000 but I noticed interupts with over 300.000. I still couldn't figure out what's the reason. These jumps seem to come up every 32 seconds.

However, after each run the caliper shows 0,00mm. The machine stops perfectly at the initial point. Also the deviation is repeatable. 10 test runs with F200 will always result in 99,14mm to 99,16mm.

Any idea,what to do?

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

More
14 Oct 2011 12:07 #13911 by BigJohnT
Well you could just run for 30 seconds or fix the latency issue which might be SMI.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?FixingSMIIssues

Or are you trying to use a laptop computer?

John

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

More
14 Oct 2011 13:17 #13912 by Tilman
I just edited rtapi.conf as described in 4.and added the smi module. The path to shm was empty but since there is no rtai_shm.ko in my modules directory, I left the path empty.

With only adding rtai_smi I couldn't figure out any difference. I still have these interrupts that look like "typical SMI interrupt" described at 3.

Do I have to get rtai_shm to run as well?

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

More
14 Oct 2011 13:41 #13913 by kostas
Try giving a G61 from MDI and then run the program, or input the above commands from MDI one at a time and see what happens.

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

More
14 Oct 2011 13:51 #13914 by BigJohnT
Sorry, but I don't know anything more about SMI than where the link is.

John

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

More
14 Oct 2011 14:35 #13915 by Tilman
Perfect, that's it: With G61 I get results +/- 0,01mm, regardless of the driven speed, even with F500.
What does that mean for normal operating? Always set a G61 in front of the code or does it say that something is still misconfigured?

Btw: I still get those SMI interrupts but they don't seem to harm the precision at all. I will try to find a way how to scale long distance runs to check wether there are drifts or not.

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

More
14 Oct 2011 14:55 #13916 by ArcEye
Hi

You will need to post your .hal and .ini files for anyone to advise properly

If Absolute Path Mode (G61) , as kostas suggested, works, then normally your velocity and acceleration figures need looking at, since G61 will override these, even coming to a complete stop, to ensure you reach the desired co-ordinate.

Sometimes what seem reasonable figures are complicated by the fact that micro-stepping is set so high that EMC has to output huge numbers of pulses to get anywhere.

If you have an incorrect base thread number too, latency and missed steps could have a big effect.

regards

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

More
14 Oct 2011 15:02 - 14 Oct 2011 15:06 #13917 by Tilman
This is the machine's ini:
# Erstellt von stepconf am Thu Oct 13 17:49:02 2011
# Änderungen an dieser Datei werden beim nächsten
# Aufruf von stepconf überschrieben.

[EMC]
MACHINE = P1
DEBUG = 0

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/tilman/emc2/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = emc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

[HAL]
HALFILE = P1.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 1.00
MAX_LINEAR_VELOCITY = 10.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 15.0
STEPGEN_MAXACCEL = 18.75
SCALE = 500.187570339
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -4.0
MAX_LIMIT = 470.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -2.000000
HOME_LATCH_VEL = 0.999625
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 15.0
STEPGEN_MAXACCEL = 18.75
SCALE = 500.187570339
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -4.0
MAX_LIMIT = 990.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -2.000000
HOME_LATCH_VEL = 0.999625
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 10.0
MAX_ACCELERATION = 15.0
STEPGEN_MAXACCEL = 18.75
SCALE = 500.187570339
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -400.0
MAX_LIMIT = 4.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 2.000000
HOME_LATCH_VEL = -0.999625
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0

and the hal:
# Erstellt von stepconf am Thu Oct 13 17:49:02 2011
# Änderungen an dieser Datei werden beim nächsten
# Aufruf von stepconf überschrieben.
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out  "
setp parport.0.reset-time 2000
loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out
loadrt pwmgen output_type=0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread

net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-enable <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 45.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true
net dout-02 <= motion.digital-out-02

net spindle-pwm => parport.0.pin-01-out
setp parport.0.pin-02-out-invert 1
net xdir => parport.0.pin-02-out
setp parport.0.pin-03-out-invert 1
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
setp parport.0.pin-04-out-invert 1
net ydir => parport.0.pin-04-out
setp parport.0.pin-05-out-invert 1
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
setp parport.0.pin-07-out-invert 1
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
setp parport.0.pin-08-out-invert 1
net adir => parport.0.pin-08-out
setp parport.0.pin-09-out-invert 1
net astep => parport.0.pin-09-out
setp parport.0.pin-09-out-reset 1
net dout-02 => parport.0.pin-14-out
net charge-pump => parport.0.pin-16-out
net xenable => parport.0.pin-17-out


net max-home-z <= parport.0.pin-10-in
net estop-ext <= parport.0.pin-11-in
net min-home-y <= parport.0.pin-12-in
net min-home-x <= parport.0.pin-13-in


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 52000
setp stepgen.0.dirsetup 52000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net min-home-x => axis.0.home-sw-in
net min-home-x => axis.0.neg-lim-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 52000
setp stepgen.1.dirsetup 52000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
net min-home-y => axis.1.home-sw-in
net min-home-y => axis.1.neg-lim-sw-in

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 52000
setp stepgen.2.dirsetup 52000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable
net max-home-z => axis.2.home-sw-in
net max-home-z => axis.2.pos-lim-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Since I'm new to cnc and don't have any linux experience, let me know if there are any other than these two files that need to be checked.
Last edit: 14 Oct 2011 15:06 by Tilman.

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

More
14 Oct 2011 15:51 #13919 by kostas
r0sewhite wrote:

What does that mean for normal operating? Always set a G61 in front of the code or does it say that something is still misconfigured?


G61 is for exact path mode. G61.1 for exact stop. I don't really know the difference, because I don't use either for normal stuff.
G64[pXXX] is the opposite, means it will try and maintain constant feedrate, with an optional pXXX meaning it will not deviate more than XXX from the toolpath.

I usually do a G21G64p0.1, for metric and max deviation of 0.1mm

ArcEye wrote:

If Absolute Path Mode (G61) , as kostas suggested, works, then normally your velocity and acceleration figures need looking at, since G61 will override these, even coming to a complete stop, to ensure you reach the desired co-ordinate.


I don't think that G61 will override any velocity and acceleration values. Also, since r0sewhite's calipers shows 0 when coming back, I don't see any missing steps either. I proposed the G61 because EMC's default behavior is a G64 with not p value, so deviation is dependent on feedrate.

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

More
14 Oct 2011 16:10 #13920 by Tilman

kostas wrote:
I don't think that G61 will override any velocity and acceleration values. Also, since r0sewhite's calipers shows 0 when coming back, I don't see any missing steps either. I proposed the G61 because EMC's default behavior is a G64 with not p value, so deviation is dependent on feedrate.


It obviously does not override any values. Acceleration seems to be like I configured it and velocity simply depends on what Code I enter.

Regarding missed steps: That's what I thought too. When the problem is missing steps, the machine would not run back to exactly 0,00mm. It would be very strange if the number of missing steps is the same in both directions and repeatable.

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

Time to create page: 0.217 seconds
Powered by Kunena Forum