PP hal file. Where are the dir pins set?

More
30 Aug 2018 14:15 #116866 by Clive S
I see all the gpio step pins for X,Y,Z,A in the hal file.

But where are the DIR pins stored ie gpio I002 006 etc.

Are they in the python scripts somewhere?

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

More
30 Aug 2018 14:38 #116870 by PCW
If you mean how do you control things line the polarity of the DIR pins, this is done by setting or clearing invert_output parameter for the GPIO pin that corresponds with the DIR pin.

You can check which GPIO in matches which DIR pin in by looking at the pinout file. This is done more cleanly with LinuxCNC 2.8 which has named GPIO aliases like hm2_7i92.0.stepgen.01.direction.invert_output, but I thin PP is based on 2.6 or 2.7

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

More
30 Aug 2018 14:52 - 30 Aug 2018 14:56 #116872 by Clive S
Thanks Peter the latest version I think is more like 2.8 (could be wrong)

No sorry I was not looking how to control the direction. I don't seem to be able to find where they set them.

All the axis step, probe, coolant, estop, etc I can see in the hal file BUT not the axis dir pins.

I can search for gpio.008 and it finds the Y step pin but if I search for gpio.006 which should_be_and_is the dir pin the search does not find it in the hal file. this is the same for X,Y,Z and A.

I was wanting to re assign one of the dir pins to a different pin on the bob
I was wondering if they are hard coded the dir pin outs
Last edit: 30 Aug 2018 14:56 by Clive S.

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

More
30 Aug 2018 15:12 - 30 Aug 2018 15:13 #116875 by PCW
All non GPIO pins like STEP/DIR/PWM etc are hardwired, that is, their pin assignments are determined by the FPGA firmware and cannot be changed. (but can revert to GPIO if the secondary pin function is disabled)
This is why there are multiple firmware files for different breakout boards.

You can change axis/stepgen mapping in the hal file of course (that is, it is common to use stepgen0 for the X axis but this mapping is completely arbitrary)
Last edit: 30 Aug 2018 15:13 by PCW.
The following user(s) said Thank You: Clive S

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

More
30 Aug 2018 15:25 #116877 by Clive S
That makes sense thank you.

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

Moderators: cncbasher
Time to create page: 0.071 seconds
Powered by Kunena Forum