Advanced Search

Search Results (Searched for: stepper spindle)

  • konrad
  • konrad
31 Mar 2025 14:54
config all good on mesa 7i96s? was created by konrad

config all good on mesa 7i96s?

Category: General LinuxCNC Questions

Hello everyone,I've recently converted a second hand CNC router from Mach3 with ESS to LinuxCNC with a Mesa 7i96s board. I've used PNCconf to generate my initial configuration, but I'd appreciate if someone could review my settings and let me know if everything looks okay.Machine Specs:
  • X460, Y750mm, Z300   
  • 20mm linear rails
  • 10mm pitch ballscrews, 20mm diameter
  • Construction: aluminum profiles bolted to 12mm steel plates, welded gantry sides
  • Motors: Y-axis 6.8Nm stepper, Z + X-axis 3Nm stepper
  • Drives: DM556 V1 48v
  • Spindle: 24K RPM 2.2kW ER20
  • inductive endstops 
  • good latency values mostly sub 3000ns servo
PNCconf Settings:
  • Step On-Time: 5000 nanoseconds
  • Maximum Velocity: 3000 mm/min
  • Maximum Acceleration: 400 mm/sec²
Key Config Values from INI File:
  • X travel: -2.0mm to 460.0mm (STEP_SCALE = -200.0)
  • Y travel: -2.0mm to 750.0mm (STEP_SCALE = 200.0)
  • Z travel: -300.0mm to 0.01mm (STEP_SCALE = -400.0)
  • Step timing: DIRSETUP/DIRHOLD = 10000ns, STEPLEN/STEPSPACE = 5000ns
Questions:
  1. I see a
    z-neg-limit
    signal in my HAL file that doesn't seem to be connected to anything - is this a problem?
  2. Are my velocity and acceleration values reasonable for this type of machine?
  3. Any other issues or recommendations before I start cutting?

changes/upgrades
As I am already in the process of messing with the machine, would you recommend any meaningful upgrades or changes to it? I will mostly mill soft materials like wood but also want to try aluminium. 
  1. should I change the microstepping ( it is 10x at the moment)
  2. other stepper motor or drivers?
  3. switch to s curve compact fork?
I've attached HAL and INI files below for reference. Thanks in advance for any advice!

 
  • Routerworks
  • Routerworks
28 Mar 2025 14:23
Replied by Routerworks on topic Need help setting up XYYZA for stepper motors

Need help setting up XYYZA for stepper motors

Category: General LinuxCNC Questions

Many thanks to both.  Good catch 16, 17 not 016, 017.  That eliminated that problem then it said pin 16 was already in use.  I ommitted the "spindle out pin 16 and 17" then it worked.  
4th Axis Mill opened up.
Can't find control for the A axis and some of the other directional keys have been switched around.  Where would I correct them.
Mandy, Many, Many thanks,

Routerworks
  • PCW
  • PCW's Avatar
27 Mar 2025 18:12 - 27 Mar 2025 18:21

Need help setting up XYYZA for stepper motors

Category: General LinuxCNC Questions

setp stepgen.4.position-scale [JOINT_4]SCALE
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 40000
setp stepgen.4.dirsetup 40000
setp stepgen.4.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net zpos-cmd joint.4.motor-pos-cmd => stepgen.4.position-cmd
net zpos-fb stepgen.4.position-fb => joint.4.motor-pos-fb
net zstep <= stepgen.4.step
net zdir <= stepgen.4.dir
net zenable joint.3.amp-enable-out => stepgen.4.enable

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

The red text probably should be:
setp stepgen.4.maxaccel [JOINT_4]STEPGEN_MAXACCEL
net apos-cmd joint.4.motor-pos-cmd => stepgen.4.position-cmd
net apos-fb stepgen.4.position-fb => joint.4.motor-pos-fb
net astep <= stepgen.4.step
net adir <= stepgen.4.dir
net aenable joint.4.amp-enable-out => stepgen.4.enable

Note that you also need to connect the astep and adir signals to the appropriate
parallel port pins similar to this (z highlighted ):

setp parport.0.pin-01-out-invert 1
net estop-out => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net y0step => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net y0dir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out

net y1step => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net y1dir => parport.0.pin-09-out
net spindle-cw => parport.0.pin-14-out
net spindle-pwm => parport.0.pin-16-out
net xenable => parport.0.pin-17-out
 
  • aharner
  • aharner
24 Mar 2025 20:43

Connecting Mesa 7i76 to Sprint 1200 DC Controller

Category: General LinuxCNC Questions

Good evening.  I am not sure if this is the right area to ask this question, but here goes.  I am converting a Novaturn lathe that has a Sprint 1200 (400) DC motor controller and I am using a Mesa 7i76U to handle the connections.  I have the steppers moving properly, the e stop and limits working properly but am very apprehensive about connecting to the Sprint 1200 because I dont want to damage anything.  Anyway, after days of reading, testing, and more reading I am finally reaching out for help.  Does anyone know the correct wiring to connect the 7i76 (TB4) spindle connectors to the appropriate Sprint connectors?  I need to be able to turn the motor on, adjust speed, etc.  The motor does not reverse.  The contacts on the Sprint are (1) +10, (2) MIN, (3) I/P, 4 COM, (5) RUN, (6) TACH, (7) COM.  Any guidance would be appreciated.
  • gm001
  • gm001
21 Mar 2025 05:21
Hardware advice was created by gm001

Hardware advice

Category: Computers and Hardware

Hi everyone,
I'm hoping that someone can help me get my head wrapped around this, and point me in the right direction.  I've spent over a dozen hours reading through threads on this forum and elsewhere - yet, I can't figure out how to proceed.

My machine is a Bridgeport Series I CNC (Boss 6) mill - and it's sitting in my shop in original condition.  I'm new to CNC (having only dabbled with my Ender 3 3D printer).  However, a close friend of mine who's helping me has a couple of HAAS mills and is a guru with Autodesk Fusion.

I've investigated numerous options for updating this machine.  The more I study this, the more confused I've become!  The simplest answer for a person like me seems to be to install an Acorn board.  I'd rather not.  I don't want to get vendor-locked (more than I have to).  The thought of a company going under and leaving me in the position of having to gut the machine and start over is not appealing.  I don't want to pay a subscription.  I like the openness and configurability of LinuxCNC, and I'm a big fan and daily user of Linux (Red Hat Academy instructor).

My goals:
* Get the old Bridgeport back to making chips again.
* Have the ability to both use this machine as a CNC, and as a glorified manual machine (using LinuxCNC as a DRO).
* Not spend thousands of Dollars on this project (if possible!).

My thoughts:
* Mount a 12" touchsceen monitor in the original control panel housing for interacting with LinuxCNC.
* Hang a pendant on the side of the original control panel housing.
* Pick up a Huanyang VFD for the spindle drive (these seem to be well-supported and well regarded?).
* Replace the ancient original Bridgeport steppers with modern closed-loop NEMA 34's (1100-1200 oz in).

My questions:
* What should I run LinuxCNC on?  I've got a spare RPi 4 sitting in my drawer.  I've got a couple of Supermicro Intel Atom-based ITX server motherboards lying around.  What's the most intelligent way to go?
* It seems that a parallel port interface is the "old-school" way of doing things.  Now, it seems that most prefer an Ethernet interface.  Is there a disadvantage of going one way or another?
* Since I have to replace the steppers anyway, is it foolish to go with a "traditional" setup rather than Ethercat?  It seems like Ethercat will be considerably more expensive (like twice the price or more) - but is it worth the price?
* Everyone seems to agree that Mesa boards are the "gold standard."  How do Pico Systems' boards compare?  Jon Elson lives like 20 miles from my house.  Does anyone have experience with his customer service?  Is it foolish to consider anything other than a Mesa?
* If I go with a Mesa setup, which direction should I go?  If I use the RPi, I could go with the 7C80 or 7C81 - I could also run an Ethernet setup.  If I use the server motherboard, I could go with a parallel port setup or an Ethernet setup.  Is there an advantage of going one way or another, here?
* If I go with a given Mesa board, what else will I need to buy?  It seems that some of the Mesa cards (like the 7C80 and the 7I95T) will hook directly to the stepper drives, while others require a separate daughter card (BoB)?
* What hardware (if any) would I need in order to use the encoders on the steppers as a DRO?  Will any of my hardware selection above affect my ability to have this feature?
* Will a cheap Amazon/Aliexpress stepper motor/drive/power supply set work, or will I need to buy the stepper drives separately?  If I need a particular stepper drive, should I go with a Gecko or something else?
* If I run a touchscreen and a pendant, is there any reason why I will need a keyboard hooked up to this machine (once it is configured)?

Sorry for all of the (possibly stupid) questions.  The DIY CNC and especially the LinuxCNC ecosystem is far more vast than I imagined.  I really did attempt to "do my homework" before asking.  There just seems to be a lot of somewhat conflicting information (possibly, due to changing technologies and best practices over the years?).

Thanks for any advice that you can provide to me!
  • richcolvin
  • richcolvin's Avatar
20 Mar 2025 16:54
C Axis as Second Spindle was created by richcolvin

C Axis as Second Spindle

Category: General LinuxCNC Questions

I am looking for guidance on how to setup the C axis as a second spindle.  This is for a rose engine lathe (otbok.info/index.php?n=Main.RoseEngineLathe) where we need to use:
  1. the Spindle to rotate the piece, and
  2. the C axis to rotate the rosettes used to impart the design
We turn these quite slowly, certainly less than 10 RPM, and at times speeds approaching 3 or 4 minutes per revolution.  Thusly we are using stepper motors for both axes.

The end goal is to drive the spindle and the C axis simultaneously, but specifying a relationship percentage for their rotational speeds.  For example, 
RPM of the C-axis = x% of RPM of the Spindle
Is there some documentation I can read which describes 
  1. How to setup LinuxCNC to treat the C-axis as a secondary spindle, and
  2. The G-code I would use.
Apologies if this is already been asked and answered:  I searched the forum and could not find it.
  • unknown
  • unknown
19 Mar 2025 12:24
Replied by unknown on topic EtherCAT Closed-Loop Drive Options for Lathe

EtherCAT Closed-Loop Drive Options for Lathe

Category: EtherCAT

Personally I would close the feed back loop with linear encoders, this will give actual feed back position, with a mesa FPGA this is a very well worn track with plenty of info available. Same for the spindle and encoder that also employs an index.
Sorry I'm too broke to have experience with Ethercat so really can't make a comment that maybe of use.
What kind of lathe are you working with ?
I'm kind of lucky with my Frankenstein Myford ML7\Super 7 in that I have plenty of room for the stepper motors, the only issue was the X axis, but I was able to use 10mm ballscrew and unlike most other lathes the nut is fixed to the carriage casting rather than running under the cross slide.

And for my techno babble mate, lathes conventionally use a XZ setup, Z being the carriage and X being the cross slide.
Also very few lathes, I can't think any that the average Joe would have access to lathes that use linear rails, mostly dove tails for cross slide and top slide and either plain rectangular ways for the bed,eg Myford, rectangular single prism, think 7x14 mini lathe or dual prism for the more industrial type. These are just the ones I can of off the top of my head.

Sorry to the OP for getting a bit off track.
  • scda
  • scda's Avatar
17 Mar 2025 14:29

caxis.comp with stepper motor / gear connection to spindle

Category: HAL

Luckly I installed a disk brake on my lathe's spindle during the retrofit (brake is operated with pressurized air). This works pretty well for holding the spindle during cutting in a specific angle.
  • spumco
  • spumco
16 Mar 2025 23:54

caxis.comp with stepper motor / gear connection to spindle

Category: HAL

Not a problem, hope it was helpful.

Regarding spindle orient... I'd hoped to use orient for my lathe as a 'poor-man's c-axis' once I realized that caxis.comp wasn't doing what I wanted.

I quickly realized that is orient by itself won't hold a position.  You either need a spindle brake, or you need a servo drive that is in position mode (internally).  Servo drives in velocity-mode don't necessarily hold a position rigidly, but LCNC is perfectly capable of treating a position-mode servo drive as a spindle.

LCNC can orient a plain old VFD to a pretty exact position, but that does no good if you're trying to use live tools once the spindle is in the appropriate position.

I think you're on the right track for your first steps.  Get the spindle working as well as you can, then add the orient function.  Orient is simple in concept, but tuning and nailing the position can be tricky and time-consuming.  Especially if you have a heavy spindle/chuck.

Something else to consider... your spindle encoder need not be super-high resolution for spindle/orient functions, but for eventual c-axis work the higher the resolution the better.  And that can become a rabbit-hole when trying to balance high encoder speeds with high resolution... while remaining budget friendly.
  • scda
  • scda's Avatar
16 Mar 2025 21:08

caxis.comp with stepper motor / gear connection to spindle

Category: HAL

Thanks a lot for the detailed reply. Really appreciated.

I know that this is not an official LCNC function. I was expecting this to be troublesome, but with your feedback, I might consider leaving it be for the moment.
If I find time I will try to understand ACIERA's setup and try this out.

I might just setup spindle orient function for now. This should be fairly straight forward.

Cheers,
Dave
  • spumco
  • spumco
16 Mar 2025 18:30

caxis.comp with stepper motor / gear connection to spindle

Category: HAL

Caxis.comp was originally written by Andy Pugh to control a single motor for velocity and positioning mode (spindle & c-axis).  I don't think it was intended to control two separate motors.

It's not part of the mainline LCNC components, nor are there many people using it... so I don't think you're going to find a wealth of info on implementation.  For your situation, there may be better approaches to managing your dual-motor arrangement.

The main hurdle to overcome for any spindle/axis (dual or single motor) is how to manage the axis encoder.  Once you switch from axis to velocity mode the axis will generate a following error when LCNC sees the 'axis' encoder moving away from the commanded position.  So we have to 'trick' LCNC and adjust the encoder value somehow.
  • caxis.comp does this by intercepting the encoder output, and then subtracting the encoder change from the encoder starting value before sending that to the axis PID feedback input.
  • Another method is to disconnect the encoder output from the axis feedback in spindle mode
The problem with #2 above is that when the encoder is re-connected (switch to axis mode) there is a significant following error instantly present.  The switching scheme @Aciera came up with a while back for his lathe (using a single motor) looks like this:
  • Step 0
    • LCNC starts up with main spindle motor disabled
    • Home C-axis before any spindle moves (at start of LCNC session). 
  • Step 1
    • Command C-axis to C0
    • Disconnect spindle encoder
    • Enable spindle mode
      • in Aciera's case that means switching his drive from position to velocity mode
      • for a two-motor arrangement that means retracting the axis motor and enabling the main spindle motor via M-codes & digital inputs/outputs
  • Step 2 - Run spindle as a spindle
  • Step 3
    • Use orient.comp to orient the spindle to 0
    • Disable the spindle motor
    • Enable the axis motor
    • Reconnect the spindle encoder
If everything is adjusted properly (orient offset, C0 actual position, etc.) there should be a very small difference between Orient-0 and Caxis-0, resulting in (hopefully) a small twitch of the spindle at most.

For the past year I've been fiddling with caxis.comp and have recently come to the conclusion that it isn't going to work for me.  There are a couple of annoying things I don't like (can't disconnect the spindle easily to manually rotate the chuck), but the serious problem I found was that spindle synchronized motion wasn't working properly.

Something - and I'm not smart enough to figure out exactly what it was - in the caxis.comp scheme was causing erratic behavior (big motion jumps) during tapping and threading commands.  Once I removed caxis.comp and use the spindle as just a spindle the tapping/threading stuff started working as expected.  So now I'm re-doing a bunch of stuff in my config and will eventually wind up with something very similar to Aciera's arrangement.

So to sum up, I'd suggest abandoing caxis.comp for your dual-motor lathe and search for Aciera's config.  I know he posted his files in the past year or so, although I think he's been working on a glitch with the encoder disconnect function recently.
  • scda
  • scda's Avatar
16 Mar 2025 15:04 - 16 Mar 2025 15:09

caxis.comp with stepper motor / gear connection to spindle

Category: HAL

Hi all,

I am trying to understand and implement the caxis.comp with my lathe. 

My setup is:

VFD with ac motor for "normal" spindle mode (analog signal --> pwmgen)
C-axis is connected via a reducing gear to the spindle, the c-axis motor is a closed loop stepper (step/dir). The c-axis drive is engaged to the spindle with a pneumatic cylinder. Normally it is disengaged

I am trying to better understand the caxis.comp and was wondering if someone can shed some light on this:

pin in float spindle-revs --> connected to spindle.0.revs
pin in float spindle-velocity-in --> connected to encoder velocity signal
pin out float spindle-velocity-out --> ? velocity signal for pwmgen and/or step/gen ?
pin out float position-fb-out --> is this position feedback calculated from encoder velocity signal ? is this connected to joint.xx.pos-fb?
pin in float pid-in; --> connected to PID output of c-axis
pin out signed state; --> what is this for?

Has anyone used this in similar setup (spindle with pwmgen, and c-axis with step/dir). Should the step/dir generator be run in velocity mode?
Would probably help to have some insight.

I have also tried a similiar thing using the mux component and connecteing the encoder signal to the c-axis feedback or not (depending on the mode). But as others have experienced there is an ussed with joint following after switching back to c-axis mode. Even when reseting the encoder position to 0, this will only work if the c-axis is also at 0.
I also could not achieve proper orientation (homing) when switching to c-axis mode.

Will keep trying ----


Regards,
Dave
  • PCW
  • PCW's Avatar
13 Mar 2025 15:50 - 13 Mar 2025 16:45

Steppers motor start moving without any commads being given

Category: General LinuxCNC Questions

AFAIK those breakouts do not have a 5V regulator, you must supply 5V.
So the behavior you see is pretty much as expected. That is, the 5V side is being
powered (weakly) via the PC parallel port data pins.

The regulator just supplies the inputs and the analog spindle interface
(regulates to 12V)
  • jtrantow
  • jtrantow
08 Mar 2025 15:08
Replied by jtrantow on topic Lathe spindle index only?

Lathe spindle index only?

Category: Basic Configuration

I converted my lathe from parallel port to mesa when I added linear encoders. Prior to that, I had zero problems threading with the parallel port using this 65 tooth, 260 count disk using a quadrature software encoder on an ancient PC. I only used the spindle encoder for threading (<150RPM) so I'm not sure what the limit for this setup was. I still run 4 identical ancient PCs for my LCNC machines but they all have mesa cards now.

3d printed timing pulleys are a great low cost solution for the low load timing application.

The slotted disk (I used thin copper coated pc board I had laying around) is easy if you have a working CNC router or mill. The finicky part for me was aligning the sensors to the teeth. To get quadrature and index signals all three encoders need to be positioned just right.  

I mounted my ballscrew bearing block directly to the apron. (original mount was damaged) This gives me just enough room for a 12 or 13T timing pulley to pass under the X slide. I may have modified the bearing block for clearance. When you remove all the manual clutter, there is room to mount the x stepper directly underneath so you end up with a shortened x axis that doesn't get in your way.

I used a wireless MPG for a while but found the joypad was much better for jogging and feeding at a consistent rate and I use MDI when I need precise movements anyway. As a bonus, it's easy to cut a nice 45 degree chamfer using the analog stick! 
  • Aciera
  • Aciera's Avatar
03 Mar 2025 09:05 - 03 Mar 2025 09:14
Replied by Aciera on topic Stepper as a spindle

Stepper as a spindle

Category: HAL

Note that ' s-output => spindle.0.on' does not make much sense in the context of the hal sections posted above as 's-output' is a float signal and 'spindle.0.on' is a digital out pin.

Looks like you are actually missing the input to enable the stepgen.

So in the spindle section of your hal file change this line:
net s-output        =>  spindle.0.on

to this
net s-enable   <= spindle.0.on
Displaying 31 - 45 out of 154 results.
Time to create page: 0.762 seconds
Powered by Kunena Forum