Invert Stepper Direction in PNCconf

More
18 Jan 2020 23:59 - 19 Jan 2020 00:07 #155120 by AgentWD40
I'm using a Mesa 7i96, linuxCNC 2.9pre., and configuring with pncconf. I have a dual joint axis in which one motor's rotation needs to be in the opposite direction of the other. In pncconf, on the tb1/tb2 tab where I select stepgens, I checked "inv" on the tandem motors "Dir gen B" pin assuming that would invert it's direction. That didn't work as expected. Am I missing something here?

Finally I had to manually edit the ini file and make the step scale negative on that joint to get inverted rotation. I'm up and running, but I'd just like to know if there is a way to accomplish this in pncconf without hand editing?... Or rather I'd just like to know why the first attempt doesn't work.

Also, it seems that pncconf doesn't allow inputting negative values for stepper scale, why not?

Last edit: 19 Jan 2020 00:07 by AgentWD40.

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

More
19 Jan 2020 00:26 #155121 by Leon82
Maybe it assumes a gantry would be the same direction?

Big John also has a tool but you cannot Inver the pins from it. Sometimes manual edits are needed

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

More
19 Jan 2020 01:05 #155124 by AgentWD40

Maybe it assumes a gantry would be the same direction?


I'm inexperienced with cnc, for sure. But with what I've seen in just my off handed research I would have guessed most tandem joints would run in opposite directions. Is that not the case?

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

More
19 Jan 2020 01:08 #155125 by Leon82
No, one on each side on the gantry as it's a wide spanse usually.

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

More
19 Jan 2020 03:31 #155129 by rodw
I think I set my machine up so normal direction was the desired direction for that joint. On one side of the gantry I swapped the A & B phases around. But you can do it in the INI file with negative value.s
The following user(s) said Thank You: AgentWD40

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

More
19 Jan 2020 05:25 #155131 by cmorley

In pncconf, on the tb1/tb2 tab where I select stepgens, I checked "inv" on the tandem motors "Dir gen B" pin assuming that would invert it's direction. That didn't work as expected. Am I missing something here?

Also, it seems that pncconf doesn't allow inputting negative values for stepper scale, why not?


testing 2.8 (without hardware) i see that pncconf does add the code to invert the GPIO that should be the stepper direction output - but maybe it is the wrong GPIO - maybe Peter could confirm the numbering...

negative scales should be possible but yes I see it's not accepted - Ill see to fixing that soon.

Chris
The following user(s) said Thank You: AgentWD40

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

More
19 Jan 2020 06:45 - 19 Jan 2020 06:46 #155132 by cmorley
actually on the motor page there is a checkbox for motor direction (bottom left)
It will negate the scale when checked
Last edit: 19 Jan 2020 06:46 by cmorley.
The following user(s) said Thank You: AgentWD40

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

More
19 Jan 2020 09:27 - 19 Jan 2020 15:58 #155135 by PCW


testing 2.8 (without hardware) i see that pncconf does add the code to invert the GPIO that should be the stepper direction output - but maybe it is the wrong GPIO - maybe Peter could confirm the numbering...

Chris


In 2.8 and beyond its probably better to invert stepgen/pwmgen etc outputs
using the pin aliases so the configuration program does not need to know the
GPIO mapping:

setp hm2_7i96.0.stepgen.00.direction.invert_output true
Last edit: 19 Jan 2020 15:58 by PCW.

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

More
19 Jan 2020 14:06 - 19 Jan 2020 14:13 #155149 by AgentWD40

actually on the motor page there is a checkbox for motor direction (bottom left)
It will negate the scale when checked


Oh I didn't notice that before, thank you for pointing that out.

But for the case of tandem joints turning in opposite directions, is there a way for pncconf to configure that without the user needing to get into the config files them selves? Should it have been enough to check the "Inv" option on the dir stepgen or was there something else I needed to do?
Last edit: 19 Jan 2020 14:13 by AgentWD40.

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

More
19 Jan 2020 21:00 #155196 by cmorley
yes for tandem joints that won't work. inverting the stepper direction should have worked - i will change the code as Peter suggests.

Chris

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

Time to create page: 0.092 seconds
Powered by Kunena Forum