Closed loop with gantry (dual motor on one axis)
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
18 Jul 2015 12:09 - 18 Jul 2015 12:10 #60714
by jds8086
Closed loop with gantry (dual motor on one axis) was created by jds8086
I have a 5i25, 7i76, and a 7i73. Setting up closed loop stepper setup on a gantry cnc router. I'm a little confused how to configure the closed loop operation for the gantry as if there is a position error in just one motor not both, it needs to be able to correct each motors position individually. I first thought gantrykins but when you go to setup the 7i73 encoder inputs in Pncconf it is listed by axis, not by joint for encoder input.
Last edit: 18 Jul 2015 12:10 by jds8086.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
18 Jul 2015 16:23 #60717
by andypugh
Replied by andypugh on topic Closed loop with gantry (dual motor on one axis)
When you talk about closed-loop steppers do you mean the new hybrid closed-loop steppers with integrated encoders?
I am not sure how much pncconf knows about gantrykins. You might have to get as close as possible with the wizard, then do some hand-tweaking of the config files.
Are you using a joints_axesN version of LinuxCNC? I don't think Pncconf knows how to configure that yet (I may be wrong).
If you are not using joints_axes then the joint/axis confusion is inherent to LinuxCNC (and is what the joints_axes branches are attempting to fix)
I am not sure how much pncconf knows about gantrykins. You might have to get as close as possible with the wizard, then do some hand-tweaking of the config files.
Are you using a joints_axesN version of LinuxCNC? I don't think Pncconf knows how to configure that yet (I may be wrong).
If you are not using joints_axes then the joint/axis confusion is inherent to LinuxCNC (and is what the joints_axes branches are attempting to fix)
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
22 Jul 2015 02:50 #60806
by jds8086
Replied by jds8086 on topic Closed loop with gantry (dual motor on one axis)
I am using standard steppers with encoders added. Gecko 203V Drives.
I don't necessarily want to use gantrykins as it seems to have a few limitations i'm not fond of but if i have to thats what i'll do.
I've been trying to research the Joins_axes version and so far i'm having a hard time gathering enough info to really get a grasp on how to configure it for my needs. I am getting ready to build it and run it and hopefully get my head around the differences and how it could help.
I read most of the HAL manual last night, i just got rid of the headache this morning lol. I may have to go threw it again but i think i'm getting the jist of how HAL works but then you go throwing the mesa cards into it and i get so confused on what is handled by the cards, and what is handled in software and how it all ties together, my brain hurts!!
Basically i'm just curious if its possible to have a dual motor axis, and still have the ability to apply error corrections to the motors individually while in motion.
I don't necessarily want to use gantrykins as it seems to have a few limitations i'm not fond of but if i have to thats what i'll do.
I've been trying to research the Joins_axes version and so far i'm having a hard time gathering enough info to really get a grasp on how to configure it for my needs. I am getting ready to build it and run it and hopefully get my head around the differences and how it could help.
I read most of the HAL manual last night, i just got rid of the headache this morning lol. I may have to go threw it again but i think i'm getting the jist of how HAL works but then you go throwing the mesa cards into it and i get so confused on what is handled by the cards, and what is handled in software and how it all ties together, my brain hurts!!
Basically i'm just curious if its possible to have a dual motor axis, and still have the ability to apply error corrections to the motors individually while in motion.
Please Log in or Create an account to join the conversation.
- mozmck
- Offline
- Administrator
Less
More
- Posts: 64
- Thank you received: 56
22 Jul 2015 03:07 #60807
by mozmck
Replied by mozmck on topic Closed loop with gantry (dual motor on one axis)
I'm doing this right now with trivkins. The only thing I don't have is homing to 2 switches (one on each side of the gantry) like I'm used to with Mach3.
I'm using a Mesa 7i92 which is (I believe) functionally the same as a 5i25. I'm using the PID stepper setup, and the HAL for my Y axis motors look like this:
# ################
# Y1 [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd axis.1.joint-vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.1.maxerror [AXIS_1]MAX_ERROR
# ################
# Y2 [1] Axis
# ################
# axis enable chain
#newsig emcmot.03.enable bit
#sets emcmot.03.enable FALSE
#net emcmot.03.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.03.enable pid.3.enable
# set output pin parameters
# invert X direction pin
setp hm2_7i92.0.gpio.012.invert_output TRUE
# position command and feedback
net emcmot.01.pos-cmd => pid.3.command
net emcmot.01.vel-cmd => pid.3.command-deriv
net motor.03.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb pid.3.feedback
net motor.03.command pid.3.output hm2_[HOSTMOT2](BOARD).0.stepgen.03.velocity-cmd
setp pid.3.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.control-type 1
# set PID loop gains from inifile
setp pid.3.Pgain [AXIS_1]P
setp pid.3.Igain [AXIS_1]I
setp pid.3.Dgain [AXIS_1]D
setp pid.3.bias [AXIS_1]BIAS
setp pid.3.FF0 [AXIS_1]FF0
setp pid.3.FF1 [AXIS_1]FF1
setp pid.3.FF2 [AXIS_1]FF2
setp pid.3.deadband [AXIS_1]DEADBAND
setp pid.3.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.3.maxerror [AXIS_1]MAX_ERROR
I'm using a Mesa 7i92 which is (I believe) functionally the same as a 5i25. I'm using the PID stepper setup, and the HAL for my Y axis motors look like this:
# ################
# Y1 [1] Axis
# ################
# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd axis.1.joint-vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb axis.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
# set PID loop gains from inifile
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.1.maxerror [AXIS_1]MAX_ERROR
# ################
# Y2 [1] Axis
# ################
# axis enable chain
#newsig emcmot.03.enable bit
#sets emcmot.03.enable FALSE
#net emcmot.03.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.03.enable pid.3.enable
# set output pin parameters
# invert X direction pin
setp hm2_7i92.0.gpio.012.invert_output TRUE
# position command and feedback
net emcmot.01.pos-cmd => pid.3.command
net emcmot.01.vel-cmd => pid.3.command-deriv
net motor.03.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb pid.3.feedback
net motor.03.command pid.3.output hm2_[HOSTMOT2](BOARD).0.stepgen.03.velocity-cmd
setp pid.3.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirsetup [AXIS_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirhold [AXIS_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.steplen [AXIS_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.stepspace [AXIS_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-scale [AXIS_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxaccel [AXIS_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.control-type 1
# set PID loop gains from inifile
setp pid.3.Pgain [AXIS_1]P
setp pid.3.Igain [AXIS_1]I
setp pid.3.Dgain [AXIS_1]D
setp pid.3.bias [AXIS_1]BIAS
setp pid.3.FF0 [AXIS_1]FF0
setp pid.3.FF1 [AXIS_1]FF1
setp pid.3.FF2 [AXIS_1]FF2
setp pid.3.deadband [AXIS_1]DEADBAND
setp pid.3.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.3.maxerror [AXIS_1]MAX_ERROR
The following user(s) said Thank You: jds8086
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.133 seconds