Hi all, after getting the BBB with PBX-BB set up and controlling XYZ nicely (thanks for the help, Charles) my attention has turned to getting PWM spindle control working.
Intended setup: connect A-axis STP/DIR/ENA to one of the spindle v5 DIYCNC spindle control boards: http://www.diycnc.co.uk/html/spindle_boards.html.
As far as I know this will allow me to use the A-axis output from PBX cape to control the v5 spindle board which in turn will turn the spindle drive board on/off using onboard relay and control spindle speed from step signals (converted to 0-10V which will control the spindle drive board, a Sprint 400 from existing control cabinet).
I am not currently using X/Y/Z enable pins but think I need to use A enable to trigger RUN on the v5 spindle board.
Looking at the linuxcnc config page this looks close to what I need to use:
http://linuxcnc.org/docs/html/examples/spindle.html#_pwm_spindle_speed
I am having some trouble working out how to implement this on the BBB/PBX.
- Do I need to use pwmgen rather than stepgen?
- Do I need to modify setup.sh to define the pins as anything other than 'low' ?
- Looking at the pinmux.ods from Charles, I'm not sure which pins I need to use (I think 811 / 812 / 813)
When I try to add something like 'setp hal_pru_generic.pwmgen.00.out.00.pin 813' to the hal file I get an error when trying to load linuxcnc that parameter or pin [aforementioned] not found
Current config files are here (without modifications for a axis spindle control):
https://github.com/abopen/cnc-configs/tree/master/Novamill
Can somebody please point me in the right direction / suggest a good place to start?
I appreciate that wiring / hardware is hard to diagnose from a distance but once I get a soft config working and can probe the HAL monitor etc I can work from there – I just can't get linuxcnc to start with anything that feels like I might have enabled or added spindle control to my configs.
Cheers
Stuart