Spindle control not showing in Axis window...

  • irwinger
  • Away
  • Junior Member
  • Junior Member
More
03 Apr 2025 20:40 #325640 by irwinger
Coming back to my CNC wood router after a good year off (controller PC hard drive died and I got busy renovating my house). I have a new hard drive, doubled the memory (16G), fresh and latest install downloaded last week from here (linuxcnc.org) and I have everything back 'moving and stopping'... except the spindle.

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
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
04 Apr 2025 00:07 #325649 by tommylight
Replied by tommylight on topic Spindle control not showing in Axis window...
Upload the hal and ini files here so we can have a look.
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
  • Junior Member
More
04 Apr 2025 02:16 #325650 by irwinger
Replied by irwinger on topic Spindle control not showing in Axis window...
I'm not in front of the LinuxCNC machine as I enter this - but I'm not sure I noticed any where I can change the LOCALE? Could you perhaps provide a bit more detail? I'm heading out to the shop right after I press 'Submit' to see if I can find something. Meanwhile - here are the INI and HAL files.

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
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
04 Apr 2025 04:58 #325658 by tommylight
Replied by tommylight on topic Spindle control not showing in Axis window...
No spindle there at all.
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.

More
04 Apr 2025 20:22 #325712 by andypugh
Replied by andypugh on topic Spindle control not showing in Axis window...
The Axis interface hides the spindle buttons if it doesn't see certain connections in the HAL file:

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
  • Junior Member
More
04 Apr 2025 23:17 - 05 Apr 2025 04:08 #325720 by irwinger
Replied by irwinger on topic Spindle control not showing in Axis window...
You'll have to forgive me guys but...

@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) 
​​​​​​ 
Last edit: 05 Apr 2025 04:08 by irwinger. Reason: Remove inline images

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
04 Apr 2025 23:28 #325723 by tommylight
Replied by tommylight on topic Spindle control not showing in Axis window...
INI =hal files and settings and scaling and....
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
  • Junior Member
More
05 Apr 2025 18:36 #325773 by irwinger
Replied by irwinger on topic Spindle control not showing in Axis window...
OK - I now have spindle control...

@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
The following user(s) said Thank You: tommylight

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

More
05 Apr 2025 19:14 #325774 by PCW

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
05 Apr 2025 21:42 #325776 by tommylight
Replied by tommylight on topic Spindle control not showing in Axis window...

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'"

Yes that would have been more helpful for sure, in the long run.
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.

Time to create page: 0.159 seconds
Powered by Kunena Forum