How do you change polarity of Step Pulses in PRU?
- tomws
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 1
05 Jan 2014 06:14 #42362
by tomws
How do you change polarity of Step Pulses in PRU? was created by tomws
I am currently using debian-7.2-machinekit-armhf-2013-12-02 image, modified for the Xylotax BBB_DB25ee board and I want to change the polarity of the Step pulses (3 axis). Is there a configuration setting to do this? I tried updating my HAL to allocate the pins to GPIO so I could invert with setp but then the stepgen was not happy with this...
Tom
Tom
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
05 Jan 2014 09:11 #42365
by andypugh
You might need to ask this one on the mailing list. I think Charles is more active there.
Replied by andypugh on topic How do you change polarity of Step Pulses in PRU?
Is there a configuration setting to do this?
You might need to ask this one on the mailing list. I think Charles is more active there.
Please Log in or Create an account to join the conversation.
- ringram74
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
27 Jul 2014 07:49 #49180
by ringram74
Replied by ringram74 on topic How do you change polarity of Step Pulses in PRU?
tomws, did you get this figured out? I've got the BBB and the Xylotex, too, and would like to be able to send the same signal that my Y gets to a second stepper with the polarity reversed.
Please Log in or Create an account to join the conversation.
- bjames28
- Offline
- Senior Member
Less
More
- Posts: 77
- Thank you received: 0
27 Jul 2014 11:38 #49181
by bjames28
Replied by bjames28 on topic How do you change polarity of Step Pulses in PRU?
Hi,
I think the following line in the HAL file should do the trick:
setp [PRUCONF](DRIVER).stepgen.XX.stepinvert 1
Change the XX to the appropriate number of stepgen (00=X, 01=Y..)
I think the following line in the HAL file should do the trick:
setp [PRUCONF](DRIVER).stepgen.XX.stepinvert 1
Change the XX to the appropriate number of stepgen (00=X, 01=Y..)
Please Log in or Create an account to join the conversation.
- tomws
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 1
27 Jul 2014 20:29 #49183
by tomws
Yes, sort of... Charles provided a solution in response to my question on the maillist. The solution required a new prototype PRU driver that set the output polarities based on the sign of STEPSCALE. He has since updated the driver to accept parameters from the configuration files to set polarity (among other things) so I'd check the latest documentation.
As it turned out, I didn't need the polarity change as much as I needed to remove the slow opto couplers in my driver board - they were embarrassingly slow and mostly ruined the signal integrity rather than protecting anything. The BOB I ended up using provided sufficient isolation for my needs so removing the driver isolation wasn't an issue.
Hope this helps. I haven't dug into the CNC hardware in a while - been routing instead!
Tom
Replied by tomws on topic How do you change polarity of Step Pulses in PRU?
tomws, did you get this figured out? I've got the BBB and the Xylotex, too, and would like to be able to send the same signal that my Y gets to a second stepper with the polarity reversed.
Yes, sort of... Charles provided a solution in response to my question on the maillist. The solution required a new prototype PRU driver that set the output polarities based on the sign of STEPSCALE. He has since updated the driver to accept parameters from the configuration files to set polarity (among other things) so I'd check the latest documentation.
As it turned out, I didn't need the polarity change as much as I needed to remove the slow opto couplers in my driver board - they were embarrassingly slow and mostly ruined the signal integrity rather than protecting anything. The BOB I ended up using provided sufficient isolation for my needs so removing the driver isolation wasn't an issue.
Hope this helps. I haven't dug into the CNC hardware in a while - been routing instead!
Tom
Please Log in or Create an account to join the conversation.
Time to create page: 0.070 seconds