Good Evening,
After many years of using MACH I have decided to convert my lathe over to LinuxCNC do to my falling in love with how well PathPilot controls my mill.
I have almost everything working except the spindle. I have a BOB connected to a CNC4PC C6 spindle control board. This board uses a step pulse to output a 0-10V signal to my VFD. I also have a single pulse index on the spindle that I would like to read from and eventually run a PID loop to adjust for load on the spindle.
I have added the code found on CNC4PC's website, although I think it should still work I believe it was originally written for EMC2 and maybe that is the problem.
Code:
#
# 5th stepgen for controlling the spindle.
# Type must be set to velocity
#
loadrt stepgen step_type=0,0,0,0,0 ctrl_type=p,p,p,p,v #
# Use a scale module for offset and scaling of the stepgen
# Offset and scale are determined by first calculating and testing
#
setp scale.0.in 0
setp scale.0.gain 0.36
setp scale.0.offset 60.0
addf scale.0 servo-thread
#
# Initialise the stepgen for the spindle
#
setp stepgen.4.position-scale 1
setp stepgen.4.maxvel 1300
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 20000
setp stepgen.4.dirsetup 20000
setp stepgen.4.maxaccel 200
#
# Enable
#
net spindle-enable <= motion.spindle-on => stepgen.4.enable #
# Connect spindle speed to scaler
#
net spindle-cmd motion.spindle-speed-out => scale.0.in #
# Connect scaler output to stepgen velocity
#
net spindle-freq <= scale.0.out => stepgen.4.velocity-cmd #
# Connect output to the pin for the analog voltage of cnc4pc board
#
net spindle-out <= stepgen.4.step => parport.0.pin-14-out #
# Control of spindle on/off (I1/I2 of KBIC speed controller over the
# relay instead of triac
#
net spindle-cw => parport.0.pin-16-out
When trying to run this I get an error in line 78 which is "loadrt stepgen step_type=0,0,0,0,0 ctrl_type=p,p,p,p,v"
could not insert the module ...stepgen.ko File exists
Any help would be appreciated! And if this is in the incorrect location please feel free to move post.
Thanks in advance!