How do you change polarity of Step Pulses in PRU?

More
05 Jan 2014 06:14 #42362 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

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

More
05 Jan 2014 09:11 #42365 by andypugh

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.

More
27 Jul 2014 07:49 #49180 by ringram74
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.

More
27 Jul 2014 11:38 #49181 by bjames28
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..)

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

More
27 Jul 2014 20:29 #49183 by tomws

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

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

Time to create page: 0.100 seconds
Powered by Kunena Forum