How do you change polarity of Step Pulses in PRU?

More
05 Jan 2014 06:14 #42362 by tomws
tomws created the topic: How do you change polarity of Step Pulses in PRU?
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
More
05 Jan 2014 09:11 #42365 by andypugh
andypugh replied the topic: How do you change polarity of Step Pulses in PRU?

tomws wrote: 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.
More
27 Jul 2014 07:49 #49180 by ringram74
ringram74 replied the 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.
More
27 Jul 2014 11:38 #49181 by bjames28
bjames28 replied the 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..)
More
27 Jul 2014 20:29 #49183 by tomws
tomws replied the topic: How do you change polarity of Step Pulses in PRU?

ringram74 wrote: 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! :laugh:

Tom
Time to create page: 0.098 seconds
Powered by Kunena Forum