Advanced Search

Search Results (Searched for: stepper spindle)

  • 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.
 
  • Will_cnc
  • Will_cnc
30 Oct 2025 20:33
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

Big thanks for your help Hakan

I have retyped a few of the lines in  the Hal file and 

LINUX NOW OPENS AND THE SPINDLE RUNS !!! 

Next issues to solve 
Correct spindle speed ratio
When assigning the spindle to run at a certain speed the scaling is definitely off and is very slow . 
the belt setup is 2:1 how do I configure to this ? 

The spindle also does display that actual speed via the encoder signal any tips on how to change this ? 

Main issue: 
In getting the spindle to run it has caused the rest of the machine to jitter and run what seems like out of sync again 
changing the following " refClockSyncCycles="-5">" fixed the issue last time 
what else could now be causing the issue ? 
Many thanks 
Will 
  • Hakan
  • Hakan
30 Oct 2025 20:16

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

That looks perfectly fine.
 What's the problem when this is called inside your hal file?
Let's try that. Add the line
show all
after the
loadrt cia402pv names=cia402pv.Spindle
line. It should show many more pins, also the cia402pv pins.
  • Will_cnc
  • Will_cnc
30 Oct 2025 19:38
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

cnc@raspberrypi:~$ % halrun
halcmd: loadrt cia402pv names=cia402pv.Spindle
Note: Using POSIX realtime
halcmd: show all
bash: fg: %: no such job
bash: halcmd:: command not found
bash: Note:: command not found
bash: halcmd:: command not found
cnc@raspberrypi:~$ halrun
halcmd: loadrt cia402pv names=cia402pv.Spindle
Note: Using POSIX realtime
halcmd: show all
Loaded HAL Components:
ID Type Name PID State
4 RT cia402pv ready
2 User halcmd2602 2602 ready

Component Pins:
Owner Type Dir Value Name
4 float IN 0 cia402pv.Spindle.acceleration
4 u32 OUT 0x00000000 cia402pv.Spindle.controlword
4 float IN 0 cia402pv.Spindle.deceleration
4 s32 OUT 0 cia402pv.Spindle.drv-acceleration
4 s32 IN 0 cia402pv.Spindle.drv-actual-position
4 s32 IN 0 cia402pv.Spindle.drv-actual-velocity
4 s32 OUT 0 cia402pv.Spindle.drv-deceleration
4 bit OUT FALSE cia402pv.Spindle.drv-fault
4 s32 OUT 0 cia402pv.Spindle.drv-quickstop-deceleration
4 s32 OUT 0 cia402pv.Spindle.drv-target-position
4 s32 OUT 0 cia402pv.Spindle.drv-target-velocity
4 bit IN FALSE cia402pv.Spindle.enable
4 bit IN FALSE cia402pv.Spindle.fault-reset
4 bit I/O FALSE cia402pv.Spindle.home
4 s32 OUT 0 cia402pv.Spindle.opmode
4 bit OUT FALSE cia402pv.Spindle.opmode-cyclic-position
4 bit OUT FALSE cia402pv.Spindle.opmode-cyclic-velocity
4 s32 IN 0 cia402pv.Spindle.opmode-display
4 bit OUT FALSE cia402pv.Spindle.opmode-homing
4 bit OUT FALSE cia402pv.Spindle.opmode-no-mode
4 bit OUT FALSE cia402pv.Spindle.opmode-profile-velocity
4 float IN 0 cia402pv.Spindle.pos-cmd
4 float OUT 0 cia402pv.Spindle.pos-fb
4 float IN 0 cia402pv.Spindle.quickstop-acceleration
4 s32 OUT 0 cia402pv.Spindle.read-all.time
4 bit IN FALSE cia402pv.Spindle.run
4 bit OUT FALSE cia402pv.Spindle.stat-at-speed
4 bit OUT FALSE cia402pv.Spindle.stat-fault
4 bit OUT FALSE cia402pv.Spindle.stat-homed
4 bit OUT FALSE cia402pv.Spindle.stat-homing
4 bit OUT FALSE cia402pv.Spindle.stat-op-enabled
4 bit OUT FALSE cia402pv.Spindle.stat-quick-stop
4 bit OUT FALSE cia402pv.Spindle.stat-quick-stop-valid
4 bit OUT FALSE cia402pv.Spindle.stat-remote
4 bit OUT FALSE cia402pv.Spindle.stat-switched-on
4 bit OUT FALSE cia402pv.Spindle.stat-switchon-disabled
4 bit OUT FALSE cia402pv.Spindle.stat-switchon-ready
4 bit OUT FALSE cia402pv.Spindle.stat-target-reached
4 bit OUT FALSE cia402pv.Spindle.stat-voltage-enabled
4 bit OUT FALSE cia402pv.Spindle.stat-warning
4 bit OUT FALSE cia402pv.Spindle.stat-zero-speed
4 u32 IN 0x00000000 cia402pv.Spindle.statusword
4 float IN 0 cia402pv.Spindle.velocity-cmd
4 float OUT 0 cia402pv.Spindle.velocity-fb
4 s32 OUT 0 cia402pv.Spindle.write-all.time

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name
4 bit RW TRUE cia402pv.Spindle.auto-fault-reset
4 bit RW TRUE cia402pv.Spindle.csp-mode
4 float RW 1 cia402pv.Spindle.pos-scale
4 bit RW FALSE cia402pv.Spindle.pv-mode
4 s32 RW 0 cia402pv.Spindle.read-all.tmax
4 bit RO FALSE cia402pv.Spindle.read-all.tmax-increased
4 float RW 1 cia402pv.Spindle.velo-scale
4 s32 RW 0 cia402pv.Spindle.write-all.tmax
4 bit RO FALSE cia402pv.Spindle.write-all.tmax-increased

Parameter Aliases:
Alias Original Name

Exported Functions:
Owner CodeAddr Arg FP Users Name
00004 7fff005c2a20 7fff005f0120 YES 0 cia402pv.Spindle.read-all
00004 7fff005c1e04 7fff005f0120 YES 0 cia402pv.Spindle.write-all

Realtime Threads:
Period FP Name ( Time, Max-Time )

halcmd: Note: Using POSIX realtime
cnc@raspberrypi:~$
  • Hakan
  • Hakan
30 Oct 2025 19:20

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

It's like cia402pv isn't loaded.
Try a new thing. The halrun utility, load the cia402pv component manually.
% halrun 
halcmd: loadrt cia402pv names=cia402pv.Spindle
Note: Using POSIX realtime
halcmd: show all
This hopefully should work and produce a long list of pins and functions.
  • Will_cnc
  • Will_cnc
30 Oct 2025 18:23
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

I have changed the loadrt line slightly  and receive a different error ? 


RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.6
Machine configuration directory is '/home/cnc/linuxcnc/configs/probe_basic_dev'
Machine configuration file is 'EL8_machine.ini'
INIFILE=/home/cnc/linuxcnc/configs/probe_basic_dev/EL8_machine.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=el8_homecomp
TASK=milltask
HALUI=halui
DISPLAY=probe_basic
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=el8_homecomp EMCMOT=motmod
Found file(REL): ./hallib/EL8_machine.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
HAL: ERROR: function 'cia402pv.Spindle.read-all' not found
./hallib/EL8_machine.hal:18: addf failed
2975
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
 
  • Hakan
  • Hakan
30 Oct 2025 15:10

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

But there must be a reason that linuxcnc won't find it.
It looks okay in your files.
Response is exactly like it is commented out.
I tested to comment out the loadrt line and got exactly this
Found file(REL): ./cia402pv.hal
HAL: ERROR: function 'cia402pv.Spindle.read-all' not found
./cia402pv.hal:27: addf failed
I also tested to mis-spell cia402pv.Spindl in the loadrt line and got the same error.
Also mis-spelling on the addf line give the same error.
There is some mis-spelling between the loadrt and the addf lines
but I don't see what it is.

From the output messages this is the hal file linuxcnc uses
./hallib/EL8_machine.hal
That's the one you showed, right?

I don't know. Can you retype those two lines?
  • Will_cnc
  • Will_cnc
30 Oct 2025 13:26
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

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
#loadusr -W hal_manualtoolchange
loadrt cia402 count=4
#loadrt mult2
#loadrt mult2 count=4 etc for multiple instances
loadrt cia402pv names=cia402pv.Spindle
Displaying 1 - 15 out of 158 results.
Time to create page: 1.533 seconds
Powered by Kunena Forum