Dead in the water on 7i92 config
05 Apr 2016 09:01 #72769
by andypugh
Replied by andypugh on topic Dead in the water on 7i92 config
It sounds like your hostmot2 system was configured to use velocity-mode stepgens and a PID.
You need to "wire" the gantry.0.joint.00.pos-cmd into the system in the same place as the axis.0.motor-position-cmd was introduced in the initial config (ie probably into the PID).
Or you could switch the config to use position-mode stepgens like the Comet (which is a Beaglebone config).
You need to "wire" the gantry.0.joint.00.pos-cmd into the system in the same place as the axis.0.motor-position-cmd was introduced in the initial config (ie probably into the PID).
Or you could switch the config to use position-mode stepgens like the Comet (which is a Beaglebone config).
Please Log in or Create an account to join the conversation.
05 Apr 2016 13:42 #72780
by dannym
Replied by dannym on topic Dead in the water on 7i92 config
What's the practical difference between velocity mode and position mode?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
05 Apr 2016 14:21 #72781
by Todd Zuercher
Replied by Todd Zuercher on topic Dead in the water on 7i92 config
In position mode Linuxcnc just sends a position command to a servo drive, or the step generator component, and there is no real need for feed back this is considered "open loop" (more of a one way line). In velocity mode Linuxcnc just sends a velocity command to a servo drive or the step generator and they must feed back the position to Linuxcnc where the position loop is "closed " a PID loop is used to determine the velocity command that is sent to the drive or stepgen.
Please Log in or Create an account to join the conversation.
05 Apr 2016 15:34 - 05 Apr 2016 15:35 #72782
by PCW
Replied by PCW on topic Dead in the water on 7i92 config
The PID system allows more control parameters that create a more robust
control loop when there is jitter cause by the host Ethernet connection
So it is suggested to not use the built in driver position mode which is not robust WRT host jitter
for Ethernet connected devices
control loop when there is jitter cause by the host Ethernet connection
So it is suggested to not use the built in driver position mode which is not robust WRT host jitter
for Ethernet connected devices
Last edit: 05 Apr 2016 15:35 by PCW.
Please Log in or Create an account to join the conversation.
06 Apr 2016 06:06 #72824
by dannym
Replied by dannym on topic Dead in the water on 7i92 config
I sat down with it again tonight but couldn't figure out ' "wire" the gantry.0.joint.00.pos-cmd into the system'.
So the new lines are
net x0pos-cmd gantry.0.joint.00.pos-cmd => hm2_[HOSTMOT2](BOARD).stepgen.00.position-cmd
net x0pos-fb gantry.0.joint.00.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.00.position-fb
net x1pos-cmd gantry.0.joint.03.pos-cmd => hm2_[HOSTMOT2](BOARD).stepgen.03.position-cmd
net x1pos-fb gantry.0.joint.03.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.03.position-fb
net xpos-cmd gantry.0.position-cmd <= axis.0.motor-pos-cmd
net xpos-fb gantry.0.position-fb => axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out => hm2_[HOSTMOT2](BOARD).stepgen.03.enable hm2_[HOSTMOT2](BOARD).stepgen.03.enable
The existing lines::
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
So the new lines are
net x0pos-cmd gantry.0.joint.00.pos-cmd => hm2_[HOSTMOT2](BOARD).stepgen.00.position-cmd
net x0pos-fb gantry.0.joint.00.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.00.position-fb
net x1pos-cmd gantry.0.joint.03.pos-cmd => hm2_[HOSTMOT2](BOARD).stepgen.03.position-cmd
net x1pos-fb gantry.0.joint.03.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.03.position-fb
net xpos-cmd gantry.0.position-cmd <= axis.0.motor-pos-cmd
net xpos-fb gantry.0.position-fb => axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out => hm2_[HOSTMOT2](BOARD).stepgen.03.enable hm2_[HOSTMOT2](BOARD).stepgen.03.enable
The existing lines::
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
Please Log in or Create an account to join the conversation.
06 Apr 2016 09:13 #72828
by andypugh
Replied by andypugh on topic Dead in the water on 7i92 config
Do you understand HAL syntax?
Please Log in or Create an account to join the conversation.
06 Apr 2016 23:24 #72878
by dannym
Replied by dannym on topic Dead in the water on 7i92 config
Not well enough, apparently.
Please Log in or Create an account to join the conversation.
06 Apr 2016 23:44 - 06 Apr 2016 23:45 #72879
by PCW
Replied by PCW on topic Dead in the water on 7i92 config
here's the main part of the change ( connecting the gantry comps position command outputs to the PID command inputs)
net x0pos-cmd gantry.0.joint.00.pos-cmd => pid.0.command
net x0pos-fb gantry.0.joint.00.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.00.position-fb
net x1pos-cmd gantry.0.joint.03.pos-cmd => pid.3.command
net x1pos-fb gantry.0.joint.03.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.03.position-fb
net xpos-cmd gantry.0.position-cmd <= axis.0.motor-pos-cmd
net xpos-fb gantry.0.position-fb => axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out => hm2_[HOSTMOT2](BOARD).stepgen.00.enable hm2_[HOSTMOT2](BOARD).stepgen.03.enable
setp pid.0.error-previous-target true
setp pid.3.error-previous-target true
note that PID command deriv connections on the gantry driven axis must be disconnected
since the commands are no longer coming from emcmot
# net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
This doesn't cause much harm, as the PID component generates it own command derivative if the pin is not connected
net x0pos-cmd gantry.0.joint.00.pos-cmd => pid.0.command
net x0pos-fb gantry.0.joint.00.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.00.position-fb
net x1pos-cmd gantry.0.joint.03.pos-cmd => pid.3.command
net x1pos-fb gantry.0.joint.03.pos-fb <= hm2_[HOSTMOT2](BOARD).stepgen.03.position-fb
net xpos-cmd gantry.0.position-cmd <= axis.0.motor-pos-cmd
net xpos-fb gantry.0.position-fb => axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out => hm2_[HOSTMOT2](BOARD).stepgen.00.enable hm2_[HOSTMOT2](BOARD).stepgen.03.enable
setp pid.0.error-previous-target true
setp pid.3.error-previous-target true
note that PID command deriv connections on the gantry driven axis must be disconnected
since the commands are no longer coming from emcmot
# net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
This doesn't cause much harm, as the PID component generates it own command derivative if the pin is not connected
Last edit: 06 Apr 2016 23:45 by PCW.
Please Log in or Create an account to join the conversation.
09 Apr 2016 06:52 #72989
by dannym
Replied by dannym on topic Dead in the water on 7i92 config
OK I'm trying- I'm unclear on whether ONLY the bold lines are to be used, or all of them?
With ONLY the bold lines, I get:
Pin 'gantry.0.joint.03.pos-cmd' does not exist
With all the lines included, I get:
Pin 'hm2_7i92.stepgen.00.position-fb' does not exist
My X[0]-drive section is:
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.0.maxerror [AXIS_0]MAX_ERROR
With ONLY the bold lines, I get:
Pin 'gantry.0.joint.03.pos-cmd' does not exist
With all the lines included, I get:
Pin 'hm2_7i92.stepgen.00.position-fb' does not exist
My X[0]-drive section is:
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
# timing parameters
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [AXIS_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
setp pid.0.maxerror [AXIS_0]MAX_ERROR
Please Log in or Create an account to join the conversation.
09 Apr 2016 14:28 #73001
by PCW
Replied by PCW on topic Dead in the water on 7i92 config
The original sample code that i copy pasted from a previous reply
had some errors (missing board numbers mainly)
also the gantry comp will just have 2 axis by default, 00 and 01
This should be closer:
net x0pos-cmd gantry.0.joint.00.pos-cmd => pid.0.command
net x0pos-fb gantry.0.joint.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net x1pos-cmd gantry.0.joint.01.pos-cmd => pid.3.command
net x1pos-fb gantry.0.joint.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb
net xpos-cmd gantry.0.position-cmd <= axis.0.motor-pos-cmd
net xpos-fb gantry.0.position-fb => axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable hm2_[HOSTMOT2](BOARD).0,stepgen.03.enable
setp pid.0.error-previous-target true
setp pid.3.error-previous-target true
The bolded lines were lines I added to the previous reply
Do read the gantry comp manual page, you will need to feed the
limit switch data through the gantry comp, just as you feed
motions X axis position commands through the gantry comp to
to split it into two motion commands that allow independent motion for homing
had some errors (missing board numbers mainly)
also the gantry comp will just have 2 axis by default, 00 and 01
This should be closer:
net x0pos-cmd gantry.0.joint.00.pos-cmd => pid.0.command
net x0pos-fb gantry.0.joint.00.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
net x1pos-cmd gantry.0.joint.01.pos-cmd => pid.3.command
net x1pos-fb gantry.0.joint.01.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb
net xpos-cmd gantry.0.position-cmd <= axis.0.motor-pos-cmd
net xpos-fb gantry.0.position-fb => axis.0.motor-pos-fb
net xenable axis.0.amp-enable-out => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable hm2_[HOSTMOT2](BOARD).0,stepgen.03.enable
setp pid.0.error-previous-target true
setp pid.3.error-previous-target true
The bolded lines were lines I added to the previous reply
Do read the gantry comp manual page, you will need to feed the
limit switch data through the gantry comp, just as you feed
motions X axis position commands through the gantry comp to
to split it into two motion commands that allow independent motion for homing
Please Log in or Create an account to join the conversation.
Time to create page: 0.092 seconds