My HOME_USE_INDEX have a problem please help.
- abdulasis12
- Offline
- Premium Member
Less
More
- Posts: 130
- Thank you received: 8
18 Sep 2023 11:54 #281068
by abdulasis12
My HOME_USE_INDEX have a problem please help. was created by abdulasis12
Hi
Board: 7i96s + 7i77
First time I try use home with home switch only it's work fine.
#******************************************
[AXIS_X]
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 40.000000
HOME_LATCH_VEL = -5.00000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
Then I go to try create file from wizards Pncconf 7i92_7i77 and copy code about index encoder put-in my hall 7i96s+7i77
.hall
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.012700
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_7i96s.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_7i96s.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_7i96s.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_7i96s.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_7i96s.0.stepgen.00.step_type 0
setp hm2_7i96s.0.stepgen.00.control-type 1
setp hm2_7i96s.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_7i96s.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => hm2_7i96s.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_7i96s.0.stepgen.00.enable
# ---setup home / limit switch signals---
net home-x => joint.0.home-sw-in
net min-x => joint.0.neg-lim-sw-in
net max-x => joint.0.pos-lim-sw-in
# ---Encoder feedback signals/setup---
setp hm2_7i96s.0.encoder.00.counter-mode 0
setp hm2_7i96s.0.encoder.00.filter 1
setp hm2_7i96s.0.encoder.00.index-invert 0
setp hm2_7i96s.0.encoder.00.index-mask 0
setp hm2_7i96s.0.encoder.00.index-mask-invert 0
setp hm2_7i96s.0.encoder.00.scale [JOINT_0]ENCODER_SCALE
#net x-pos-fb <= hm2_7i96s.0.encoder.00.position
net x-vel-fb <= hm2_7i96s.0.encoder.00.velocity
net x-pos-fb => joint.0.motor-pos-fb
net x-index-enable joint.0.index-enable <=> hm2_7i96s.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_7i96s.0.encoder.00.rawcounts
And in .ini file I put this.................
#******************************************
[AXIS_X]
MAX_VELOCITY = 66.66666666666667
MAX_ACCELERATION = 500.0
MIN_LIMIT = -470.0
MAX_LIMIT = 100.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 66.66666666666667
MAX_ACCELERATION = 500.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 = 83.33
STEPGEN_MAXACCEL = 625.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
ENCODER_SCALE = -10000
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 1000.0
MIN_LIMIT = -470.0
MAX_LIMIT = 100.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 40.000000
HOME_LATCH_VEL = -5.00000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = YES
HOME_SEQUENCE = 1
#******************************************
When I click home X axis result is = machine will home step and move back to first position of open linuxcnc program all time , seem first position open program is index signal .
What I'm wrong for hall and ini ?
How to check or fix ?
Asis,
Board: 7i96s + 7i77
First time I try use home with home switch only it's work fine.
#******************************************
[AXIS_X]
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 40.000000
HOME_LATCH_VEL = -5.00000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
Then I go to try create file from wizards Pncconf 7i92_7i77 and copy code about index encoder put-in my hall 7i96s+7i77
.hall
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.012700
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_7i96s.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_7i96s.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_7i96s.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_7i96s.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_7i96s.0.stepgen.00.step_type 0
setp hm2_7i96s.0.stepgen.00.control-type 1
setp hm2_7i96s.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_7i96s.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => hm2_7i96s.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_7i96s.0.stepgen.00.enable
# ---setup home / limit switch signals---
net home-x => joint.0.home-sw-in
net min-x => joint.0.neg-lim-sw-in
net max-x => joint.0.pos-lim-sw-in
# ---Encoder feedback signals/setup---
setp hm2_7i96s.0.encoder.00.counter-mode 0
setp hm2_7i96s.0.encoder.00.filter 1
setp hm2_7i96s.0.encoder.00.index-invert 0
setp hm2_7i96s.0.encoder.00.index-mask 0
setp hm2_7i96s.0.encoder.00.index-mask-invert 0
setp hm2_7i96s.0.encoder.00.scale [JOINT_0]ENCODER_SCALE
#net x-pos-fb <= hm2_7i96s.0.encoder.00.position
net x-vel-fb <= hm2_7i96s.0.encoder.00.velocity
net x-pos-fb => joint.0.motor-pos-fb
net x-index-enable joint.0.index-enable <=> hm2_7i96s.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_7i96s.0.encoder.00.rawcounts
And in .ini file I put this.................
#******************************************
[AXIS_X]
MAX_VELOCITY = 66.66666666666667
MAX_ACCELERATION = 500.0
MIN_LIMIT = -470.0
MAX_LIMIT = 100.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 66.66666666666667
MAX_ACCELERATION = 500.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 = 83.33
STEPGEN_MAXACCEL = 625.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
ENCODER_SCALE = -10000
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 1000.0
MIN_LIMIT = -470.0
MAX_LIMIT = 100.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 40.000000
HOME_LATCH_VEL = -5.00000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = YES
HOME_SEQUENCE = 1
#******************************************
When I click home X axis result is = machine will home step and move back to first position of open linuxcnc program all time , seem first position open program is index signal .
What I'm wrong for hall and ini ?
How to check or fix ?
Asis,
Please Log in or Create an account to join the conversation.
- Aciera
- Away
- Administrator
Less
More
- Posts: 4001
- Thank you received: 1728
18 Sep 2023 15:21 #281092
by Aciera
Replied by Aciera on topic My HOME_USE_INDEX have a problem please help.
Have you tried using 'halscope' to look for the index signal of the encoder? 'hm2_7i96s.0.encoder.00.input-index'
The following user(s) said Thank You: abdulasis12
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17940
- Thank you received: 4811
18 Sep 2023 16:12 #281093
by PCW
Replied by PCW on topic My HOME_USE_INDEX have a problem please help.
If you homing to encoder index, you must use encoder feedback
but you are not doing this:
#net x-pos-fb <= hm2_7i96s.0.encoder.00.position
net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
If you are using the encoder _only_ for index, its possible
to have firmware that supports index input on Stepgens
but you are not doing this:
#net x-pos-fb <= hm2_7i96s.0.encoder.00.position
net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
If you are using the encoder _only_ for index, its possible
to have firmware that supports index input on Stepgens
The following user(s) said Thank You: abdulasis12
Please Log in or Create an account to join the conversation.
- abdulasis12
- Offline
- Premium Member
Less
More
- Posts: 130
- Thank you received: 8
19 Sep 2023 02:15 #281129
by abdulasis12
I will try read document about how to use hal scope for next time again I can't use it (now) , but I think it's good analysis tool
Thank you.
Replied by abdulasis12 on topic My HOME_USE_INDEX have a problem please help.
Hi Mr. AcieraHave you tried using 'halscope' to look for the index signal of the encoder? 'hm2_7i96s.0.encoder.00.input-index'
I will try read document about how to use hal scope for next time again I can't use it (now) , but I think it's good analysis tool
Thank you.
Please Log in or Create an account to join the conversation.
- abdulasis12
- Offline
- Premium Member
Less
More
- Posts: 130
- Thank you received: 8
19 Sep 2023 02:26 #281130
by abdulasis12
Okay now I try
net x-pos-fb <= hm2_7i96s.0.encoder.00.position
#net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
It's look good , can use home Index and all use encoder feedback (right ?) .
But, I can't use old velocity jog.
Pop-up show massage " joint 0 following error"
now my step gen scale is 1000 = 1mm
1 stepgen = 0.001mm (1micron)
max vel = 4000 mm/mins
Now I can operate g1 fastest is = G1 f160 , If more than will jount 0 following error
where I must go to edit parameter ?
Asis,
Replied by abdulasis12 on topic My HOME_USE_INDEX have a problem please help.
Hi Mr. PCW,If you homing to encoder index, you must use encoder feedback
but you are not doing this:
#net x-pos-fb <= hm2_7i96s.0.encoder.00.position
net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
If you are using the encoder _only_ for index, its possible
to have firmware that supports index input on Stepgens
Okay now I try
net x-pos-fb <= hm2_7i96s.0.encoder.00.position
#net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
It's look good , can use home Index and all use encoder feedback (right ?) .
But, I can't use old velocity jog.
Pop-up show massage " joint 0 following error"
now my step gen scale is 1000 = 1mm
1 stepgen = 0.001mm (1micron)
max vel = 4000 mm/mins
Now I can operate g1 fastest is = G1 f160 , If more than will jount 0 following error
where I must go to edit parameter ?
Asis,
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds