Spindle control not showing in Axis window...
- irwinger
- Away
- Junior Member
-
- Posts: 21
- Thank you received: 2
I have an old TB6560 3-axis, chinese controller board (Wantai) driven from my parallel port. It has the outputs for the 3 axes (yes - that is plural for axis - I looked it up) and a spindle on/off control output that I use to control a relay that switches the 120VAC to the Dewalt router.
Back in the 'old days' (when this system worked), there was a section just below the jog/home/tool touchoff buttons where I could turn the spindle on and off. It's not there any more. I've been trying to use Google Gemini and ChatGPT for help (and they are surprisingly helpful if the question is worded well), but I'm just not getting it to work.
I'm using steppers and configured my pins using StepConf. I set the pin for the spindle as parallel port pin 9. But I'm not seeing a [SPINDLE] section in the .ini file nor am I seeing any spindle references in the .HAL file. I can't control the spindle speed (it's a router), only whether it's on or off.
Anyone out there with a good idea of where to start?
Thanks
Arden
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
- Posts: 20059
- Thank you received: 6822
In the meantime a stab in the dark would be to change LOCALE to UTF.8 and try making a new config, you can have multiple configs for the same machine.
Please Log in or Create an account to join the conversation.
- irwinger
- Away
- Junior Member
-
- Posts: 21
- Thank you received: 2
INI:
There was no [SPINDLE] section when I finished with the StepConf. I added the entire '[SPINDLE]' section from a response from Google Gemini.
# Generated by stepconf 1.1 at Thu Apr 3 15:12:55 2025
# If you make changes to this file, they will be
# overwritten when you run stepconf again
[EMC]
MACHINE = X90
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 0.10
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 1.00
CYCLE_TIME = 0.100
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/awalde/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
PROGRAM_EXTENSION = .nc,.tap G-Code File
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000
[HAL]
HALFILE = X90.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[SPINDLE]
P=1.0
I=0.0
D=0.0
ENCODER_SCALE=0.0
MAX_RPM=1
MIN_RPM=0
ORIENT_PIN=
ORIENT_SPEED=0
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00
#*** AXIS_X *******************************
[AXIS_X]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.050000
HOME_LATCH_VEL = 0.050000
HOME_IGNORE_LIMITS = YES
#******************************************
#*** AXIS_Y *******************************
[AXIS_Y]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.01
MAX_LIMIT = 8.0
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 0.050000
HOME_LATCH_VEL = 0.050000
HOME_IGNORE_LIMITS = YES
#******************************************
#*** AXIS_Z *******************************
[AXIS_Z]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -4.0
MAX_LIMIT = 0.01
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -4.0
MAX_LIMIT = 0.01
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 37.5
SCALE = 8000.0
FERROR = 0.05
MIN_FERROR = 0.01
HOME_OFFSET = 0.0
#******************************************
HAL: (initially generated from StepConf - but significantly edited as I tested the hardware)
# Generated by stepconf 1.1 at Thu Apr 3 15:12:55 2025
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net xstep => parport.0.pin-01-out
setp parport.0.pin-01-out-reset 1
net yenable => parport.0.pin-02-out
setp parport.0.pin-03-out-invert 1
net zdir => parport.0.pin-03-out
net ydir => parport.0.pin-04-out
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zenable => parport.0.pin-06-out
net xdir => parport.0.pin-07-out
net zstep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net spindle-on => parport.0.pin-09-out
net estop-ext <= parport.0.pin-10-in
net min-home-z <= parport.0.pin-11-in
net min-home-y <= parport.0.pin-12-in
net min-home-x <= parport.0.pin-13-in
net xenable => parport.0.pin-14-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 70000
setp stepgen.0.dirsetup 70000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 70000
setp stepgen.1.dirsetup 70000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
net min-home-y => joint.1.home-sw-in
net min-home-y => joint.1.neg-lim-sw-in
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 70000
setp stepgen.2.dirsetup 70000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
- Posts: 20059
- Thank you received: 6822
Make a new config, choose a spinlde, choose some rough values for spindle PWM, save, start the config see if it shows the spindle.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23271
- Thank you received: 4928
github.com/LinuxCNC/linuxcnc/blob/master...cripts/axis.py#L4201
Please Log in or Create an account to join the conversation.
- irwinger
- Away
- Junior Member
-
- Posts: 21
- Thank you received: 2
@tommylight - your statement is confusing... I assume you are meaning the .HAL file, because I specifically added the '[SPINDLE]' section to the .INI file. I won't claim it was correct or useful... it was what Google Gemini suggested when I asked (don't shoot me - I've had good success with the AI bots and frankly, I'm just TOO old to try to master 'everything technical'.
Taking your suggestion - I created a new config by starting LinuxCNC, selecting: (attaching screenshots of what I encountered in sequence)
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
- Posts: 20059
- Thank you received: 6822
HAL = connections between software and actual hardware
So if there is nothing about the spindle in hal = no spindle
And no shooting today, slept in total 5 hours in last 3 days, so i might miss !

Please Log in or Create an account to join the conversation.
- irwinger
- Away
- Junior Member
-
- Posts: 21
- Thank you received: 2
@tommylight - your post(s) about 'no spindle' configurations and suggestion to make a new config finally helped my 'through the forest'.
Not that I would ever 'bite the hand that feeds me', I have to ask if you were coaxing me in to discovery? I mean - how much more effort would it have been to state something like "the line in you HAL 'net spindle-on => parport.0.pin-09-out' does not initiate the spindle. It defines or assigns a pin to use (pin 9), but it doesn't actually make the pin 'do anything'. What you need is a line that connect the assigned pin to a function like this: 'net spindle-on spindle.0.on => parport.0.pin-09-out'"
First - I am just 'making this up' because I really do not understand the structure and syntax of the lines in the HAL file (something that I really think would have helped me in my discovery). Please feel free to delete this post or tell me to do so because I certainly do NOT want to confuse anyone else.
If this kind of documentation already exists somewhere - I certainly did not find it, but if you point me to it, I will be certain to explore. Meanwhile - thank you both again for your assistance and direction to resolving my issue!
Regards,
Arden
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
- Posts: 18442
- Thank you received: 5036
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
- Posts: 20059
- Thank you received: 6822
Yes that would have been more helpful for sure, in the long run.Not that I would ever 'bite the hand that feeds me', I have to ask if you were coaxing me in to discovery? I mean - how much more effort would it have been to state something like "the line in you HAL 'net spindle-on => parport.0.pin-09-out' does not initiate the spindle. It defines or assigns a pin to use (pin 9), but it doesn't actually make the pin 'do anything'. What you need is a line that connect the assigned pin to a function like this: 'net spindle-on spindle.0.on => parport.0.pin-09-out'"
I insisted on making a new config as i have seen way to many wander of in the depths oh hal and getting utterly lost and dazed and confused, subsequently giving up on LinuxCNC altogether, so my main aim for new users is to make the machine work first and foremost, then we can chat about options and bells and whistles.
I am glad you are one of the more analytical types and jump head first into problems, will try to keep in mind that next time i reply.
And, no, i am not deleting this, nor do i want you to delete it, it is a valid and respectful response.
Please Log in or Create an account to join the conversation.