G33 does not adjust IPM after the first one. 2.9.0 pre-3376

More
13 Jan 2021 20:28 #195247 by RBC
Hi-
I am using G33 z-0.5 K0.125, and S100.
The first time I open linuxcnc, it runs correctly and adjusts the IPM to around 12.5. When I try the same after this, it goes to max speed, in my case 60 IPM. Also it does not obey MAX_VELOCITY adjustment on axis.
Any ideas?

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

More
13 Jan 2021 20:35 #195248 by andypugh
Which version of LinuxCNC?

This could, potentially be a HAL setup prblem.

But could also be the unwelcome return of github.com/LinuxCNC/linuxcnc/issues/704

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

More
13 Jan 2021 21:20 #195253 by RBC
2.9.0 pre-3376, should be the latest update.

I am using a clearpath servo in stepper mode as the lathe spindle with mesa 7i92 board.
I have modified the hostmot2 with additional outputs for index-enable and revs for spindle.n.revs.
When I look at those pins on hal meter, they all check out.

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

More
13 Jan 2021 21:49 #195255 by andypugh
So, you are saying that the spindle encoder resets at the start of the G33 move, but the axis still moves at full speed?

Can you confirm that the spindle.0.revs pin is zeroed at the start of the G33 move?

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

More
13 Jan 2021 21:55 - 13 Jan 2021 21:55 #195258 by RBC
That is what I was about write.
spindle.0.revs is not resetting, it keeps counting up as spindle runs.
I have added code in hostmot2 that divides the hm2 position-fb to 360 and I feed this to spindle.0.revs in the hal file.
Last edit: 13 Jan 2021 21:55 by RBC.

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

More
13 Jan 2021 21:58 #195259 by andypugh
I think that you have broken the position feedback.

If you see the index-enable go high, then low, and the encoder position and counts don't reset to zero then the encoder counter is not working properly.
The following user(s) said Thank You: RBC

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

More
13 Jan 2021 22:16 - 13 Jan 2021 22:21 #195264 by RBC
Thanks. I think I understand how this works now.
I am not using an encoder. I am feeding directly to spindle.0.index-enable and spindle.0.revs.

So the revs should be reset every time an index-enable is sent to low. And revs always stay between 0-359 ?
If so, I can try to make this happen in hostmot2.
Last edit: 13 Jan 2021 22:21 by RBC.

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

More
13 Jan 2021 22:59 #195267 by andypugh

RBC wrote: So the revs should be reset every time an index-enable is sent to low. And revs always stay between 0-359 ?


The standard hostmot2 encoder does the right thing.

LinuxCNC sets index-enable high.
hosmot2 (ie, the FPGA code) waits for an index, then sets the encoder counts to zero at the same time as setting index-enable low.
As far as I am aware the counts then just continue to increase until the next index-enable. The HAL driver converts those into a position in complete revolutions.

I am glad that you admitted to the Hostmot2 changes, we could have wasted days looking for a bug in the G33 code.

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

More
13 Jan 2021 23:21 #195268 by RBC
Is there a better way to do what I am trying to accomplish?
Since the position-fb is known, would it make sense to use this info to feed into the spindle so a G33 can be run correctly?
I am working on the code in stepgen.c under hostmot2 to do this at this moment.

The advantage is to be able to use stepper driver as spindle and run a G33.

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

More
13 Jan 2021 23:26 #195270 by RBC
Also, which file holds the codes for G33 behaviour? So I can understand how it works in detail. Thanks.

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

Time to create page: 0.105 seconds
Powered by Kunena Forum