Advanced Search

Search Results (Searched for: stepper spindle)

  • Will_cnc
  • Will_cnc
Yesterday 13:22
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

Doesn't appear to be commented out in the Hal file ?
  • Hakan
  • Hakan
Yesterday 12:58

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Hmm, did you by any chance comment out the loadrt cia402pv line?
  • Will_cnc
  • Will_cnc
Yesterday 12:30
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

Print file information:
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
2439
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime


 
  • Will_cnc
  • Will_cnc
Yesterday 12:25
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

Hi Hakan
Thanks for the help I have configured to the directory now, but have a new error message ?
  • Hakan
  • Hakan
Yesterday 12:04

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Be in the directory were you have downloaded cia402pv.comp
and there do "sudo halcompile --install cia402pv.comp"

Easy to spot with the error messages, that helps a lot.
  • Will_cnc
  • Will_cnc
Yesterday 11:01
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

Print file information:
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
cia402pv: dlopen: /usr/lib/linuxcnc/modules/cia402pv.so: cannot open shared object file: No such file or directory
./hallib/EL8_machine.hal:9: waitpid failed /usr/bin/rtapi_app cia402pv
./hallib/EL8_machine.hal:9: /usr/bin/rtapi_app exited without becoming ready
./hallib/EL8_machine.hal:9: insmod for cia402pv failed, returned -1
2207
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
  • Will_cnc
  • Will_cnc
Yesterday 11:00
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

sudo halcompile --install cia402pv.comp

cnc@raspberrypi:~$ sudo halcompile --install cia402pv.comp
Traceback (most recent call last):
File "/usr/bin/halcompile", line 1553, in <module>
main()
File "/usr/bin/halcompile", line 1523, in main
process(f, mode, outfile)
File "/usr/bin/halcompile", line 1363, in process
a, b = parse(filename)
^^^^^^^^^^^^^^^
File "/usr/bin/halcompile", line 434, in parse
f = open(filename).read()
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'cia402pv.comp'
  • Hakan
  • Hakan
Yesterday 10:45

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Very difficult to say, you give me no clues.
You have to show the error messages from linuxcnc startup, that is the biggest help.
I kind of think you have not installed the component?
"sudo halcompile --install cia402pv.comp"
should put the component in the right place.
Anyway, I have to see the errors you get. A general description is not enough.
  • Will_cnc
  • Will_cnc
Yesterday 10:40
  • Will_cnc
  • Will_cnc
Yesterday 10:38 - Yesterday 10:41
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

Hi Hakan thanks for your help  to configure the drive. 
Unfortunately I am having no luck in getting it to work. 
I have attached my files below do you mind having a look to see if there is anything obvious I am missing?  
I am very new to linux so am struggling to work out when using the loadrt command in the .hal file  where the other  file is loading from? 

Thanks Will 


 
  • richcolvin
  • richcolvin's Avatar
28 Oct 2025 02:05
Replied by richcolvin on topic M19 for Indexing a Spindle using Stepper Motors

M19 for Indexing a Spindle using Stepper Motors

Category: General LinuxCNC Questions

Jean Philippe,

Thank you for sharing these. I greatly appreciate your generosity.

Am I correct I. My thinking that the magic for this is in the spindle.hal file?

Rich
  • Hakan
  • Hakan
26 Oct 2025 16:26

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

Here is now a modified cia402 component together with a complete example on how to use PV (Profile Velcotiy) for an EtherCAT spindle drive.

github.com/MetalMusings/cia402pv
 
  • Hakan
  • Hakan
26 Oct 2025 11:46 - 26 Oct 2025 11:47

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

I *could* put my stepper drivers in PV mode. So I am making a modification to the cia402 component to (hopefully) make a stepper motor work as a spindle (how useful). Servo drives also. 
Check back in few hours. 
 
  • Chad
  • Chad
26 Oct 2025 10:12

Remora SPI: Bad SPI payload, estop won’t reset, SKR 1.4 + RPi4 – config below

Category: Computers and Hardware

Hi,
I’m trying to get Remora to work with a Raspberry Pi 4 Compute Module (on the official IO board) and a BTT SKR 1.4 (LPC1768) board via SPI (using EXP2 directly).No matter what I do, I keep getting “bad spi payload” errors and I can’t reset estop in LinuxCNC. The estop status toggles randomly, sometimes reporting errors like “fffff”, “3a”, “71”, then “0”, but it never clears or lets me enable the machine.Here’s what I’ve already tried:
  • Double/triple-checked config files (.hal/.ini/config.txt) for base/servo thread values and SPI freq
  • Tried SPI_FREQ values from 40000 down to 2500
  • Used multiple different SD cards, freshly copied firmware/config.txt every time
  • Swapped and powered from two different power supplies, always with common ground
  • Used short (10–20 cm) jumper wires and a dedicated IDC ribbon cable between RPi CM4 IO board and SKR (connected to SPI0 CS0)
  • Confirmed CS line matches config and wiring
  • Tried wiring both loosened and via the screw-terminal “HAT”
  • Tested with two different RPi modules
  • Flashed the correct Remora firmware for LPC1768, config.txt matches hardware
Symptoms – what I see:
  • LinuxCNC starts, RPi and SKR both power up
  • E-stop never disengages, status bits change randomly
  • Console/log shows many “bad spi payload” errors, with hex codes changing each time
  • Stepper drivers do not respond, SPI module loads but does not work
My setup:
  • Raspberry Pi 4 Compute Module on official IO board
  • BTT SKR 1.4 (LPC1768) with Remora firmware
  • Connecting via SPI (EXP2 header), CS0
  • Cables all short, tried IDC and normal dupont/jumper types
Questions:
  • Is there anything obvious I’m missing in configs or wiring?
  • Has anyone had this persist even with good IDC cable and CM4?
  • Any proven working “plug-and-play” cable or adapter for this combo?
  • Are there common hardware quirks or firmware issues with this setup?
  • Would using a logic analyzer or scope help, and what to look for?
I’m attaching my 
.hal
.ini
 and 
config.txt
 files plus a photo of my wiring. Any advice, example configs, or troubleshooting steps would be greatly appreciated!

.hal file:
# Load the realtime components loadrt [KINS]KINEMATICS loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadrt remora-spi SPI num=0 CS_num=0 SPI [remora]SPI_FREQ=20000 # estop loopback, SPI comms enable and feedback net user-enable-out <= iocontrol.0.user-enable-out => remora.SPI.enable net user-request-enable <= iocontrol.0.user-request-enable => remora.SPI-reset net remora-status <= remora.SPI-status => iocontrol.0.emc-enable-in # add the remora and motion functions to threads addf remora.read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf remora.update-req servo-thread addf remora.write servo-thread # Joint 0 setup setp remora.joint.0.scale [JOINT_0]SCALE setp remora.joint.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL net x:pos-cmd <= joint.0.motor-pos-cmd => remora.joint.0.pos-cmd net x:pos-fb <= remora.joint.0.pos-fb => joint.0.pos-fb net x:enable <= joint.0.amp-enable-out => remora.joint.0.enable # Joint 1 setup setp remora.joint.1.scale [JOINT_1]SCALE setp remora.joint.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL net y:pos-cmd <= joint.1.motor-pos-cmd => remora.joint.1.pos-cmd net y:pos-fb <= remora.joint.1.pos-fb => joint.1.pos-fb net y:enable <= joint.1.amp-enable-out => remora.joint.1.enable # Joint 2 setup setp remora.joint.2.scale [JOINT_2]SCALE setp remora.joint.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL net z:pos-cmd <= joint.2.motor-pos-cmd => remora.joint.2.pos-cmd net z:pos-fb <= remora.joint.2.pos-fb => joint.2.pos-fb net z:enable <= joint.2.amp-enable-out => remora.joint.2.enable

.ini file:
# Basic LinuxCNC config for testing of Remora firmware [EMC] MACHINE = Remora-XYZ DEBUG = 0 VERSION = 1.1 [DISPLAY] DISPLAY = axis EDITOR = gedit POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL ARCDIVISION = 64 GRIDS = 10mm 20mm 50mm 100mm MAX_FEED_OVERRIDE = 1.2 MIN_SPINDLE_OVERRIDE = 0.5 MAX_SPINDLE_OVERRIDE = 1.2 DEFAULT_LINEAR_VELOCITY = 50.00 MIN_LINEAR_VELOCITY = 0.00 MAX_LINEAR_VELOCITY = 200.00 DEFAULT_ANGULAR_VELOCITY = 36.00 MAX_ANGULAR_VELOCITY = 45.00 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 5 PROGRAM_PREFIX = ~/linuxcnc/nc_files INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm [KINS] JOINTS = 3 #KINEMATICS =trivkins coordinates=XYZ kinstype=BOTH KINEMATICS = trivkins coordinates=XYZ [FILTER] PROGRAM_EXTENSION = .py Python Script py = python [TASK] TASK = milltask CYCLE_TIME = 0.010 [RS274NGC] PARAMETER_FILE = linuxcnc.var [EMCMOT] EMCMOT = motmod COMM_TIMEOUT = 1.0 COMM_WAIT = 0.010 BASE_PERIOD = 25000 SERVO_PERIOD = 1000000 [HAL] HALFILE = remora-xyz.hal POSTGUI_HALFILE = postgui_call_list.hal [TRAJ] COORDINATES = X Y Z LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_LINEAR_VELOCITY = 50.00 MAX_LINEAR_VELOCITY = 200.00 NO_FORCE_HOMING = 1 [EMCIO] EMCIO = io CYCLE_TIME = 1.00 TOOL_TABLE = tool.tbl [AXIS_X] MAX_VELOCITY = 250 MAX_ACCELERATION = 750.0 MIN_LIMIT = -5.0 MAX_LIMIT = 300.0 [JOINT_0] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -5.0 MAX_LIMIT = 300.0 MAX_VELOCITY = 250.0 MAX_ACCELERATION = 750.0 STEPGEN_MAXACCEL = 2000.0 SCALE = 80.0 FERROR = 2 MIN_FERROR = 2.0 HOME_OFFSET = 2.0 HOME_SEARCH_VEL = 0 HOME_LATCH_VEL = 0 HOME_SEQUENCE = 0 [AXIS_Y] MAX_VELOCITY = 250.0 MAX_ACCELERATION = 750.0 MIN_LIMIT = -0.01 MAX_LIMIT = 300.0 [JOINT_1] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -5.0 MAX_LIMIT = 300.0 MAX_VELOCITY = 250.0 MAX_ACCELERATION = 750.0 STEPGEN_MAXACCEL = 2000.0 SCALE = 80.0 FERROR = 5 MIN_FERROR = 5.0 HOME_OFFSET = 0.0 HOME_SEARCH_VEL = 0 HOME_LATCH_VEL = 0 HOME_SEQUENCE = 0 [AXIS_Z] OFFSET_AV_RATIO = 0.2 MAX_VELOCITY = 5.0 MAX_ACCELERATION = 200.0 MIN_LIMIT = -280 MAX_LIMIT = 280 [JOINT_2] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -280 MAX_LIMIT = 280 MAX_VELOCITY = 5.0 MAX_ACCELERATION = 200.0 STEPGEN_MAXACCEL = 3000.0 SCALE = 400.0 FERROR = 5 MIN_FERROR = 1.0 HOME_OFFSET = 0.0 HOME_SEARCH_VEL = 0 HOME_LATCH_VEL = 0 HOME_SEQUENCE = 0

config.txt:
{
  "Board": "BIGTREETECH SKR v1.3 & v1.4",
  "Threads": [
    { "Thread": "Base", "Frequency": 40000 },
    { "Thread": "Servo", "Frequency": 1000 }
  ],
  "Modules": [
    {
      "Thread": "Servo",
      "Type": "Reset Pin",
      "Comment": "Reset pin",
      "Pin": "1.31"
    },
    {
      "Thread": "Base",
      "Type": "SPI",
      "Comment": "SPI interface to Raspberry Pi",
      "CS Pin": "0.16"
    },
    {
      "Thread": "Base",
      "Type": "Stepgen",
      "Comment": "X - Joint 0 step generator",
      "Joint Number": 0,
      "Step Pin": "2.2",
      "Direction Pin": "2.6",
      "Enable Pin": "2.1"
    },
    {
      "Thread": "Base",
      "Type": "Stepgen",
      "Comment": "Y - Joint 1 step generator",
      "Joint Number": 1,
      "Step Pin": "0.19",
      "Direction Pin": "0.20",
      "Enable Pin": "2.8"
    },
    {
      "Thread": "Base",
      "Type": "Stepgen",
      "Comment": "Z - Joint 2 step generator",
      "Joint Number": 2,
      "Step Pin": "0.22",
      "Direction Pin": "2.11",
      "Enable Pin": "0.21"
    }
  ]
}
  • Hakan
  • Hakan
25 Oct 2025 16:35

Stepper online A6 Servo motor as Spindle motor

Category: General LinuxCNC Questions

What have you tried? Which Leadshine drive model?
I am going to propose to use PV mode. It is similar to a vfd.
You just give a speed and the driver ramps up and down as needed.
I have not tried it myself, and I don't have a driver to try it so it is up to you.
I foresee that the cia402 component needs modification, it only handles csp and csv.
Displaying 16 - 30 out of 158 results.
Time to create page: 0.582 seconds
Powered by Kunena Forum