Advanced Search

Search Results (Searched for: stepper spindle)

  • dgdodo
  • dgdodo
Yesterday 01:18
Replied by dgdodo on topic [SOLVED] Backlash issues on Y-AXIS

[SOLVED] Backlash issues on Y-AXIS

Category: Advanced Configuration

Thanks for all info so far.
I decided to change the Y-axis also with a M4-(screw) spindle drive (not M3 as I said before), as I did on the X-axis.
Had the (almost) same stepper-motor around, although after testing it needed 2 times more Volt to be powerful enough.
Now it all looks much better!
The old gear setup was too much worn out, I believe. And 2 (plastic) gears before driving the arm had 1.3 mm backlash is also kinda 'too much'.

PS. I thought I tried the write action at last position in the .hal file (base-thread), but was forgotten to change the .ini file accordingly.
It does run fine now and I am not (willing) able to build back the old situation to test this again, sorry for that.

And yes, I will cleanup my configuration files after this change, the X- and Y-axis are now the same.

Regards, DG.
 
  • Muftijaja
  • Muftijaja
Yesterday 21:48

problems with Y-Axis, elliptic deviations after several changes -Probe Basic V.5

Category: QtPyVCP

Hello community!
I have a Mesa 7i76e running, the wiring is correct except for the alarm loop. Using a Lenovo ThinkCentre M910q with i7 4-core, 256/GB NVMe SSD, i7 16GB RAM WLAN Intel Core i7-6700T 4x 2.80 - 3.60GHz with Linuxcnc 2.9.4, Probe Basic V.5 on Debian 12. No latency problems.

Once again, I'm here with a big problem. My DIY milling machine (1000x500x220 with aluminum profile frame, 20mm HGR, 1605 ball screws, 3 axes, 2x OMC Stpperonline 400W integrated servo, 1x JMC CL Stepper 3.5Nm, set 2000 steps/rev) is now mechanically finally assembled. I also got a lot of help from this forum in setting up LinuxCNC, eliminating latency problems and spindle control problems, but now I have a milling problem that I can't solve.

I have milled several test parts with drill holes, 2 circular pockets, and a rectangular outer contour, and have noticed that my circular pockets are becoming elliptical. The deviations in Y are approximately +0.35 mm at 45° and approximately -0.38 mm at 135°. The X values for the rectangular contour are perfect to within 0.01 mm in X and 0.09 mm in Y, X I consider to be acceptable, but Y is over tolerance. However, the circular movements contain deviations I cannot tolerate. I will show you a photo of the last test piece. After each individual test part, I made changes to rule out certain things.
The first change was to replace a simple Chinese C7 ball screw with a ground C5 spindle with double nuts. This reduced the originally even higher values by almost half. However, the deviations described above remained. After the next test part, I replaced the 400 W servo with a 3.5 Nm JMC CL stepper motor. The results remained almost the same. As a final attempt, a few days ago I replaced the spindle's fixed bearing with a new one, with 7002AC angular contact bearings in an O-arrangement with a 1 mm spacer ring between the outer rings. I inspected the previous fixed bearing and found no faults. There was a 1mm spacer also and the O arrangement was the same.  I had also taken measurements at the spindle end earlier and actually and found no backlash.

Yesterday, moving away from mechanical faults, I noticed a difference in the motor definitions for the X and Y axes in the .ini file. The Ferror and min_Ferror points differed by one decimal place. X was set to 0.1 and 0.01, while the Y axis was set to 1.0 and 0.1. After I corrected this difference, the motor on the Y axis went into alarm mode after a few position changes.

What could be the reason for this? How can it be that one motor runs perfectly with much lower tolerance values, while the other quickly goes into alarm mode with less load? The motor in question has the same power supply and is certainly less demanding in terms of starting currents than the servo on the X-axis. With the higher tolerance values, the Y motor runs without alarm, but has these deviations. Are these tolerance values in the .ini file responsible for these deviations?
The mechanics of the Y and Z axes are flawless, as checked with a dial gauge, and the repeat accuracy is also very good, less than one hundredth. 
Do you have any ideas about this? Where can I look further?
Thanks for your time and hints    

 

File Attachment:

File Name: Hanno_Nr5_...1-18.hal
File Size:12 KB

File Attachment:

File Name: Hanno_Nr5_...1-18.ini
File Size:6 KB
  • Ferra
  • Ferra
Yesterday 08:28
Replied by Ferra on topic Mesa 7i95t with pwm firmware

Mesa 7i95t with pwm firmware

Category: Driver Boards

Hi, thanks for helping, here are the files!

Hal file
# This file was created with the Mesa Configuration Tool on nov 15 2025 15:24:04
# If you make changes to this file DO NOT run the configuration tool again!
# This file will be replaced with a new file if you do!

# kinematics
loadrt [KINS](KINEMATICS)

# motion controller
loadrt [EMCMOT](EMCMOT) servo_period_nsec=[EMCMOT](SERVO_PERIOD) num_joints=[KINS](JOINTS)

# hostmot2 driver
loadrt hostmot2
loadrt [HM2](DRIVER) board_ip=[HM2](ADDRESS) config="num_encoders=6 num_pwmgens=1 num_stepgens=6 sserial_port_0=00000000"

setp hm2_[MESA](BOARD).0.watchdog.timeout_ns 10000000

loadrt pid names=pid.x,pid.y,pid.z

# PID Information for Stepper Boards
# Mesa hardware step generators at every servo thread invocation, the step
# generator hardware is given a new velocity. Without feedback from the PID
# controller the hardware position would slowly drift because of clock speed and
# timing differences between LinuxCNC and the step generator hardware.
# The PID controller gets feedback from the actual (fractional) step position and
# corrects for these small differences.

# THREADS
addf hm2_[MESA](BOARD).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 hm2_[MESA](BOARD).0.write servo-thread

# DPLL TIMER
setp hm2_[MESA](BOARD).0.dpll.01.timer-us -200
setp hm2_[MESA](BOARD).0.stepgen.timer-number 1

# amp enable
net motion-enable <= motion.motion-enabled

# Board: 7i95

# Axis: X Joint: 0 Output: 0
# PID Setup
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
# limit stepgen velocity corrections caused by position feedback jitter
setp pid.x.maxerror [JOINT_0](MAX_ERROR)

# joint-0 enable chain
net joint-0-index-enable <=> pid.x.index-enable
net joint-0-index-enable <=> joint.0.index-enable

net joint-0-enable <= joint.0.amp-enable-out
net joint-0-enable => pid.x.enable

net joint-0-enable => hm2_[MESA](BOARD).0.stepgen.00.enable

# Joint 0 Step Generator Settings
setp hm2_[MESA](BOARD).0.stepgen.00.dirsetup [JOINT_0](DIRSETUP)
setp hm2_[MESA](BOARD).0.stepgen.00.dirhold [JOINT_0](DIRHOLD)
setp hm2_[MESA](BOARD).0.stepgen.00.steplen [JOINT_0](STEPLEN)
setp hm2_[MESA](BOARD).0.stepgen.00.stepspace [JOINT_0](STEPSPACE)
setp hm2_[MESA](BOARD).0.stepgen.00.position-scale [JOINT_0](SCALE)
setp hm2_[MESA](BOARD).0.stepgen.00.maxvel [JOINT_0](STEPGEN_MAX_VEL)
setp hm2_[MESA](BOARD).0.stepgen.00.maxaccel [JOINT_0](STEPGEN_MAX_ACC)
setp hm2_[MESA](BOARD).0.stepgen.00.step_type 0
setp hm2_[MESA](BOARD).0.stepgen.00.control-type 1


# position command and feedback
net joint-0-pos-cmd <= joint.0.motor-pos-cmd
net joint-0-pos-cmd => pid.x.command

net joint-0-pos-fb <= hm2_[MESA](BOARD).0.stepgen.00.position-fb
net joint-0-pos-fb => joint.0.motor-pos-fb
net joint-0-pos-fb => pid.x.feedback

# PID Output
net joint.0.output <= pid.x.output
net joint.0.output => hm2_[MESA](BOARD).0.stepgen.00.velocity-cmd

# Axis: Y Joint: 1 Output: 1
# PID Setup
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
# limit stepgen velocity corrections caused by position feedback jitter
setp pid.y.maxerror [JOINT_1](MAX_ERROR)

# joint-1 enable chain
net joint-1-index-enable <=> pid.y.index-enable
net joint-1-index-enable <=> joint.1.index-enable

net joint-1-enable <= joint.1.amp-enable-out
net joint-1-enable => pid.y.enable

net joint-1-enable => hm2_[MESA](BOARD).0.stepgen.01.enable

# Joint 1 Step Generator Settings
setp hm2_[MESA](BOARD).0.stepgen.01.dirsetup [JOINT_1](DIRSETUP)
setp hm2_[MESA](BOARD).0.stepgen.01.dirhold [JOINT_1](DIRHOLD)
setp hm2_[MESA](BOARD).0.stepgen.01.steplen [JOINT_1](STEPLEN)
setp hm2_[MESA](BOARD).0.stepgen.01.stepspace [JOINT_1](STEPSPACE)
setp hm2_[MESA](BOARD).0.stepgen.01.position-scale [JOINT_1](SCALE)
setp hm2_[MESA](BOARD).0.stepgen.01.maxvel [JOINT_1](STEPGEN_MAX_VEL)
setp hm2_[MESA](BOARD).0.stepgen.01.maxaccel [JOINT_1](STEPGEN_MAX_ACC)
setp hm2_[MESA](BOARD).0.stepgen.01.step_type 0
setp hm2_[MESA](BOARD).0.stepgen.01.control-type 1


# position command and feedback
net joint-1-pos-cmd <= joint.1.motor-pos-cmd
net joint-1-pos-cmd => pid.y.command

net joint-1-pos-fb <= hm2_[MESA](BOARD).0.stepgen.01.position-fb
net joint-1-pos-fb => joint.1.motor-pos-fb
net joint-1-pos-fb => pid.y.feedback

# PID Output
net joint.1.output <= pid.y.output
net joint.1.output => hm2_[MESA](BOARD).0.stepgen.01.velocity-cmd

# Axis: Z Joint: 2 Output: 2
# PID Setup
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
# limit stepgen velocity corrections caused by position feedback jitter
setp pid.z.maxerror [JOINT_2](MAX_ERROR)

# joint-2 enable chain
net joint-2-index-enable <=> pid.z.index-enable
net joint-2-index-enable <=> joint.2.index-enable

net joint-2-enable <= joint.2.amp-enable-out
net joint-2-enable => pid.z.enable

net joint-2-enable => hm2_[MESA](BOARD).0.stepgen.02.enable

# Joint 2 Step Generator Settings
setp hm2_[MESA](BOARD).0.stepgen.02.dirsetup [JOINT_2](DIRSETUP)
setp hm2_[MESA](BOARD).0.stepgen.02.dirhold [JOINT_2](DIRHOLD)
setp hm2_[MESA](BOARD).0.stepgen.02.steplen [JOINT_2](STEPLEN)
setp hm2_[MESA](BOARD).0.stepgen.02.stepspace [JOINT_2](STEPSPACE)
setp hm2_[MESA](BOARD).0.stepgen.02.position-scale [JOINT_2](SCALE)
setp hm2_[MESA](BOARD).0.stepgen.02.maxvel [JOINT_2](STEPGEN_MAX_VEL)
setp hm2_[MESA](BOARD).0.stepgen.02.maxaccel [JOINT_2](STEPGEN_MAX_ACC)
setp hm2_[MESA](BOARD).0.stepgen.02.step_type 0
setp hm2_[MESA](BOARD).0.stepgen.02.control-type 1


# position command and feedback
net joint-2-pos-cmd <= joint.2.motor-pos-cmd
net joint-2-pos-cmd => pid.z.command

net joint-2-pos-fb <= hm2_[MESA](BOARD).0.stepgen.02.position-fb
net joint-2-pos-fb => joint.2.motor-pos-fb
net joint-2-pos-fb => pid.z.feedback

# PID Output
net joint.2.output <= pid.z.output
net joint.2.output => hm2_[MESA](BOARD).0.stepgen.02.velocity-cmd

# Manual Tool Change Dialog
loadusr -W hal_manualtoolchange
net tool-number hal_manualtoolchange.number <= iocontrol.0.tool-prep-number
net tool-change-request hal_manualtoolchange.change <= iocontrol.0.tool-change
net tool-change-confirmed iocontrol.0.tool-changed => hal_manualtoolchange.changed

# tool prep loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

#######################################################
# SPINDLE PWM - MESA 7i95T pwmgen.00
#######################################################

# Imposto la frequenza PWM hardware (valore tipico 10 kHz)
# Usa il parametro dall'INI [SPINDLE_0](PWM_FREQUENCY)
setp hm2_[MESA](BOARD).0.pwmgen.pwm_frequency [SPINDLE_0](PWM_FREQUENCY)

# pwmgen.00: PWM su Out0, direzione su Out1 (che puoi anche non usare)
setp hm2_[MESA](BOARD).0.pwmgen.00.output-type 1

# Scala: valore in ingresso = RPM, duty = RPM / SCALE
# Esempio: SCALE = 24000 => 24000 rpm = 100% duty
setp hm2_[MESA](BOARD).0.pwmgen.00.scale [SPINDLE_0](SCALE)

# --- Collegamento con il motion ---

# Abilitazione PWM: attivo quando lo spindle è "on" (M3/M4)
net spindle-enable motion.spindle-on => hm2_[MESA](BOARD).0.pwmgen.00.enable

# Comando velocità in RPM dal planner
net spindle-speed-cmd-rpm motion.spindle-speed-out => hm2_[MESA](BOARD).0.pwmgen.00.value


ini file
# This file was updated with the Mesa Configuration Tool on nov 15 2025 15:24:04
# Changes to most things are ok and will be read by the Configuration Tool

[MESA]
VERSION = 2.1.8
BOARD = 7i95
BOARD_NAME = 7i95t
FIRMWARE = 7i95t_1pwmd.bin
CARD_0 = None
CARD_1 = None

[EMC]
VERSION = 1.1
MACHINE = Mesa_7i95t
DEBUG = 0x00000000

[HM2]
DRIVER = hm2_eth
ADDRESS = 192.168.1.121

[DISPLAY]
DISPLAY = qtvcp qtdragon_hd
EDITOR = geany
PROGRAM_PREFIX = /home/linuxcnc/linuxcnc/nc_files
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = COMMANDED
MAX_FEED_OVERRIDE = 1.5
MIN_LINEAR_VELOCITY = 0.0
DEFAULT_LINEAR_VELOCITY = 1.5
MAX_LINEAR_VELOCITY = 80.0
INCREMENTS = 10mm , 5mm , 1mm , 0.5mm , 0.1mm , 0.05mm , 0.01mm
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""

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

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

[RS274NGC]
PARAMETER_FILE = parameters.var
SUBROUTINE_PATH = /home/linuxcnc/linuxcnc/subroutines

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

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 80.0
NO_FORCE_HOMING = 1
SPINDLES = 1

[HAL]
HALFILE = main.hal
HALFILE = io.hal

[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 295
MAX_VELOCITY = 80
MAX_ACCELERATION = 500

[JOINT_0]
CARD = 0
TAB = 0
AXIS = X
MIN_LIMIT = 0
MAX_LIMIT = 295
MAX_VELOCITY = 80
MAX_ACCELERATION = 500
TYPE = LINEAR
SCALE = 200
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 96.00
STEPGEN_MAX_ACC = 600.00
DIRSETUP = 3000
DIRHOLD = 3000
STEPLEN = 2000
STEPSPACE = 2000
ENCODER_SCALE =
FERROR = 0.01
MIN_FERROR = 0.005
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 30
HOME_LATCH_VEL = 3
HOME_FINAL_VEL = 6
HOME_SEQUENCE = 2

[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 195
MAX_VELOCITY = 80
MAX_ACCELERATION = 500

[JOINT_1]
CARD = 0
TAB = 1
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 195
MAX_VELOCITY = 80
MAX_ACCELERATION = 500
TYPE = LINEAR
SCALE = 200
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 96.00
STEPGEN_MAX_ACC = 600.00
DIRSETUP = 3000
DIRHOLD = 3000
STEPLEN = 2000
STEPSPACE = 2000
ENCODER_SCALE =
FERROR = 0.01
MIN_FERROR = 0.005
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 195
HOME_SEARCH_VEL = 30
HOME_LATCH_VEL = 3
HOME_FINAL_VEL = 6
HOME_SEQUENCE = 1

[AXIS_Z]
MIN_LIMIT = -135
MAX_LIMIT = 0
MAX_VELOCITY = 40
MAX_ACCELERATION = 500

[JOINT_2]
CARD = 0
TAB = 2
AXIS = Z
MIN_LIMIT = -135
MAX_LIMIT = 0
MAX_VELOCITY = 40
MAX_ACCELERATION = 500
TYPE = LINEAR
SCALE = 200
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 48.00
STEPGEN_MAX_ACC = 600.00
DIRSETUP = 3000
DIRHOLD = 3000
STEPLEN = 2000
STEPSPACE = 2000
ENCODER_SCALE =
FERROR = 0.01
MIN_FERROR = 0.005
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 30
HOME_LATCH_VEL = 3
HOME_FINAL_VEL = 6
HOME_SEQUENCE = 0

[INPUTS]
# DO NOT change the inputs they are used by the configuration tool
INPUT_0_0 = Joint 0 Home
INPUT_INVERT_0_0 = False
INPUT_SLOW_0_0 = False
INPUT_0_1 = Joint 1 Home
INPUT_INVERT_0_1 = False
INPUT_SLOW_0_1 = False
INPUT_0_2 = Joint 2 Home
INPUT_INVERT_0_2 = False
INPUT_SLOW_0_2 = False
INPUT_0_3 = E Stop 0
INPUT_INVERT_0_3 = False
INPUT_SLOW_0_3 = False
INPUT_0_4 = Probe Input
INPUT_INVERT_0_4 = False
INPUT_SLOW_0_4 = False

[OUTPUTS]
# DO NOT change the outputs they are used by the configuration tool
OUTPUT_0_1 = Spindle CW
OUTPUT_INVERT_0_1 = False
OUTPUT_0_2 = Coolant Flood
OUTPUT_INVERT_0_2 = False
OUTPUT_0_3 = E-Stop Out
OUTPUT_INVERT_0_3 = False

[OPTIONS]
# DO NOT change the options they are used by the configuration tool
LOAD_CONFIG = False
INTRO_GRAPHIC = emc2.gif
INTRO_GRAPHIC_TIME = 0
MANUAL_TOOL_CHANGE = True
CUSTOM_HAL = False
POST_GUI_HAL = False
SHUTDOWN_HAL = False
HALUI = False
PYVCP = False
GLADEVCP = False
LADDER = False
BACKUP = True


[SPINDLE_0]
# RPM corrispondenti al 100% di duty-cycle
SCALE = 24000

# Massimo RPM ammesso per G-code / GUI
MAX_RPM = 24000
MIN_RPM = 1000

# Frequenza del PWM hardware (Hz)
PWM_FREQUENCY = 2000
  • Ferra
  • Ferra
18 Nov 2025 00:47
Mesa 7i95t with pwm firmware was created by Ferra

Mesa 7i95t with pwm firmware

Category: Driver Boards

Hi everyone,
this is my first time using LinuxCNC and a Mesa board. I received my 7i95T a few days ago and have been running several tests since then.
I installed LinuxCNC 2.9.4 on an old desktop PC and everything runs smoothly. After that, I updated the system and installed the Mesa Configuration Tool, since I read that the 7i95T cannot be configured with the standard PNCconf wizard.I successfully connected to the board using the default IP address 192.168.1.121, and the PC communicates with it correctly.
Because I need a PWM output for my 0–10 V analog converter (my VFD does not support RS-485 unfortunately), I downloaded the appropriate firmware, flashed it to the board, and the update went fine.
After completing the basic configuration, I switched the GUI to qtDragon_hd for a better interface. LinuxCNC loads without errors, and I was able to test one axis (stepper + proximity sensor) without issues.Where I’m stuck: PWM generationReading the HMIDs, I can see that the last stepgen has been replaced by a PWM generator, but I’m not understanding how to properly use this PWM output.Here’s what I tried:
  • I connected the PWM signal to pin 9 on the 7i95T header.
  • I left the DIR pin disconnected for now because I only need the spindle to run clockwise.
  • I connected my 0–10 V PWM-to-analog converter, but no voltage output appears.
  • I also tried checking the signal using an oscilloscope, but I get no PWM activity at all.
So at this point I’m not sure whether:
  1. I misconfigured the PWM generator in LinuxCNC/HAL,
  2. I am misunderstanding how the PWM output on the 7i95T is supposed to work.
Additionally, I need to set the PWM frequency to 2 kHz (my converter requires ≤2 kHz), but I don’t know where to configure that correctly.

Also, I would also like to use my MPG wheel.
My idea is:
  • connect the MPG encoder to the left-side encoder input (ENC0),
  • connect the MPG pushbuttons and the selector to the input pins on the right side, according to the Mesa Config Tool assignments.
Can someone confirm whether this wiring plan is correct?
Thanks a lot to everyone in advance! :)
  • ihavenofish
  • ihavenofish
14 Nov 2025 19:09

lemontart - a call for help with s curve, ui's, and all the cool toys

Category: General LinuxCNC Questions

yeah. i perhaps worded this badly.

There's 2 components. getting the basic UI all done up, and then what I guess is a really a wizard, with some preset options for recommended hardware such as jss (stepperonline) drives, delta ms300 spindle, etc

Basically I was a more full features wizard that covers modbus and ethercat. haha.

Thanks
  • Hakan
  • Hakan
13 Nov 2025 17:27
Replied by Hakan on topic AX58100

AX58100

Category: EtherCAT

I would start looking at
- encoders. With the current stm32f407 the quadrature counters are tied to certain pins, and max 4 such hardware counters. Code is in E3000, would copy that.
- EtherCAT chip, would base it on LAN9252 (which most of the cards use) due to Ax58100 limit of 2x16 pdos. Don't know of a limit for LAN9252, it's not less than 2x16. 
- Opto-couplers, would revisit.

If you are thinking of stepper generator with encoder inputs, say for four of them, would base it on E3000 for the user code and extend to four encoders, code is already there. soes library from E7000. Hardware will be based on E3000 around stm32, around E7000 for EtherCAT.

One can think of one card supporting 1 drive. Or 2 stepper drives. And use multiple cards

In linuxcnc 2.10 there is 64-bit integers, so no risk for encoders overflowing. 32-bit isn't quite enough at least for spindles.

Is it just an idea, or are you going to do it?
.
  • TurboStreetCar
  • TurboStreetCar
11 Nov 2025 14:48
Determining Rate Of Accelleration was created by TurboStreetCar

Determining Rate Of Accelleration

Category: General LinuxCNC Questions

Hello, i have a project im working on (Not a CNC machine, but i believe a Mesa card is good capable hardware for this application) where im trying to determine the rate of acceleration of an externally driven spindle using an encoder. 

There doesn't seem to be any built in components for this that i can find.

The use case, is to feed the rate of acceleration into a PID loop to control the output of a stepper/servo that regulates the spindles speed.

Is there a relatively easy way to measure/determine rate of acceleration accurately?
  • Hakan
  • Hakan
31 Oct 2025 11:06

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Sounds good. Let's hope it keeps that way.

I ran the RPi4 for some time and it was ok, so the Rpi5 should be ok too?
Latency isn't so much of an issue now with the "-" sign.
That "should" keep it on track (sync).
You can check if it isn't doing so great with the value of the pin lcec.0.pll-reset-count
If that is way above 1 there may be a problem.
First thing to do then is to increase lcec.0.pll-step to 10000 which is max, or something in between say 5000,
setp lcec.0.pll-step 10000
If pll-reset-count then keeps increasing you need to work on the latency.

The main reason I switched to Intel-based is that the gui became more and more
sophisticated and needed more and more processing power to function smoothly.
I am hesitant to recommend a setup, there are many that works fine.
For ethercat I would definitely look for an Intel network adapter,
the rest is more form factor, power draw, cpu performance.
I have had good luck with the N100/N150 mini pcs. Intel network adapter though.
  • Will_cnc
  • Will_cnc
31 Oct 2025 10:05
Replied by Will_cnc on topic Stepper online A6 Servo motor as Spindle motor

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Having tested the machine this morning , the Juddering on the servo drives appears too of stopped for the time being?

Could it be due to the pi not being powerful enough and having bad latency? Yesterday I had a few windows open running whilst running linux .

If this is the issue is it worth upgrading from the pi5 to something with more powerful ? .
Any suggestions on reasonable priced upgrade options
  • Hakan
  • Hakan
31 Oct 2025 09:19

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Looks fine so far.
Can you start linuxcnc to see if any useful message comes out to explain jerkiness.
You can also try to temporarily remove/comment out the dcconf line for the spindle driver only in the ethercat.conf.
  • Will_cnc
  • Will_cnc
31 Oct 2025 09:14
Replied by Will_cnc on topic Stepper online A6 Servo motor as Spindle motor

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

here is the result of running sudo dmesg


[ 4.057274] Bluetooth: HCI UART protocol Broadcom registered
[ 4.083683] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 4.087327] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 4.087734] usbcore: registered new interface driver brcmfmac
[ 4.291603] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2)
[ 4.291861] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2
[ 4.393502] Bluetooth: hci0: BCM: chip id 107
[ 4.393719] Bluetooth: hci0: BCM: features 0x2f
[ 4.394870] Bluetooth: hci0: BCM4345C0
[ 4.394873] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[ 4.426812] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
[ 4.462459] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL)
[ 4.462471] macb 1f00100000.ethernet eth0: configuring for phy/rgmii-id link mode
[ 4.469213] pps pps0: new PPS source ptp0
[ 4.469263] macb 1f00100000.ethernet: gem-ptp-timer ptp clock registered.
[ 4.470153] warning: `iwconfig' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
[ 4.470300] ec_master: loading out-of-tree module taints kernel.
[ 4.470306] ec_master: module verification failed: signature and/or required key missing - tainting kernel
[ 4.475936] EtherCAT: Master driver 1.6.8 1.6.8.g2543cc5-1+27.1
[ 4.476617] EtherCAT: 1 master waiting for devices.
[ 4.490862] zram: Added device: zram0
[ 4.628070] ec_generic: EtherCAT master generic Ethernet device module 1.6.8 1.6.8.g2543cc5-1+27.1
[ 4.628086] EtherCAT: Accepting 2C:CF:67:24:E6:CD as main device for master 0.
[ 4.628096] ec_generic: Binding socket to interface 2 (eth0).
[ 4.645137] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 4.747291] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 4.747296] Bluetooth: BNEP filters: protocol multicast
[ 4.747300] Bluetooth: BNEP socket layer initialized
[ 4.752789] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[ 5.129671] Bluetooth: hci0: BCM: features 0x2f
[ 5.131033] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 5.131037] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
[ 5.131328] Bluetooth: hci0: BCM: Using default device address (43:45:c0:00:1f:ac)
[ 5.150144] Bluetooth: MGMT ver 1.23
[ 5.155700] NET: Registered PF_ALG protocol family
[ 6.530993] macb 1f00100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 6.537016] EtherCAT 0: Link state of ecm0 changed to UP.
[ 6.545022] EtherCAT 0: 4 slave(s) responding on main device. Re-scanning on next possibility.
[ 6.545024] EtherCAT 0: Slave states on main device: PREOP.
[ 6.545025] EtherCAT 0: Re-scanning now.
[ 6.545194] EtherCAT 0: Scanning bus.
[ 7.356283] EtherCAT 0: Bus scanning completed in 808 ms.
[ 7.356289] EtherCAT 0: Using slave 0 as DC reference clock.
  • Hakan
  • Hakan
31 Oct 2025 05:37

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Here it looks fine. Saw it in the first ethercat-conf.xml you attached.

There is no reason the PV mode should cause problems with other drives.
Check the output of "sudo dmesg" the last say 20 lines are of interest.
  • Will_cnc
  • Will_cnc
30 Oct 2025 21:46
Replied by Will_cnc on topic Stepper online A6 Servo motor as Spindle motor

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

would you be able to point to where the issue is in the .xml file ?


<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="-5">

<!-- X axis EL8 Servo Drive -->
<slave idx="0" type="generic" vid="00004321" pid="0000d0" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1601">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>

<!-- Y0 axis EL8 Servo Drive -->
<slave idx="1" type="generic" vid="00004321" pid="0000d0" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1601">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>

<!-- Z axis EL8 Servo Drive -->
<slave idx="2" type="generic" vid="00004321" pid="000010c2" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1601">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>

<!-- Spindle Servo Drive -->
<slave idx="3" name="Spindle" type="generic" vid="00400000" pid="00000715" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>
<pdoEntry idx="6083" subIdx="00" bitLen="32" halPin="acceleration" halType="s32"/>
<pdoEntry idx="6084" subIdx="00" bitLen="32" halPin="deceleration" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="32" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>

</master>
</masters>
  • Hakan
  • Hakan
30 Oct 2025 21:26

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

And btw there may be an error in your ethercat-conf.xml file. Two slave lines for idx=3.
 
  • Hakan
  • Hakan
30 Oct 2025 21:18

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Phuu, I have no idea why it didn't work right away. I am happy that some patience paid off.

You have some settings in the example hal file
setp cia402pv.Spindle.velo-scale 2000
setp cia402pv.Spindle.acceleration 100
setp cia402pv.Spindle.deceleration 100
setp cia402pv.Spindle.quickstop-acceleration 300
quickstop isn't used (yet), but the other values you need to adapt to your liking.
velo-scale is how many steps there are per revolution. It is probably the encoder resolution for you.
Gearing goes into that number as well.
That number also affects the velocity feedback.
Accelerations are revs/s^2. Easiest is maybe to use halshow and set different values while testing start and stop.
 
Displaying 1 - 15 out of 156 results.
Time to create page: 0.448 seconds
Powered by Kunena Forum