Invert Stepper Direction in PNCconf

  • AgentWD40
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
6 years 9 months ago - 6 years 9 months ago #155120 by AgentWD40
Invert Stepper Direction in PNCconf was created 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?

image missing https://i.imgur.com/buD2SqS.png
Last edit: 6 years 9 months ago by AgentWD40.

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

More
6 years 9 months ago #155121 by Leon82
Replied by Leon82 on topic Invert Stepper Direction in PNCconf
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.

  • AgentWD40
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
6 years 9 months ago #155124 by AgentWD40
Replied by AgentWD40 on topic Invert Stepper Direction in PNCconf

Leon82 wrote: 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
6 years 9 months ago #155125 by Leon82
Replied by Leon82 on topic Invert Stepper Direction in PNCconf
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
6 years 9 months ago #155129 by rodw
Replied by rodw on topic Invert Stepper Direction in PNCconf
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
6 years 9 months ago #155131 by cmorley
Replied by cmorley on topic Invert Stepper Direction in PNCconf

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
6 years 9 months ago - 6 years 9 months ago #155132 by cmorley
Replied by cmorley on topic Invert Stepper Direction in PNCconf
actually on the motor page there is a checkbox for motor direction (bottom left)
It will negate the scale when checked
Last edit: 6 years 9 months ago by cmorley.
The following user(s) said Thank You: AgentWD40

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

More
6 years 9 months ago - 6 years 9 months ago #155135 by PCW
Replied by PCW on topic Invert Stepper Direction in PNCconf

cmorley wrote:
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: 6 years 9 months ago by PCW.

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

  • AgentWD40
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
6 years 9 months ago - 6 years 9 months ago #155149 by AgentWD40
Replied by AgentWD40 on topic Invert Stepper Direction in PNCconf

cmorley wrote: 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: 6 years 9 months ago by AgentWD40.

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

More
6 years 9 months ago #155196 by cmorley
Replied by cmorley on topic Invert Stepper Direction in PNCconf
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.164 seconds
Powered by Kunena Forum