Help With Z-Axis Config

More
17 Mar 2024 20:31 #296153 by gardenweazel
What did I do wrong on this Z -Axis configuration?

180mm travel distance. Single limit/home switch at the top.  Positive travels towards switch at the top and negative travels towards the bottom.

[AXIS_Z]
 MAX_VELOCITY = 12.0
 MAX_ACCELERATION = 120.0
 MIN_LIMIT = -180.0
 MAX_LIMIT = 0 
 
 [JOINT_3]
 TYPE = LINEAR
 HOME = 8.0
 FERROR = 10.0
 MIN_FERROR = 1.0
 MAX_VELOCITY = 20.0
 MAX_ACCELERATION = 120.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 = 25
 STEPGEN_MAXACCEL = 150.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
 DIRSETUP   = 10000
 DIRHOLD    = 10000
 STEPLEN    = 5000
 STEPSPACE  = 5000
 STEP_SCALE = -320.0
 MIN_LIMIT = -180.0
 MAX_LIMIT = 0 
 HOME_OFFSET = -3.200000
 HOME_SEARCH_VEL = 2.400000
 HOME_LATCH_VEL = -0.020000
 HOME_FINAL_VEL = 2.800000
 HOME_USE_INDEX = NO
 HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0

*******************
 #  AXIS Z JOINT 3
 #*******************
 
 setp   pid.z.Pgain     [JOINT_3]P
 setp   pid.z.Igain     [JOINT_3]I
 setp   pid.z.Dgain     [JOINT_3]D
 setp   pid.z.bias      [JOINT_3]BIAS
 setp   pid.z.FF0       [JOINT_3]FF0
setp   pid.z.FF1       [JOINT_3]FF1
 setp   pid.z.FF2       [JOINT_3]FF2
 setp   pid.z.deadband  [JOINT_3]DEADBAND
 setp   pid.z.maxoutput [JOINT_3]MAX_OUTPUT
 setp   pid.z.error-previous-target true
 # This setting is to limit bogus stepgen
 # velocity corrections caused by position
 # feedback sample time jitter.
 setp   pid.z.maxerror 0.012700
 
 net z-index-enable  =>  pid.z.index-enable
 net z-enable        =>  pid.z.enable
 net z-pos-cmd       =>  pid.z.command
 net z-pos-fb        =>  pid.z.feedback
 net z-output        <=  pid.z.output
 
 # Step Gen signals/setup
 setp   hm2_7i76e.0.stepgen.03.dirsetup        [JOINT_3]DIRSETUP
 setp   hm2_7i76e.0.stepgen.03.dirhold         [JOINT_3]DIRHOLD
 setp   hm2_7i76e.0.stepgen.03.steplen         [JOINT_3]STEPLEN
 setp   hm2_7i76e.0.stepgen.03.stepspace       [JOINT_3]STEPSPACE
 setp   hm2_7i76e.0.stepgen.03.position-scale  [JOINT_3]STEP_SCALE
 setp   hm2_7i76e.0.stepgen.03.step_type        0   
 setp   hm2_7i76e.0.stepgen.03.control-type     1   
 setp   hm2_7i76e.0.stepgen.03.maxaccel         [JOINT_3]STEPGEN_MAXACCEL
 setp   hm2_7i76e.0.stepgen.03.maxvel           [JOINT_3]STEPGEN_MAXVEL
 
 # ---closedloop stepper signals---
 net z-pos-cmd    <= joint.3.motor-pos-cmd
 net z-vel-cmd    <= joint.3.vel-cmd
 net z-output     => hm2_7i76e.0.stepgen.03.velocity-cmd
 net z-pos-fb     <= hm2_7i76e.0.stepgen.03.position-fb
 net z-pos-fb     => joint.3.motor-pos-fb
 net z-enable     <= joint.3.amp-enable-out
 net z-enable     => hm2_7i76e.0.stepgen.03.enable
 
 # ---setup home / limit switch signals---
 net max-home-z  => joint.3.home-sw-in
 net max-home-z  => joint.3.pos-lim-sw-in
 net z-neg-limit => joint.3.neg-lim-sw-in
 

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

More
17 Mar 2024 21:09 #296154 by MaHa
Replied by MaHa on topic Help With Z-Axis Config
Home must be between  MIN_LIMIT and  MAX_LIMIT

HOME = 8.0 is outside softlimits

 
The following user(s) said Thank You: gardenweazel

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

More
18 Mar 2024 22:41 #296261 by gardenweazel
Ok, the change has been made to HOME from 8 to -8
Now when I start the file run, when it runs the too change line the Z-Axis moves in the positive direct until it hits the limit switch and then stops.

 
Attachments:

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

More
18 Mar 2024 23:43 #296263 by tommylight
Replied by tommylight on topic Help With Z-Axis Config
HOME = 0
The following user(s) said Thank You: gardenweazel

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

More
19 Mar 2024 00:40 #296276 by gardenweazel
Tried that but, it fails immediately when I HOME ALL.

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

More
19 Mar 2024 03:09 #296286 by tommylight
Replied by tommylight on topic Help With Z-Axis Config
In that case. there is something not right with the configuration of Z axis in the ini file, you must first make it home properly with home set at 0, home offset can probably be -3, but you have to fix home_search_velocity, home_latch_velocity and home_final_velocity so it home properly. All this is done by setting all those to very low values (like 5 for metric) and carefully watching what the Z axis is doing while homing, but first make sure page down on keyboard moves Z axis down, then, when home all is clicked/pressed Z should start moving up, hit limit switch, move down a bit till switch is released, move up again till it hits the switch, then move 3mm down (this is the home offset that you have at -3).
If any of those are not correct, change the value for search, latch, final by adding or removing - in front of the value.
The following user(s) said Thank You: gardenweazel

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

More
19 Mar 2024 23:30 #296350 by gardenweazel
This is what I currently have, the final move which I assume is HOME_FINAL_VEL travels in the plus direction when it should be going to the negative position. I can't tell you how frustrating this is after 4 months of trial and error. However I do appreciate the help!

MAX_VELOCITY = 12.0
 MAX_ACCELERATION = 120.0
 MIN_LIMIT = -180.0
 MAX_LIMIT = 0 
 
 [JOINT_3]
 TYPE = LINEAR
 HOME = 0 
 FERROR = 10.0
 MIN_FERROR = 1.0
 MAX_VELOCITY = 20.0
 MAX_ACCELERATION = 120.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 = 25
 STEPGEN_MAXACCEL = 150.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
 DIRSETUP   = 10000
 DIRHOLD    = 10000
 STEPLEN    = 5000
 STEPSPACE  = 5000
 STEP_SCALE = -320.0
 MIN_LIMIT = -180.0
 MAX_LIMIT = 0 
 HOME_OFFSET = -2.00000
 HOME_SEARCH_VEL = 3.00000
 HOME_LATCH_VEL = 0.20000
 HOME_FINAL_VEL = 2.000000
 HOME_USE_INDEX = NO
 HOME_IGNORE_LIMITS = YES
 HOME_SEQUENCE = 0 
 

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

More
20 Mar 2024 01:00 #296356 by tommylight
Replied by tommylight on topic Help With Z-Axis Config
No, the final move is the offset, you have it negative, try making it positive by removing - in front of 2.
The following user(s) said Thank You: gardenweazel

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

More
20 Mar 2024 02:49 #296367 by gardenweazel
Worked! 
Thank you so kindly, I appreciate the support.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.191 seconds
Powered by Kunena Forum