MESA 5-Axis - Axis-3 Following Error
26 Jul 2018 06:54 - 26 Jul 2018 06:56 #114858
by Askjerry
MESA 5-Axis - Axis-3 Following Error was created by Askjerry
I used the PNC Wizard to create a functional XYZA mill... the A/B table that I have spins the A-Axis on command.
I reconfigured it again, this time pointing the A-Axis at the connection for the B-Axis... using A-Axis commands, the B-Axis moves just fine.
I configured the XYZA again, pointing to the correct A-Axis hardware and terminal on the MESA, tested it, and it works.
Next I went into the INI file and made the following changes...
FROM
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
TO
[TRAJ]
AXES = 5
COORDINATES = X Y Z A B
Then I did a copy of the A-Axis and modified it for B-Axis...
#********************
# Axis B
#********************
[AXIS_4]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 166.666666667
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 208.3
STEPGEN_MAXACCEL = 500.0
# these are in nanoseconds
DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 6000
STEPSPACE = 6000
STEP_SCALE = 26.6667
BACKLASH = 0.05
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
HOME_OFFSET = 0.0
That was all the changes to the INI... onto the HAL...
It already has 5 STEPGEN available...
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_3pwmgens=0 num_stepgens=5 sserial_port_0=00xxx "
I manually added a B-Axis by cloning the A-Axis and changing "a" to "b" and [AXIS_3] to [AXIS_4].
And all references to stepgen.03 were changed to stepgen.04 as needed.
Then I went in and did the same in the next section... creating "B" from "A"...
net joint-select-d halui.joint.3.select
net a-is-homed halui.joint.3.is-homed
net jog-a-pos halui.jog.3.plus
net jog-a-neg halui.jog.3.minus
net jog-a-analog halui.jog.3.analog
net joint-select-e halui.joint.4.select
net b-is-homed halui.joint.4.is-homed
net jog-b-pos halui.jog.4.plus
net jog-b-neg halui.jog.4.minus
net jog-b-analog halui.jog.4.analog
I saved it all... started the machine... clicked on HOME for each axis... and it shows X-Y-Z-A-B very nicely...
If I enter G1 A90 F1000 the A-Axis moves 90 degrees. (Yeay)
If I enter G1 B90 F1000 the machine stops and proclames JOINT 03 FOLLOWING ERROR.
What is going on? I can't seem to resolve it. Once I get this running... I should be able to wire up my actual (HUGE) mill with the new MESA card and convert the monster into a 5-Axis. But for right now I'm stumped.
Can anyone help???
Jerry
File Attached:
I reconfigured it again, this time pointing the A-Axis at the connection for the B-Axis... using A-Axis commands, the B-Axis moves just fine.
I configured the XYZA again, pointing to the correct A-Axis hardware and terminal on the MESA, tested it, and it works.
Next I went into the INI file and made the following changes...
FROM
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
TO
[TRAJ]
AXES = 5
COORDINATES = X Y Z A B
Then I did a copy of the A-Axis and modified it for B-Axis...
#********************
# Axis B
#********************
[AXIS_4]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 166.666666667
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 208.3
STEPGEN_MAXACCEL = 500.0
# these are in nanoseconds
DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 6000
STEPSPACE = 6000
STEP_SCALE = 26.6667
BACKLASH = 0.05
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
HOME_OFFSET = 0.0
That was all the changes to the INI... onto the HAL...
It already has 5 STEPGEN available...
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_3pwmgens=0 num_stepgens=5 sserial_port_0=00xxx "
I manually added a B-Axis by cloning the A-Axis and changing "a" to "b" and [AXIS_3] to [AXIS_4].
And all references to stepgen.03 were changed to stepgen.04 as needed.
Then I went in and did the same in the next section... creating "B" from "A"...
net joint-select-d halui.joint.3.select
net a-is-homed halui.joint.3.is-homed
net jog-a-pos halui.jog.3.plus
net jog-a-neg halui.jog.3.minus
net jog-a-analog halui.jog.3.analog
net joint-select-e halui.joint.4.select
net b-is-homed halui.joint.4.is-homed
net jog-b-pos halui.jog.4.plus
net jog-b-neg halui.jog.4.minus
net jog-b-analog halui.jog.4.analog
I saved it all... started the machine... clicked on HOME for each axis... and it shows X-Y-Z-A-B very nicely...
If I enter G1 A90 F1000 the A-Axis moves 90 degrees. (Yeay)
If I enter G1 B90 F1000 the machine stops and proclames JOINT 03 FOLLOWING ERROR.
What is going on? I can't seem to resolve it. Once I get this running... I should be able to wire up my actual (HUGE) mill with the new MESA card and convert the monster into a 5-Axis. But for right now I'm stumped.
Can anyone help???
Jerry
File Attached:
Last edit: 26 Jul 2018 06:56 by Askjerry. Reason: Corrective
Please Log in or Create an account to join the conversation.
26 Jul 2018 07:51 #114859
by rodw
Replied by rodw on topic MESA 5-Axis - Axis-3 Following Error
Jerry, Others might have better advice but when I was setting up my machine, I found increasing these beyond the recommendation often stopped the following errors. You are using backlash so maybe thats the problem.
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 208.3
STEPGEN_MAXACCEL = 500.0
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18524
- Thank you received: 6190
26 Jul 2018 07:54 #114860
by tommylight
Replied by tommylight on topic MESA 5-Axis - Axis-3 Following Error
Ini file has some issues, namely the f_error and min_f_error are set for inches while everything else is in mm.
Hal file :
net a-home-sw => axis.3.home-sw-in
net a-neg-limit => axis.3.neg-lim-sw-in
net a-pos-limit => axis.3.pos-lim-sw-in
you have the same for A and B axis. Needs to be changed accordingly.
Hal file :
net a-home-sw => axis.3.home-sw-in
net a-neg-limit => axis.3.neg-lim-sw-in
net a-pos-limit => axis.3.pos-lim-sw-in
you have the same for A and B axis. Needs to be changed accordingly.
Please Log in or Create an account to join the conversation.
27 Jul 2018 00:05 #114921
by Askjerry
Replied by Askjerry on topic MESA 5-Axis - Axis-3 Following Error
Tommylight: the "in" you see is pointing to a switch INPUT... has nothing to do with measurement systems.
If I do this... the A-Axis moves and the B-Axis fails.
If I make a simple change... it reverses which gen is used... and the A-Axis now fails.
So the failure is staying with stepgen_04 for some reason.
But I literally cloned B from A in the HAL...
Then I did the same thing with the INI... and dropped the speed significantly.
Does somebody out there have a WORKING 5-AXIS that i can look at the file? This is driving me nuts!!!
If I do this... the A-Axis moves and the B-Axis fails.
#*******************
# AXIS A
#*******************
# Step Gen signals/setup
#setp hm2_5i25.0.stepgen.04.dirsetup [AXIS_3]DIRSETUP
#setp hm2_5i25.0.stepgen.04.dirhold [AXIS_3]DIRHOLD
#setp hm2_5i25.0.stepgen.04.steplen [AXIS_3]STEPLEN
#setp hm2_5i25.0.stepgen.04.stepspace [AXIS_3]STEPSPACE
#setp hm2_5i25.0.stepgen.04.position-scale [AXIS_3]STEP_SCALE
#setp hm2_5i25.0.stepgen.04.step_type 0
#setp hm2_5i25.0.stepgen.04.control-type 0
#setp hm2_5i25.0.stepgen.04.maxaccel [AXIS_3]STEPGEN_MAXACCEL
#setp hm2_5i25.0.stepgen.04.maxvel [AXIS_3]STEPGEN_MAXVEL
net a-pos-fb axis.4.motor-pos-fb <= hm2_5i25.0.stepgen.04.position-fb
net a-pos-cmd axis.4.motor-pos-cmd => hm2_5i25.0.stepgen.04.position-cmd
net a-enable axis.4.amp-enable-out => hm2_5i25.0.stepgen.04.enable
#========================================================================================================
#*******************
# AXIS B
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.03.dirsetup [AXIS_4]DIRSETUP
setp hm2_5i25.0.stepgen.03.dirhold [AXIS_4]DIRHOLD
setp hm2_5i25.0.stepgen.03.steplen [AXIS_4]STEPLEN
setp hm2_5i25.0.stepgen.03.stepspace [AXIS_4]STEPSPACE
setp hm2_5i25.0.stepgen.03.position-scale [AXIS_4]STEP_SCALE
setp hm2_5i25.0.stepgen.03.step_type 0
setp hm2_5i25.0.stepgen.03.control-type 0
setp hm2_5i25.0.stepgen.03.maxaccel [AXIS_4]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.03.maxvel [AXIS_4]STEPGEN_MAXVEL
net b-pos-fb axis.3.motor-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
net b-pos-cmd axis.3.motor-pos-cmd => hm2_5i25.0.stepgen.03.position-cmd
net b-enable axis.3.amp-enable-out => hm2_5i25.0.stepgen.03.enable
#========================================================================================================
If I make a simple change... it reverses which gen is used... and the A-Axis now fails.
#*******************
# AXIS A
#*******************
# Step Gen signals/setup
#setp hm2_5i25.0.stepgen.03.dirsetup [AXIS_3]DIRSETUP
#setp hm2_5i25.0.stepgen.03.dirhold [AXIS_3]DIRHOLD
#setp hm2_5i25.0.stepgen.03.steplen [AXIS_3]STEPLEN
#setp hm2_5i25.0.stepgen.03.stepspace [AXIS_3]STEPSPACE
#setp hm2_5i25.0.stepgen.03.position-scale [AXIS_3]STEP_SCALE
#setp hm2_5i25.0.stepgen.03.step_type 0
#setp hm2_5i25.0.stepgen.03.control-type 0
#setp hm2_5i25.0.stepgen.03.maxaccel [AXIS_3]STEPGEN_MAXACCEL
#setp hm2_5i25.0.stepgen.03.maxvel [AXIS_3]STEPGEN_MAXVEL
net a-pos-fb axis.3.motor-pos-fb <= hm2_5i25.0.stepgen.03.position-fb
net a-pos-cmd axis.3.motor-pos-cmd => hm2_5i25.0.stepgen.03.position-cmd
net a-enable axis.3.amp-enable-out => hm2_5i25.0.stepgen.03.enable
#========================================================================================================
#*******************
# AXIS B
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.04.dirsetup [AXIS_4]DIRSETUP
setp hm2_5i25.0.stepgen.04.dirhold [AXIS_4]DIRHOLD
setp hm2_5i25.0.stepgen.04.steplen [AXIS_4]STEPLEN
setp hm2_5i25.0.stepgen.04.stepspace [AXIS_4]STEPSPACE
setp hm2_5i25.0.stepgen.04.position-scale [AXIS_4]STEP_SCALE
setp hm2_5i25.0.stepgen.04.step_type 0
setp hm2_5i25.0.stepgen.04.control-type 0
setp hm2_5i25.0.stepgen.04.maxaccel [AXIS_4]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.04.maxvel [AXIS_4]STEPGEN_MAXVEL
net b-pos-fb axis.4.motor-pos-fb <= hm2_5i25.0.stepgen.04.position-fb
net b-pos-cmd axis.4.motor-pos-cmd => hm2_5i25.0.stepgen.04.position-cmd
net b-enable axis.4.amp-enable-out => hm2_5i25.0.stepgen.04.enable
#========================================================================================================
So the failure is staying with stepgen_04 for some reason.
But I literally cloned B from A in the HAL...
Then I did the same thing with the INI... and dropped the speed significantly.
#========================================================================================================
#********************
# Axis A
#********************
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.05
MIN_FERROR = 0.5
MAX_VELOCITY = 90
MAX_ACCELERATION = 10
STEPGEN_MAXVEL = 210
STEPGEN_MAXACCEL = 500.0
DIRSETUP = 9000
DIRHOLD = 9000
STEPLEN = 9000
STEPSPACE = 9000
STEP_SCALE = 26.6667
MIN_LIMIT = -130.0
MAX_LIMIT = 130.0
HOME_OFFSET = 0.0
#========================================================================================================
#********************
# Axis B
#********************
[AXIS_4]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.05
MIN_FERROR = 0.5
MAX_VELOCITY = 90
MAX_ACCELERATION = 10
STEPGEN_MAXVEL = 210
STEPGEN_MAXACCEL = 500.0
DIRSETUP = 9000
DIRHOLD = 9000
STEPLEN = 9000
STEPSPACE = 9000
STEP_SCALE = 26.6667
MIN_LIMIT = -9999
MAX_LIMIT = 9999
HOME_OFFSET = 0.0
#========================================================================================================
Does somebody out there have a WORKING 5-AXIS that i can look at the file? This is driving me nuts!!!
Please Log in or Create an account to join the conversation.
27 Jul 2018 00:40 #114924
by PCW
Replied by PCW on topic MESA 5-Axis - Axis-3 Following Error
A couple things:
1 You have ferror and min_ferror reversed
2.Stepgen_maxaccel should only be 1.25X max_acceleration
3. The PID based stepgens (what pncconf generates) are more accurate and
robust WRT host jitter
1 You have ferror and min_ferror reversed
2.Stepgen_maxaccel should only be 1.25X max_acceleration
3. The PID based stepgens (what pncconf generates) are more accurate and
robust WRT host jitter
Please Log in or Create an account to join the conversation.
27 Jul 2018 05:29 #114931
by Askjerry
Replied by Askjerry on topic MESA 5-Axis - Axis-3 Following Error
I started another PNCCONFIG session and only really concentrated on the A-Axis settings.
Then I went to the INI file from that session and coppied the A-Axis section under the {AXIS_3] heading... I pasted it into the A-Axis section of the code above, then pasted the same code under the [AXIS_4] section.
I figured... why not? Might actually work.
And it did.
So yeay!
Jerry
Then I went to the INI file from that session and coppied the A-Axis section under the {AXIS_3] heading... I pasted it into the A-Axis section of the code above, then pasted the same code under the [AXIS_4] section.
I figured... why not? Might actually work.
And it did.
So yeay!
Jerry
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18524
- Thank you received: 6190
27 Jul 2018 05:49 #114932
by tommylight
@Askjerry,
Please do read the posts before you insist on always being right.
F_error is very important, but you still chose to ignore it.
Replied by tommylight on topic MESA 5-Axis - Axis-3 Following Error
Tommylight: the "in" you see is pointing to a switch INPUT... has nothing to do with measurement systems.
Does somebody out there have a WORKING 5-AXIS that i can look at the file? This is driving me nuts!!!
@Askjerry,
Please do read the posts before you insist on always being right.
F_error is very important, but you still chose to ignore it.
Please Log in or Create an account to join the conversation.
27 Jul 2018 12:49 - 28 Jul 2018 05:12 #114943
by Askjerry
Replied by Askjerry on topic MESA 5-Axis - Axis-3 Following Error
No sir, I didn't ignore that section of it... that is why I used the PNCCONFIG to regenerate those sections... then copy that newly created output to the existing configuration. The only thing that I stated was an incorrect assumption was the switch input setup that has "in" as part of the configuration... had to do with "inches", the "switch-in" is just indicating an input.
As for the F_Error, you were quite correct... swapping that out fixed the issue... then I was able to continue to tweak the file to get a bit more speed. It's still not finished... just proof that it is operational. (No card or PC failure.)
As a side note... I pulled up the existing INI file for my MONSTER mill figuring that since it already has steppers, and since they are operating well... I could pull the timing from the INI file there and replace it in the INI file here for the X, Y, Z axis. It seems to have worked... but I won't really know for sure until I rewire the whole machine, replacing the parallel port for the MESA.
I honestly do appreciate your assistance.
Jerry
As for the F_Error, you were quite correct... swapping that out fixed the issue... then I was able to continue to tweak the file to get a bit more speed. It's still not finished... just proof that it is operational. (No card or PC failure.)
As a side note... I pulled up the existing INI file for my MONSTER mill figuring that since it already has steppers, and since they are operating well... I could pull the timing from the INI file there and replace it in the INI file here for the X, Y, Z axis. It seems to have worked... but I won't really know for sure until I rewire the whole machine, replacing the parallel port for the MESA.
I honestly do appreciate your assistance.
Jerry
Last edit: 28 Jul 2018 05:12 by Askjerry.
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds