Problem with homing ATC step motor

More
07 Jul 2022 19:31 #246827 by andypugh
I think that the only change you need is to reduce to two joints:
[KINS]
JOINTS = 2
KINEMATICS = trivkins coordinates=XZ

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

More
07 Jul 2022 20:34 #246832 by COFHAL
Andy
No, if I only leave two joints I get an error: joint.2.amp-enable-it does not exist., and without that instruction the engine doesn't work.

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

More
07 Jul 2022 23:18 #246841 by andypugh
change
net a-enable     <= joint.2.amp-enable-out
net a-enable     => hm2_7i96.0.stepgen.03.enable

to
net a-enable     <= carousel.0.active
net a-enable     => hm2_7i96.0.stepgen.03.enable

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

More
09 Jul 2022 15:57 #246953 by COFHAL
Thank you very much for your support, the motor already works. The problem now is that despite having the carousel configured as bidirectional it always turns in the same direction, when verifying with the HALSHOW carousel.0.motor-fwd or carousel.0.motor-rev it is activated depending on which is the most it cuts to reach the tool it selects, despite that the motor always only turns in the same direction.

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

More
11 Jul 2022 10:34 #247065 by andypugh
How is carousel connected to the stepgen?
For a stepper you should probably have carousel.0.motor-vel connected to stepgen.N.velocity-cmd. If the changing sign of the velocity command does not change the rotation direction than it may be that the stepgen.N.dir pin (in software or hardware, or possibly both) is incorrectly connected.

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

More
11 Jul 2022 19:59 #247105 by COFHAL
Dear Andy.

#*******************
# ATC MOTOR
#*******************

# Step Gen signals/setup

setp hm2_7i96.0.stepgen.03.dirsetup [JOINT_2]DIRSETUP
setp hm2_7i96.0.stepgen.03.dirhold [JOINT_2]DIRHOLD
setp hm2_7i96.0.stepgen.03.steplen [JOINT_2]STEPLEN
setp hm2_7i96.0.stepgen.03.stepspace [JOINT_2]STEPSPACE
setp hm2_7i96.0.stepgen.03.position-scale [JOINT_2]STEP_SCALE
setp hm2_7i96.0.stepgen.03.step_type 0
setp hm2_7i96.0.stepgen.03.control-type 1
setp hm2_7i96.0.stepgen.03.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_7i96.0.stepgen.03.maxvel [JOINT_2]STEPGEN_MAXVEL

net a-enable <= carousel.0.active

setp carousel.0.fwd-dc 10000
setp carousel.0.rev-dc 10000
setp carousel.0.hold-dc 0

net carousel-vel <= carousel.0.motor-vel
net carousel-vel => hm2_7i96.0.stepgen.03.velocity-cmd

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

More
11 Jul 2022 20:53 #247106 by andypugh
try -10000 for the rev-dc

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

More
06 Sep 2022 14:12 #251296 by COFHAL
Thank you very much for your support, it is working now, the only thing I have noticed is that sometimes it does not take the shortest route to go to a tool and always does it in CW sense, other times it does it well.
Attachments:

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

More
06 Sep 2022 14:20 - 06 Sep 2022 14:24 #251297 by COFHAL
Last edit: 06 Sep 2022 14:24 by COFHAL.

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

More
06 Sep 2022 14:36 #251300 by COFHAL
The following user(s) said Thank You: tommylight

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

Time to create page: 0.197 seconds
Powered by Kunena Forum