Spindle Step/Dir servo ramp down before stop on M stop command.

More
20 May 2021 17:01 #209667 by andypugh
I should have something different incorporating lessons learned in an hour or so.

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

More
20 May 2021 20:47 #209694 by andypugh
Here is a config which appears to work (I even tried it out).

It uses a custom HAL component, so first of all you will need to compile and install that.
sudo halcompile --install caxis.comp

Then you should _probably_ keep your existing INI, bit take a look at the new one for differences, and use the new HAL file.

I don't expect it to work perfectly first time, but I don't think that this version has any unfixable errors.
Attachments:

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

More
21 May 2021 11:01 #209748 by andypugh
I made a stepper-encoder spindle simulator to check this with:

Attachments:
The following user(s) said Thank You: tommylight

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

More
21 May 2021 13:32 - 21 May 2021 14:15 #209754 by NoJo
Neat test setup!
I got the component compiled ok.
Things don't work yet , current findings below, but I want to go through my ini/HAL files compared to yours very carefully - presently all jogging does not work ( jogwheels, buttons, etc) - your HAL file is one or two revs behind mine so there may be deltas.

So far, with some items just observations, and others more relevant:
AXIS display now only shows 3 dots representing each axis, and also only 3 DRO's numbered 1-3.

Then, Homing fails.
HOME ALL
X homes OK, to home sensor, etc.
Y starts going away from home sensor, and VERY fast - so much so that the servo stalls with a bang..
C axis - if C was say 100deg away from index, it slowly rotates to index, goes past, and oscillates again, till stopping @ index.
- if C was close to index, say 20 deg, it goes to index slowly, and stops. And the movement is VERY slow towards index.
After this, Jogging on the AXIS screen (via Mouse) works for X, Y has failed stalled, and when I try jog C it starts turning very slowly, and just carries on turning.

I will attached the latest ini/HAL files as soon as I have gone through them carefully again.

EDIT:
I have been through the files - I see no obvious differences in the non-C axis related sections - X and Z are as was, so not sure why the homing of axes causes Z to start wrong direction and accel till stall.

Lots of delta in the C_axis sections,, with stepgens added as well...
in KINS, KINEMATICS has kinstype=I added - correct?

Edited HAl and ini are attached - have changed 5i25 card to 7i92 as well
Attachments:
Last edit: 21 May 2021 14:15 by NoJo.

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

More
21 May 2021 14:32 #209757 by andypugh

AXIS display now only shows 3 dots representing each axis, and also only 3 DRO's numbered 1-3.


That is due to me adding "kinstype" as the system was complaining. You can try removing it again, and see if things still work.

It's useful to start from the command-line (command "linuxcnc") as then you see a lot of things that the system isn't 100% happy about such as mis-matched KINS and TRAJ.

Then, Homing fails.
HOME ALL
X homes OK, to home sensor, etc.
Y starts going away from home sensor, and VERY fast - so much so that the servo stalls with a bang..


Which INI file are you using? You should probably mainly be using your existing one.
Also, make sure than nothing regarding joint.1 crept in to my new HAL bits.

C axis - if C was say 100deg away from index, it slowly rotates to index, goes past, and oscillates again, till stopping @ index.
- if C was close to index, say 20 deg, it goes to index slowly, and stops. And the movement is VERY slow towards index.

The speed is [JOINT_2]LATCH_VELOCITY and can be changed.
I think that the oscillation might be due to the stepgen accel limit that we put in so that the spindle ramps down slowly. I think that is problematic for the PID. If you increase the stepgen maxaccel does the oscillation change character?
If necessary the "caxis" comp can gain a spindle-ramping function.

After this, Jogging on the AXIS screen (via Mouse) works for X, Y has failed stalled, and when I try jog C it starts turning very slowly, and just carries on turning.

The encoder scale might be wrong, if you are using the value from my INI.

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

More
21 May 2021 14:33 #209758 by andypugh
I think that I forgot to mention that M100 and M101 are no longer used. If you start the spindle, it goes in to spindle mode. if you stop the spindle, it goes into C axis mode. This would be annoying with a 4-jaw chuck but it probably good with a 5C collet.

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

More
21 May 2021 20:07 #209794 by NoJo

Which INI file are you using? You should probably mainly be using your existing one.
Also, make sure than nothing regarding joint.1 crept in to my new HAL bits.

The encoder scale might be wrong, if you are using the value from my INI.


Am using 'my' ini - merged your changes. Axes x,z and spindle as in my ini, basically unchanged.
Ditto the HAL file, so at present no idea why Z axis homing is messed - The Z axis does not start going to the home sensor, it starts in the opposite direction ,runs very fast and stalls within a few mm of movement.

My encoder is 4096 - seems that is the same as in your ini...

I have compared line for line ini and hal so far - will test on the lathe again in the morning, also why the jog wheels don't work after trying to home...
I did try again with the previous hal and ini ( before the version we gave up on) and that still runs ok - home all is ok and jog wheels work, etc, so hardware is still ok..

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

More
21 May 2021 20:12 #209797 by andypugh

so at present no idea why Z axis homing is messed - The Z axis does not start going to the home sensor, it starts in the opposite direction ,runs very fast and stalls within a few mm of movement.


Very strange. Possibly you changed the home pin sensor assignment and the new HAL has reverted?
Otherwise, check the [JOINT_2] *HOME* velocities.

why the jog wheels don't work after trying to home....

That is because the machine is stuck in "joint mode" and I don't think that the HAL is set up for joint-mode jogging.

Swich back to no "kinstype" in the [KINS] section and see how it goes.

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

More
22 May 2021 08:04 #209825 by NoJo

The Z axis does not start going to the home sensor, it starts in the opposite direction ,runs very fast and stalls within a few mm of movement.

Very strange. Possibly you changed the home pin sensor assignment and the new HAL has reverted?

No changes made - I used the HAL/ini files just before we gave up on that config to check , and all still works. I did check all the pin assignments under 'external inputs' in HAL, all unchanged and correct so far. Still digging..

Otherwise, check the [JOINT_2] *HOME* velocities.

Why [JOINT_2]? That is 'C', not Z?
[JOINT_1] ( and 0) are unchanged from previous setup.

why the jog wheels don't work after trying to home....
That is because the machine is stuck in "joint mode" and I don't think that the HAL is set up for joint-mode jogging.

Where do I verify that? If it is so, I will dig in the docs to see if I can set it up..

This confuses me somewhat - in the [JOINT_2] Section of C_axis, HOME_SEARCH_VEL = 0
The Docs say:

If a joint does not have home switches or does not have a logical home position like a rotary joint and you want that joint to home at the current position when the "Home All" button is pressed in the Axis gui, then the following ini entries for that joint are needed:
HOME_SEARCH_VEL = 0
etc


Are we trying to Home at the 'current' position? I thought index was the home pos?

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

More
22 May 2021 09:01 #209826 by andypugh

Otherwise, check the [JOINT_2] *HOME* velocities.

Why [JOINT_2]? That is 'C', not Z?

Sorry, I should have said [JOINT_1]

why the jog wheels don't work after trying to home....
That is because the machine is stuck in "joint mode" and I don't think that the HAL is set up for joint-mode jogging.
Where do I verify that? If it is so, I will dig in the docs to see if I can set it up..

Anywhere where there is an axis.x.jog.... pin add the matching joint.0..... pin too. That should fo it.

Or go back to a config that doesn't show joint mode, like you had before. (It's the kinstype "kinstype" change that made joint mode visible)

This confuses me somewhat - in the [JOINT_2] Section of C_axis, HOME_SEARCH_VEL = 0


HOME_SEARCH_VEL == 0 and HOME_LATCH_VEL != 0 with HOME_INDEX_ENABLE is how you configure for index-only homing.

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

Time to create page: 0.264 seconds
Powered by Kunena Forum