Setting up 5axiskins

More
04 Jan 2012 18:07 #16310 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
I solved problem with compile/install so modified kinematics is implemented and running.

Machine is now homing ok, and also jog with no problem, but as soon as I load g-code and run it, there shows joint0 following error and then also joint6 following error.
Under gantrykins worked ok (same g-code).

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

More
04 Jan 2012 19:20 #16312 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

Machine is now homing ok, and also jog with no problem, but as soon as I load g-code and run it, there shows joint0 following error and then also joint6 following error.


Does it jog correctly in both joint-mode and world-mode?

It is possible I got the inverse kins wrong, perhaps both X and X2 feedback positions are going to X, and shouldn't.
(Though as far as I can see Gantrykins does that).
Is your HAL file consistent?

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

More
04 Jan 2012 21:02 #16313 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
I think something else is now causing this problem.
When I jog rotary axis (B or C), after homing in world mode I have Joint following error. If I manually enter g-code in MDI axis are working ok.
All linear axis are jog ok and correctly.

Even with gantrykins doesnt work....

Here are sections from my ini:

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 2
PROGRAM_PREFIX = /home/tomaz/emc2/nc_files
DEFAULT_ANGULAR_VELOCITY = 25
MIN_ANGULAR_VELOCITY = 5
MAX_ANGULAR_VELOCITY = 30
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
MAX_LINEAR_VELOCITY = 50.00


[TRAJ]
AXES = 9
COORDINATES = X Y Z B C
HOME= 0 0 0 0 0
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 50.00
DEFAULT_ACCELERATION = 20.00
MAX_ACCELERATION = 180.00



#X
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 50
MAX_ACCELERATION = 60.0
STEPGEN_MAXACCEL = 80.0
SCALE = -266.666666667
FERROR = 1
MIN_FERROR = .5
MIN_LIMIT = 0.0
MAX_LIMIT = 1705.0
HOME_OFFSET = 0.0
HOME_SEQUENCE = 1
HOME_SEARCH_VEL = -5.00000
HOME_LATCH_VEL = 2.00000
HOME_IGNORE_LIMITS = YES


#B
[AXIS_4]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 30
MAX_ACCELERATION = 60
STEPGEN_MAXACCEL = 70
SCALE = -166.666666667
FERROR = 1
MIN_FERROR = .5
MIN_LIMIT = -130.0
MAX_LIMIT = 130.0
HOME_OFFSET = 17.000
HOME_SEQUENCE = 1
HOME_SEARCH_VEL = 5.00000
HOME_LATCH_VEL = -2.00000
HOME_IGNORE_LIMITS = YES

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

More
05 Jan 2012 11:59 #16330 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

I think something else is now causing this problem.
When I jog rotary axis (B or C), after homing in world mode I have Joint following error. If I manually enter g-code in MDI axis are working ok.
All linear axis are jog ok and correctly.

Even with gantrykins doesnt work....


Not working with gantrykins probably means that it is a configuration problem rather than a kinematics problem.

#B
[AXIS_4]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 30
MAX_ACCELERATION = 60
STEPGEN_MAXACCEL = 70
SCALE = -166.666666667


30 degrees/sec and a scale of 166 is 5kHz, so it isn't likely to be that the stepgen can't keep up (unless make-pulses is in the servo thread, not the base thread).
What value is being used in the HAL file for stepgen.maxvel?

Does it jog without error if you reduce the angular jog speed with the slider?

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

More
05 Jan 2012 12:57 #16340 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
andypugh wrote:

Not working with gantrykins probably means that it is a configuration problem rather than a kinematics problem.


Agree, that's why I also tested with gantrykins and even there angular axes didn't jog in World mode.

#B
[AXIS_4]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 30
MAX_ACCELERATION = 60
STEPGEN_MAXACCEL = 70
SCALE = -166.666666667


30 degrees/sec and a scale of 166 is 5kHz, so it isn't likely to be that the stepgen can't keep up (unless make-pulses is in the servo thread, not the base thread).
What value is being used in the HAL file for stepgen.maxvel?


This is from HAL for B (angular) axis definitions:

#joint 4
setp stepgen.4.position-scale [AXIS_4]SCALE
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 27272
setp stepgen.4.dirsetup 8272
setp stepgen.4.maxaccel [AXIS_4]STEPGEN_MAXACCEL
net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd
net bpos-fb stepgen.4.position-fb => axis.4.motor-pos-fb
net bstep <= stepgen.4.step
net bdir <= stepgen.4.dir
net benable axis.4.amp-enable-out => stepgen.4.enable
net min-home-b => axis.4.home-sw-in
#net min-home-b => axis.4.neg-lim-sw-in


I don't have stepgen.maxvel defined here for any of axis, and linear axis are working ok.

Does it jog without error if you reduce the angular jog speed with the slider?


Maybe weird thing is, if I jog it in positive direction it gives error in moment of release button like "deacceleration" wouldn't work , when I try to jog in negative, error shows up immediately (happens only in world mode after homing).

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

More
05 Jan 2012 13:24 #16341 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

Maybe weird thing is, if I jog it in positive direction it gives error in moment of release button like "deacceleration" wouldn't work , when I try to jog in negative, error shows up immediately (happens only in world mode after homing).


I have a vague feeling that this is possibly due to the execution order of the functions in threads. Or that might have been a completely different problem.

What order are the various functions added to the threads?

Which version of EMC2?

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

More
05 Jan 2012 18:01 #16349 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
andypugh wrote:

tommy wrote:

What order are the various functions added to the threads?


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="0xe800 out 0xec00 in "
setp parport.0.reset-time 500
loadrt stepgen step_type=0,0,0,0,0,0,0,0


addf parport.0.read base-thread
addf parport.1.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf parport.1.write 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
net spindle-cmd <= motion.spindle-speed-out

Which version of EMC2?


EMC2 2.4.6

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

More
05 Jan 2012 18:12 #16350 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

[loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD
...

That all looks fine

EMC2 2.4.6

There is a 2.4.7 but as far as I know none of the updates are relevant.

Out of interest, what happens if you net position-fb direct to position-cmd? If that removes the issue it is something to do with step generation, if it doesn't then it is something else.

ie swap:
net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd
net bpos-fb stepgen.4.position-fb => axis.4.motor-pos-fb

to
net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd stepgen.4.position-fb
# net bpos-fb stepgen.4.position-fb => axis.4.motor-pos-fb

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

More
05 Jan 2012 18:56 #16352 by tommy
Replied by tommy on topic Re:Setting up 5axiskins
I did suggested change:

#joint 4 B
setp stepgen.4.position-scale [AXIS_4]SCALE
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 27272
setp stepgen.4.dirsetup 8272
setp stepgen.4.maxaccel [AXIS_4]STEPGEN_MAXACCEL
#net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd
#net bpos-fb stepgen.4.position-fb => axis.4.motor-pos-fb
net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd stepgen.4.position-fb
net bstep <= stepgen.4.step
net bdir <= stepgen.4.dir
net benable axis.4.amp-enable-out => stepgen.4.enable
net min-home-b => axis.4.home-sw-in
#net min-home-b => axis.4.neg-lim-sw-in

But received this on start up:

Debug file information:
my-5axis.hal:157: Signal 'bpos-cmd' can not add OUT pin 'stepgen.4.position-fb', it already has OUT pin 'axis.4.motor-pos-cmd'
5215
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


I noticed one more thing in preview window when machine is homing, B rotates "around" Y axis, and that is different than on machine, where B rotates "around" X axis when it is in home position.

And another "weird" thing on B and C axis, in world mode, after short "click" on negative direction jog button, axis rotates much more than for same click on positive jog button.

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

More
05 Jan 2012 18:59 #16353 by andypugh
Replied by andypugh on topic Re:Setting up 5axiskins
tommy wrote:

I did suggested change:

And that was foolish, as I messed up…

my-5axis.hal:157: Signal 'bpos-cmd' can not add OUT pin 'stepgen.4.position-fb', it already has OUT pin 'axis.4.motor-pos-cmd'

This is what you needed:
net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd axis.4.motor-pos-fb
# net bpos-fb stepgen.4.position-fb => axis.4.motor-pos-fb

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

Time to create page: 0.361 seconds
Powered by Kunena Forum