Advanced Search

Search Results (Searched for: stepper spindle)

  • zham
  • zham
Yesterday 20:28

Need help selecting a Spindle and VFD

Category: Milling Machines

Hi all,
I am completely new to this as you can probably tell. I recently bought an old Gerber Dimension 200 for cheap. It’s a beefy chassis that will allow for a great machine by doing some upgrades. I’m doing a complete overhaul of electronics, spindle, steppers, limit switches etc. All of which will be run off a 7i96 board with the SpinX1. I am a bit confused on how to choose a spindle. I’d like it to integrate with the Mesa board well obviously. The wiring just doesn’t make sense to me on what goes where. If anyone has a solid recommendation for a spindle kit or the like please let me know. Will only be doing wood and aluminum, with the occasional steel sheet. Thank you guys for your time and knowledge.
  • Derriell
  • Derriell
28 Jan 2026 01:07 - 28 Jan 2026 02:40

LinuxCNC conversion of Chinese 6040ZH Mach3 router

Category: Milling Machines

Hi

I'm new to CNC machines. I want to mill 3D aluminum on a smallish budget. That is the reason why I bough this used machine, my first one. Since I don't want to learn and buy end-of-life software and I like the power and flexibility that comes with open source projects like LinuxCNC the decision to convert it was easy.

It is a Chinese 6040ZH router, 60x40cm bed, 4 axis, rod rails on all axis, 1.5kw spindle, 57BYGH56-4011YD stepper motors (1.26Nm holding torque, 2.8A), 24V system, running mach3 with a USB connection.
Here is a link:  www.lygroupchina.com/gantry-cnc-router/h...c-machine-1500w.html
File Attachment:
 
File Attachment:

I' ve decided not to invest much into the machine because it has some mechanical design flaws and try to make the best out of it.
  1. It has rod rails and not linear guides
  2. The leaver arm on Y-axis to the rod rails is bigger than it needs to be. The rods could have been placed higher  
File Attachment:
 
File Attachment:


Since the controller board runs with a USB-Connection there is no way to run it directly with LinuxCNC. I wanted to know if its possible to reuse the electrical components and it seems so, the stepper motor controllers and the VFD for the spindle. Untested so far.
My plan is to use a MESA i796S board. If you have another suggestion let me know. Unfortunately they are out of stock currently.
  
The stepper motor controllers are 20 pin modules that stick on some kind of motherboard which also hosts the Mach3 controller, namely a Mach3-R-V1.3. With some reverse engineering I'm confident that I could figure out the function of the pins of the stepper motor controllers. The IC of the drivers seems to be a TB6600HQ or a clone. It has a voltage range of 8-42V, supports operating current of 4.5A, about 150w. It says www.shyidiao.com on them.
 
File Attachment:


Front side from left to right (with the heat spreader remove from the IC. On the bottom left are two optocouplers):
GND, +5V, Pulse, Direction, Stepper RED, Stepper BLUE, Stepper GREEN, Stepper BLACK, +24V, +24V
File Attachment:

 
Back side from left to right (reversed direction from above):
+24V, +24V, Stepper BLACK, Stepper GREEN, Stepper BLUE, Stepper RED, GND, GND, GND, GND

The soldering joints are very likely determining the microstepping of the drivers. If the configuration is from left to right: 1, 1/2, 1/4, 1/8, 1/16 and 1/32 then they are set to a reasonable 1/8.
File Attachment:

 
The spindle driver runs independent of the 24V system. It has two ways to receive an input:
  1. an analog input with voltage range 0-5V, currently wired to a potentiometer to manually control the spindle
  2. three digital inputs, allowing for 8 fixed speeds
The VFD has the marking Inverter_B_v07. Its pins seem to be from top to bottom:
+12V, +5V, i5V (analog Input), SGND (signal ground), FWD (run forward), REV (reverse), BCD2, BCD1, BCD0, ErrB, ErrA
File Attachment:


LinuxCNC can handle the TB6600HQ so if its correct they should run with it. Also the spindle can either be run with the analog input or the 3 bit digital one. I still have to decide which one to use. I like the possibility to run the stepper drivers and motors with 36V. That could be a nice upgrade from 24V.
I need a controller board that can handle 4 axis, this VFD, at least one limit switch, touch probe, automatic tool setting and in the future the possibility to attach sensors to close the loop (linear glass scale). The MESA i796S should be able to do that.

A question that is still open to me is how to physically connect the drivers to the MESA board?
  1. Buy these 20 Pin sockets and make a board with them? Probably costly and time consuming
  2. Solder the connections directly to the pins on the module and attach them somehow. Dirty, easy, quick, downside is, I can't plug them back in the motherboard
  3. Solder the connecting wires to the motherboard and plug the drivers into the board. Could be neat because the machine could be back ported to Mach3. Possible unwanted side effects on the board. Of course I would unplug the Mach3 controller chip.

Feel free to correct me or give suggestions etc. I hope the MESA cards are back in stock soon.

Bes
  • Mark Kraus
  • Mark Kraus
26 Jan 2026 21:40

Having Trouble getting encoder to work. Amt102-v 5 wire

Category: Basic Configuration

I was wondering if someone could take a look at my hal and ini files and tell me why i have not encoder count on my halshow but the at speed light is green.  All of this worked in uccnc before i switched over.  I set the encoder to 1024 ppr.  I have 5volts going to encoder.


# Generated by PNCconf at Mon Jan 26 15:37:21 2026
# Using LinuxCNC version:  Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=1 num_stepgens=5 sserial_port_0=0xxxxxxx" 
setp    hm2_7i96s.0.pwmgen.pwm_frequency 5000
setp    hm2_7i96s.0.pwmgen.pdm_frequency 6000000
setp    hm2_7i96s.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt near

addf hm2_7i96s.0.read          servo-thread
addf motion-command-handler   servo-thread
addf motion-controller        servo-thread
addf pid.x.do-pid-calcs       servo-thread
addf pid.y.do-pid-calcs       servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf near.0                   servo-thread
addf hm2_7i96s.0.write         servo-thread
setp hm2_7i96s.0.dpll.01.timer-us -50
setp hm2_7i96s.0.stepgen.timer-number 1

# external output signals

# --- SPINDLE-BRAKE ---
net spindle-brake  =>     hm2_7i96s.0.ssr.00.out-00

# --- COOLANT-MIST ---
net coolant-mist  =>     hm2_7i96s.0.ssr.00.out-01

# --- SPINDLE-CW ---
net spindle-cw  =>     hm2_7i96s.0.outm.00.out-04

# --- SPINDLE-CCW ---
net spindle-ccw  =>     hm2_7i96s.0.outm.00.out-05


# external input signals

# --- ESTOP-EXT ---
net estop-ext     <=  hm2_7i96s.0.inm.00.input-00

# --- ALL-LIMIT ---
net all-limit     <=  hm2_7i96s.0.inm.00.input-01


#*******************
#  AXIS X JOINT 0
#*******************

setp   pid.x.Pgain     [JOINT_0]P
setp   pid.x.Igain     [JOINT_0]I
setp   pid.x.Dgain     [JOINT_0]D
setp   pid.x.bias      [JOINT_0]BIAS
setp   pid.x.FF0       [JOINT_0]FF0
setp   pid.x.FF1       [JOINT_0]FF1
setp   pid.x.FF2       [JOINT_0]FF2
setp   pid.x.deadband  [JOINT_0]DEADBAND
setp   pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.x.maxerror 0.000500

net x-index-enable  =>  pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-pos-cmd       =>  pid.x.command
net x-pos-fb        =>  pid.x.feedback
net x-output        <=  pid.x.output

# Step Gen signals/setup

setp   hm2_7i96s.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i96s.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i96s.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i96s.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i96s.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i96s.0.stepgen.00.step_type        0
setp   hm2_7i96s.0.stepgen.00.control-type     1
setp   hm2_7i96s.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i96s.0.stepgen.00.maxvel           [JOINT_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     => hm2_7i96s.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i96s.0.stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i96s.0.stepgen.00.enable

# ---setup home / limit switch signals---

net x-home-sw     =>  joint.0.home-sw-in
net all-limit     =>  joint.0.neg-lim-sw-in
net all-limit     =>  joint.0.pos-lim-sw-in

#*******************
#  AXIS Y JOINT 1
#*******************

setp   pid.y.Pgain     [JOINT_1]P
setp   pid.y.Igain     [JOINT_1]I
setp   pid.y.Dgain     [JOINT_1]D
setp   pid.y.bias      [JOINT_1]BIAS
setp   pid.y.FF0       [JOINT_1]FF0
setp   pid.y.FF1       [JOINT_1]FF1
setp   pid.y.FF2       [JOINT_1]FF2
setp   pid.y.deadband  [JOINT_1]DEADBAND
setp   pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp   pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.y.maxerror 0.000500

net y-index-enable  =>  pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
net y-pos-fb        =>  pid.y.feedback
net y-output        <=  pid.y.output

# Step Gen signals/setup

setp   hm2_7i96s.0.stepgen.01.dirsetup        [JOINT_1]DIRSETUP
setp   hm2_7i96s.0.stepgen.01.dirhold         [JOINT_1]DIRHOLD
setp   hm2_7i96s.0.stepgen.01.steplen         [JOINT_1]STEPLEN
setp   hm2_7i96s.0.stepgen.01.stepspace       [JOINT_1]STEPSPACE
setp   hm2_7i96s.0.stepgen.01.position-scale  [JOINT_1]STEP_SCALE
setp   hm2_7i96s.0.stepgen.01.step_type        0
setp   hm2_7i96s.0.stepgen.01.control-type     1
setp   hm2_7i96s.0.stepgen.01.maxaccel         [JOINT_1]STEPGEN_MAXACCEL
setp   hm2_7i96s.0.stepgen.01.maxvel           [JOINT_1]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y-pos-cmd    <= joint.1.motor-pos-cmd
net y-vel-cmd    <= joint.1.vel-cmd
net y-output     => hm2_7i96s.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i96s.0.stepgen.01.position-fb
net y-pos-fb     => joint.1.motor-pos-fb
net y-enable     <= joint.1.amp-enable-out
net y-enable     => hm2_7i96s.0.stepgen.01.enable

# ---setup home / limit switch signals---

net y-home-sw     =>  joint.1.home-sw-in
net all-limit     =>  joint.1.neg-lim-sw-in
net all-limit     =>  joint.1.pos-lim-sw-in

#*******************
#  AXIS Z JOINT 2
#*******************

setp   pid.z.Pgain     [JOINT_2]P
setp   pid.z.Igain     [JOINT_2]I
setp   pid.z.Dgain     [JOINT_2]D
setp   pid.z.bias      [JOINT_2]BIAS
setp   pid.z.FF0       [JOINT_2]FF0
setp   pid.z.FF1       [JOINT_2]FF1
setp   pid.z.FF2       [JOINT_2]FF2
setp   pid.z.deadband  [JOINT_2]DEADBAND
setp   pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp   pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.z.maxerror 0.000500

net z-index-enable  =>  pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
net z-pos-fb        =>  pid.z.feedback
net z-output        <=  pid.z.output

# Step Gen signals/setup

setp   hm2_7i96s.0.stepgen.02.dirsetup        [JOINT_2]DIRSETUP
setp   hm2_7i96s.0.stepgen.02.dirhold         [JOINT_2]DIRHOLD
setp   hm2_7i96s.0.stepgen.02.steplen         [JOINT_2]STEPLEN
setp   hm2_7i96s.0.stepgen.02.stepspace       [JOINT_2]STEPSPACE
setp   hm2_7i96s.0.stepgen.02.position-scale  [JOINT_2]STEP_SCALE
setp   hm2_7i96s.0.stepgen.02.step_type        0
setp   hm2_7i96s.0.stepgen.02.control-type     1
setp   hm2_7i96s.0.stepgen.02.maxaccel         [JOINT_2]STEPGEN_MAXACCEL
setp   hm2_7i96s.0.stepgen.02.maxvel           [JOINT_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net z-pos-cmd    <= joint.2.motor-pos-cmd
net z-vel-cmd    <= joint.2.vel-cmd
net z-output     => hm2_7i96s.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i96s.0.stepgen.02.position-fb
net z-pos-fb     => joint.2.motor-pos-fb
net z-enable     <= joint.2.amp-enable-out
net z-enable     => hm2_7i96s.0.stepgen.02.enable

# ---setup home / limit switch signals---

net z-home-sw     =>  joint.2.home-sw-in
net all-limit     =>  joint.2.neg-lim-sw-in
net all-limit     =>  joint.2.pos-lim-sw-in

#*******************
#  SPINDLE
#*******************

setp   pid.s.Pgain     [SPINDLE_0]P
setp   pid.s.Igain     [SPINDLE_0]I
setp   pid.s.Dgain     [SPINDLE_0]D
setp   pid.s.bias      [SPINDLE_0]BIAS
setp   pid.s.FF0       [SPINDLE_0]FF0
setp   pid.s.FF1       [SPINDLE_0]FF1
setp   pid.s.FF2       [SPINDLE_0]FF2
setp   pid.s.deadband  [SPINDLE_0]DEADBAND
setp   pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  =>  pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---PWM Generator signals/setup---

setp   hm2_7i96s.0.pwmgen.00.output-type 1
setp   hm2_7i96s.0.pwmgen.00.scale  [SPINDLE_0]OUTPUT_SCALE


net spindle-output      => hm2_7i96s.0.pwmgen.00.value
net spindle-enable      => hm2_7i96s.0.pwmgen.00.enable

# ---Encoder feedback signals/setup---

setp    hm2_7i96s.0.encoder.00.counter-mode 0
setp    hm2_7i96s.0.encoder.00.filter 1
setp    hm2_7i96s.0.encoder.00.index-invert 0
setp    hm2_7i96s.0.encoder.00.index-mask 0
setp    hm2_7i96s.0.encoder.00.index-mask-invert 0
setp    hm2_7i96s.0.encoder.00.scale  [SPINDLE_0]ENCODER_SCALE

net spindle-revs             <=   hm2_7i96s.0.encoder.00.position
net spindle-vel-fb-rps       <=   hm2_7i96s.0.encoder.00.velocity
net spindle-vel-fb-rpm       <=   hm2_7i96s.0.encoder.00.velocity-rpm
net spindle-index-enable     <=>  hm2_7i96s.0.encoder.00.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs    <=  spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  spindle.0.speed-out
net spindle-vel-cmd-rpm-abs    <=  spindle.0.speed-out-abs
net spindle-enable             <=  spindle.0.on
net spindle-cw                 <=  spindle.0.forward
net spindle-ccw                <=  spindle.0.reverse
net spindle-brake              <=  spindle.0.brake
net spindle-revs               =>  spindle.0.revs
net spindle-at-speed           =>  spindle.0.at-speed
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable

# ---Setup spindle at speed signals---

net spindle-vel-cmd-rps    =>  near.0.in1
net spindle-vel-fb-rps         =>  near.0.in2
net spindle-at-speed       <=  near.0.out
setp near.0.scale 1.000000
setp near.0.difference 1.666667


#******************************
# connect miscellaneous signals
#******************************

#  ---HALUI signals---

net axis-select-x  halui.axis.x.select
net jog-x-pos      halui.axis.x.plus
net jog-x-neg      halui.axis.x.minus
net jog-x-analog   halui.axis.x.analog
net x-is-homed     halui.joint.0.is-homed
net axis-select-y  halui.axis.y.select
net jog-y-pos      halui.axis.y.plus
net jog-y-neg      halui.axis.y.minus
net jog-y-analog   halui.axis.y.analog
net y-is-homed     halui.joint.1.is-homed
net axis-select-z  halui.axis.z.select
net jog-z-pos      halui.axis.z.plus
net jog-z-neg      halui.axis.z.minus
net jog-z-analog   halui.axis.z.analog
net z-is-homed     halui.joint.2.is-homed
net jog-selected-pos      halui.axis.selected.plus
net jog-selected-neg      halui.axis.selected.minus
net spindle-manual-cw     halui.spindle.0.forward
net spindle-manual-ccw    halui.spindle.0.reverse
net spindle-manual-stop   halui.spindle.0.stop
net machine-is-on         halui.machine.is-on
net jog-speed             halui.axis.jog-speed
net MDI-mode              halui.mode.is-mdi

#  ---coolant signals---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---probe signal---

net probe-in     =>  motion.probe-input

#  ---motion control signals---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---digital in / out signals---

#  ---estop signals---

net estop-out     <=  iocontrol.0.user-enable-out
net estop-ext     =>  iocontrol.0.emc-enable-in

#  ---manual tool change signals---

net tool-change-request    <= iocontrol.0.tool-change
net tool-change-confirmed  => iocontrol.0.tool-changed
net tool-number            <= iocontrol.0.tool-prep-number

#  ---ignore tool prepare requests---
net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared




# Generated by PNCconf at Mon Jan 26 15:37:21 2026
# Using LinuxCNC version:  Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = Bridgeportsimple2
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = qtvcp qtdragon
PREFERENCE_FILE_PATH = WORKINGFOLDER/qtdragon.pref
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_0_OVERRIDE = 2.000000
MIN_SPINDLE_0_OVERRIDE = 0.500000
DEFAULT_SPINDLE_0_SPEED = 500
MIN_SPINDLE_0_SPEED = 100
MAX_SPINDLE_0_SPEED = 2500
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/debian/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.000000
MIN_LINEAR_VELOCITY = 0.016670
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
CYCLE_TIME = 100

[MDI_COMMAND_LIST]
MDI_COMMAND = G0 Z0;X0 Y0
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
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
RS274NGC_STARTUP_CODE = G20 G40 G90 G94 G97 G64 P0.001

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1200000

[HMOT]
# **** This is for info only ****
CARD0=hm2_7i96s.0

[HAL]
HALUI = halui
HALFILE = Bridgeportsimple2.hal
HALFILE = custom.hal
POSTGUI_HALFILE = qtvcp_postgui.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal

[HALUI]

[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ

[TRAJ]
COORDINATES =  XYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.15
MAX_LINEAR_VELOCITY = 1.48

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#******************************************
[AXIS_X]
MAX_VELOCITY = 1.1666666666666667
MAX_ACCELERATION = 10.0
MIN_LIMIT = -7.0
MAX_LIMIT = 8.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.1666666666666667
MAX_ACCELERATION = 10.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 2.33
STEPGEN_MAXACCEL = 20.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 5000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = 4000.0
BACKLASH = 0.001
MIN_LIMIT = -7.0
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
HOME_SEQUENCE = 1
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 10.0
MIN_LIMIT = -8.0
MAX_LIMIT = 8.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 10.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 2.00
STEPGEN_MAXACCEL = 20.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 5000
DIRHOLD    = 5000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = -16000.0
BACKLASH = 0.001
MIN_LIMIT = -8.0
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
HOME_SEQUENCE = 2
#******************************************

#******************************************
[AXIS_Z]
MAX_VELOCITY = 1.4833333333333334
MAX_ACCELERATION = 10.0
MIN_LIMIT = -3.0
MAX_LIMIT = 5.0

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.4833333333333334
MAX_ACCELERATION = 10.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 2.97
STEPGEN_MAXACCEL = 20.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 2000
DIRHOLD    = 2000
STEPLEN    = 2000
STEPSPACE  = 2000
STEP_SCALE = -65000.0
BACKLASH = 0.001
MIN_LIMIT = -3.0
MAX_LIMIT = 5.0
HOME_OFFSET = 0.0
HOME_SEQUENCE = 1
#******************************************

[SPINDLE_0]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 2000.0
ENCODER_SCALE = 4096.0
OUTPUT_SCALE = 2000
OUTPUT_MIN_LIMIT = -2000
OUTPUT_MAX_LIMIT = 2000




# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again

# Custom spindle analog PWM setup for 7i96S TB2 (pot replacement mode)
# This file will not be overwritten when you run PNCconf again

setp hm2_7i96s.0.pwmgen.00.scale 3500     # Max RPM = full ~10V output

# Let pncconf's existing connection handle the value signal
# (it usually connects pwmgen.00.value to spindle-output or similar)

# Enable the PWMgen when spindle is on
#net spindle-on spindle.0.on => hm2_7i96s.0.pwmgen.00.enable

# Optional: Digital FWD enable on TB3 (OUT4 for example)
# net spindle-on hm2_7i96s.0.ssr.00.out-04   # Adjust out-04 to match your assignment


# ============================================
# Spindle Encoder RPM Display Fix (Ultimate Final - No Encoder Pin Nets)
# Only setp for encoder config + single bridge net on display side
# Zero duplicate warnings, pncconf-safe
# ============================================

# Encoder configuration (setp only - completely safe)
setp hm2_7i96s.0.encoder.00.counter-mode   0      # Quadrature A/B/Z
setp hm2_7i96s.0.encoder.00.filter         1      # Filter noise/blips

# Scale - CHANGE THIS to your actual PPR × 4
# Test: Spin shaft 1 full turn by hand → count change / 4 = PPR
# Common AMT102-V settings: 400 CPR → 1600, 1000 → 4000, 1024 → 4096
setp hm2_7i96s.0.encoder.00.scale          4096   # ← EDIT THIS LINE !!!

# Optional: Invert A/B if direction is reversed (counts decrease on forward spin)
# setp hm2_7i96s.0.encoder.00.phase-a-invert 1
# setp hm2_7i96s.0.encoder.00.phase-b-invert 1

# Route pncconf's existing velocity signal to QtDragon RPM display pin
# This is the only net - it never touches encoder pins
# net spindle-vel-fb-rpm => spindle.0.speed-in-rpm

# Optional: Extra smoothing to eliminate random blips when stopped
# Uncomment if blips persist after scale fix
# loadrt lowpass
# addf lowpass.0 servo-thread
# setp lowpass.0.gain 0.05   # Lower = smoother (0.01–0.1 range)
# net spindle-velocity-filtered lowpass.0.out => spindle.0.speed-in-rpm

 
  • Hakan
  • Hakan
26 Jan 2026 08:42 - 26 Jan 2026 08:43
Replied by Hakan on topic Lichuan 4 axis stepper need help-

Lichuan 4 axis stepper need help-

Category: EtherCAT

The same thing happens when people switch between csp and pv modes (rotary axis to spindle motor and back),
they have problem with the rotary position feedback. Could there be a general way? Save the position, and later
create an offset to add to the position feedback. Sounds like that could work.

The point I wanted to make about cia402 state machine was that the device decides the state,
the cia402 component can only react and ask for a change of state. 
 

The cia402 component really only uses two states, disabled and op enabled, controlled by the enable pin.
Either transition to and stay in disabled mode, or transition to and stay in op enabled mode.
When in op enabled state, you can switch between the different operation modes. Anyway.

Is there no message in the syslog when you have a mismatch between pdos? I would have expected something there.
 
  • timo
  • timo
25 Jan 2026 14:57 - 25 Jan 2026 15:19
Replied by timo on topic Best controll board for LinuxCNC

Best controll board for LinuxCNC

Category: General LinuxCNC Questions

As I understood open loop drivers and motors are existing and are kept in the system. (for the time beeing) :-)

It is probably difficult to answer the question. What makes a controller better (best)?
  • cheap? (two parallel ports (PCIe cards) in old office PC)
  • least amount of re-wiring? (existing parallel port machine?)
  • cheaper? (but not a bit of documentation) ( FPGA cards of unknown origin)
  • Is wasted time cheaper than money spent?
  • easy to set up? ( pnc config)
  • upgradable? (linear scales, tool changer, rigid tapping, closed loop positioning, linear motors)

    I used an old parallel port machine, changing form mach3 to LinuxCNC was 90% figuring the "charge pump" out (no re-wiring, all in software), then the computer quit service and the replacement had no parallel port. (a 10$ PCIe card fixed that). 
    Having problems to get an encoder running a Mesa card (6i25 with daughter card) went into the machine. (solving the spindle encoder issue)   (it still is a Frankenstein mixed Mesa and Parallel port). 

    Greetings Timo 

    p.s. the UC300ETH is that working with linuxcnc? Some older threads stated it does not work.
    forum.linuxcnc.org/27-driver-boards/2982...moothstepper-to-mesa
  • Hakan
  • Hakan
24 Jan 2026 13:16 - 24 Jan 2026 13:18
Replied by Hakan on topic Lichuan 4 axis stepper need help-

Lichuan 4 axis stepper need help-

Category: EtherCAT

Well, I think it follows the state diagram up to the point of operation
 

But for sure it isn't perfect. I have noticed multiple homing components around even if I don't use it myself.
Can you add support for PV (Profile Velocity) while you are at it? I made a quick fix for that.
PV is suitable for spindle mode.

You should be able to transition states manually, in halshow for example, using controlword and check statusword.
Maybe that can give a clue to why it seems so grumpy.
  • Mark Kraus
  • Mark Kraus
14 Jan 2026 05:29

Trying to move from UCCNC to Linuxcnc and using 7i96s but having trouble

Category: StepConf Wizard

I’m reaching out to the forum to hopefully get some guidance.I’ve spent the past several days working through a LinuxCNC setup with a Mesa 7i96S for what should be a fairly straightforward retrofit on a :Bridgeport Series 2
  • XYZ mill
  • X & Y steppers
  • Z servo (knee)
  • No exotic kinematics, just a basic mill configuration
I’ve gone through many iterations and changes (largely guided by ChatGPT), and while I’ve learned a lot, I’m currently back near square one. I did manage to get one motor oscillating back and forth, so I know signals are getting through at some level.At this point:
  • I do have solid communication between the PC and the Mesa card
  • Network issues are resolved (static IP for Mesa, internet via USB dongle)
  • Latency issues were addressed by disabling several BIOS features
  • Debian installation and networking are now things I actually understand, which is a win
That said, I’m struggling with what feels like a high barrier just to get basic motion. My main question to the community is:

Is it realistic to expect a simple XYZ mill (2 steppers + 1 servo) to at least jog without days of trial-and-error, or is this learning curve typical?

For context, I’m not new to CNC:
  • I previously had this machine running under UCCNC
  • I had:
    • A 4th axis
    • VFD spindle control
    • Spindle brake
    • Mist, air to the knee, and lube pump
  • All of that worked reliably
The only reason I switched to LinuxCNC was:
  • I want true rigid tapping
  • I’m interested in the QtDragon / QtPlasma ecosystem
  • I also have a router and another plasma table I’d like to potentially convert
So this is not a casual experiment — I’d really like to make LinuxCNC work long-term.I’ve learned a lot in the last few days:
  • Installing Debian cleanly
  • BIOS tuning for real-time performance
  • Static networking for Mesa Ethernet cards
  • Separating “GUI motion” from real hardware motion
    …but I’m still not confident I understand the correct minimal path to first motion.
I’m hoping for reassurance that:
  • This transition is doable
  • There is a clean, recommended workflow for initial bring-up
  • I’m not fundamentally missing something obvious
Any perspective, advice, or “yes, this is normal / no, it shouldn’t be this hard” would be greatly appreciated.Thanks in advance,
Mark
  • jimmyrig
  • jimmyrig
06 Jan 2026 04:26
Replied by jimmyrig on topic Complete Newbee - Need help

Complete Newbee - Need help

Category: General LinuxCNC Questions

The way I would approach this (many ways).

First you need to look at the old controller and pray you see a step and direction text somewhere on the board, wire labels, anywhere.

If so follow the below. If not I'd probably see if I could find the software or manual to program the drives. Maybe chapgtp can help here?

If it's step and direction your life is easy
Step 1. Buy a 7i96 or 7i96s, if doing spindle speed control with a vfd S makes it a bit easier. (If you want to check sanity buy a stepper and drive to verify it works before testing the drives)
Step 2. Test the existing servo/stepper drives to see if they work. If you tore apart the wiring this may take some trial and error.
Step 3. Figure out the screw pitch and run through the pnf config

Finally that spindle looks usable...prob the easiest thing to save. Is it a 3 phase induction motor?
  • Ozcnc
  • Ozcnc
30 Dec 2025 04:15

Linuxcnc 2.9.7 - Mesa 5i25 with HKD 5 AXIS MACH3 STEPPER I/FACE and 5i25_5ABOBx2

Category: Driver Boards

Bob has 5v using usb.
I'm only working with 5v now to get step/dir outputs working.
I will connect the 12v supply to run the spindle.
  • Ozcnc
  • Ozcnc
29 Dec 2025 12:18

Linuxcnc 2.9.7 - Mesa 5i25 with HKD 5 AXIS MACH3 STEPPER I/FACE and 5i25_5ABOBx2

Category: Driver Boards

Hello,
I've spent a few days getting Linuxcnc 2.9.7 up and running with a Mesa 5i25 board, properly flashed and functioning.
My hardware setup consists of 2no X-axis gecko 203V drives, 1no Y - axis, 1no Z-axis, and 1no A-axis.
I have x,y,z home switches, e-stop, and Highspeed Spindle.

I have been trying to get the mesa card to work with a HKD 5 AXIS MACH3 BOB.
Currently i can get mesa to drive the gecko drives and motors if I connect directly (Testing Purposes Only).
I cannot get the HKD BOB to drive the gecko drives and motors.

Does anyone have suggestions?

Thanks,
Orrin
 
  • DoWerna
  • DoWerna's Avatar
26 Dec 2025 08:17

CNC Rotary Table with Standalone Controller for Gear Hobbing

Category: Basic Configuration

Hello,
I already have a Maho MH500 and a cycloidal lathe retrofitted to LinuxCNC, so I do have some practical experience with LinuxCNC retrofits.Now a colleague has approached me with the following idea:
He wants to build a CNC rotary table for his Maho MH600 in order to hob gears (gear hobbing).The idea is a rotary table with an “electronic gearbox”, synchronized to the machine spindle of the Maho.Key requirements:
  • Maximum rotary table speed: ~300 rpm
  • Servo or stepper drive with a gearbox, approx. 1:3
  • The control should run fully standalone
  • Only spindle position and spindle speed are taken from the spindle encoder
  • The rotary table is synchronized to the spindle via electronic gearing
Questions / design considerations:
  • What is the best choice of encoder for this application?
    Probably an absolute encoder? or better incremental for a better dynamic?
  • Servo motor will most likely be NEMA 42 size
  • Encoder setup ideas:
    • Incremental encoder on the spindle
    • Encoder directly on the rotary table
    • Possibly an additional encoder on the motor
  • How should the control and feedback loops be structured for this setup?
I would appreciate any recommendations regarding:
  • encoder types and placement
  • control loop architecture
  • practical LinuxCNC / Mesa hardware solutions for this kind of standalone rotary table
  • zippoffs
  • zippoffs's Avatar
23 Dec 2025 15:51

DIY CNC Mill - Random Limit Switch Errors

Category: Milling Machines

Hello, I'm new to the forum. I have spent the past year and a half building my own CNC mill that runs on LinuxCNC, and it is mostly done now. Except that I can't get it to finish a program because it keeps thinking that the limit switches have been triggered even though they haven't.

I built this mill from scratch. It is made entirely of aluminum plate and extrusions. It has NEMA23 closed loop steppers, SFU1204 ballscrews, HGH20CA linear rails, a 2.2kw 220v 3 phase spindle and 2.2kw VFD, a "5 axis" parallel port breakout board, a Dell OptiPlex 990 with a parallel port card and running LinuxCNC (obviously). For limit/home switches I have it set up to where one limit switch doubles as a home switch, and all six switches are normally closed and in series all going to one input pin. The limit switches are generic micro switches, and the limit/home switches are Metrol CS067B. I have 24V running through the switches, so I'm using a 24v to 5v optocoupler board to bring the signal down to 5v for the breakout board. The Metrol switch wires are not shielded, but because they cost $67 a piece, I don't want to mess with that. The wires for the other switches are shielded.

This is what happens when I try to run a program: I home the machine, import the program into Axis, hit run, and it could be 1, 5, or 60 seconds later that it suddenly stops the machine because a limit switch was supposedly hit. It doesn't seem to happen consistently. I originally had the VFD next to the other electronics in a copper mesh cage, but ended up making a sheet metal box for it and moving it away (and took the spindle cable out of the cable chain that also held other wires). I thought that would prevent any EMI from interfering with the other electronics. But that didn't fix it. I have narrowed it down to an issue between the spindle/VFD and the breakout board. I can run a program perfectly fine with everything on except for the spindle/VFD, so it can't be the steppers or drivers. I have tried running 24v directly to the optocoupler board, bypassing the switches, but it still triggers. I have tried completely bypassing the limit switch circuit by jumping the input pin on the breakout board to ground, and it still triggers. I have spent hours researching this, and I have tried almost everything. I have my VFD in a Faraday cage. I'm using a shielded spindle cable with the shielding grounded at both ends. I have the signal wires shielded and grounded. I don't know what I'm doing wrong.

I have spent weeks trying to diagnose this, and now I am only more confused. Part of the problem is that I'm only 18 and I'm not an electrical engineer (I'm not even a mechanical engineer yet!), and I'm learning a lot of this for the first time. I have run out of things to try, and I would really appreciate any help I can get. Thank you in advance!
  • Nator
  • Nator
20 Dec 2025 09:47
Replied by Nator on topic PicoBOB-DLX

PicoBOB-DLX

Category: Driver Boards

Hi,
thanks for the answer!
To get the 7i92T working I need at least a "standard" lpt breakoutboard, right? That would be for the steppers. What would I need for a 0-10V signal for the spindle? Can I plug in glass "sensor" into it? (I would not really need it, never had any step losses with my other machine).
Well yes you always have to double check what the KI says, but for programming it helps alot :)
regards Han
  • Masiwood123
  • Masiwood123's Avatar
05 Dec 2025 22:13
Replied by Masiwood123 on topic Hybrid Manual/Stepper Control

Hybrid Manual/Stepper Control

Category: General LinuxCNC Questions

forum.linuxcnc.org/27-driver-boards/4698...7i96s?start=0#252760

I made a lathe with manual control of two axes simulatively, although apart from the servo motor as the main spindle I didn't have another axis as in your Z that could do its thing while these two are moved manually as I understood. maybe something in this topic can help.
  • jaro_p
  • jaro_p's Avatar
04 Dec 2025 13:48 - 04 Dec 2025 14:07

Changes in configuration files generated in pncconfig for 7i76 to 7i78

Category: PnCConf Wizard

Thanks for the answer, but I understand that I have to edit it.
Only the 7i76 card has a different pin arrangement. Otherwise, the pins on P1 are DB25. Fortunately, the pins for the first four axes are identical. I already wrote that, it works without problems.
But while the 7i78 has spindle control, serial interface and encoder for the spindle on pins 05-13, the 7i76 has an output for the fifth stepper motor, two serial interfaces and an encoder on the same pins. That encoder is labeled ENx, unlike the encoder on the 7i78 - it is QUADx. I don't know if it's the same.
So if, for example, I activate the spindle encoder on P1 in pncconf, will it be the same for the 7i78? And further, on connectors P1 and P2 (on which the 7i78 can be physically located), there is no option to set spindle dir, enable. I set this on P7 but I need it to be on P1. Will it be enough to overwrite the IO number and will it work?
Let me not forget, on the P7 pins it is possible to set the direction of rotation for the spindle - two pins, but on the P1 DB25 there is a SPINDIR pin which is one pin. So if I set one pin on P7 to CW and the other to CCW, will it get to the right place on the 7i78?
Displaying 1 - 15 out of 160 results.
Time to create page: 0.983 seconds
Powered by Kunena Forum