Lathe C axis homing

More
6 months 3 weeks ago #345248 by spumco
Replied by spumco on topic Lathe C axis homing
Here you go.

Again, it's complicated.  Feel free to ask questions if something is unclear.

A few thoughts:
  • Still a work in progress, but the part(s) you want works.
  • HAL files are broken up by major components of the config.
  • Lots of comments - you should get a sense of the uncountable number of times I've tried or tweaked something.
  • Signal names are all upper case because LCNC's halshow sorts by case first, then alphabetically.  Drives me nuts searching for signals if they're all jumbled due to upper/lower case.
  • Sub-spindle is not connected to an axis.  LCNC doesn't have duplicate rotary axes like UVW for XYZ.  I found (so far) M19 works fine for the sub.
  • Main spindle motor is a SZGH 'servo spindle' - an induction motor with a pretty smart drive.
    • The drive has position, velocity, and torque modes, just like a brushless PM servo
    • I believe @Aciera switches his drive between velocity and position when he switches LCNC between spindle and C-axis.
    • I found that position mode had a bit of dither at stand-still, possibly due to the induction motor characteristics.  So my drive/motor is always in velocity mode, unlike @Aciera's example.  This may help you with your Schaublin's spindle drive.
The following user(s) said Thank You: jetbadger

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345293 by jetbadger
Replied by jetbadger on topic Lathe C axis homing
Thank you!

The comments and overall formatting you did I greatly appreciate, makes it much easier to follow for someone like me and I think I'm starting to get an idea of how most of it works, well atleast to some extent.

For now the spindle drive is always in position mode, it's just a servo drive/motor. It seems to work okay, but then again it's a bit early to tell.

I will test things on the actual machine in the upcoming days as it's a bit of a drive, but I have high hopes this time :)

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345361 by jetbadger
Replied by jetbadger on topic Lathe C axis homing
I suppose having the drive itself in position mode is causing this? The movement is choppy no matter what. I suppose it's because the output is controlling a position step/dir signal rather a speed signal? I wanted to rewire it for speed, but apparently my drive doesn't allow for speed control over digital step/dir signals. I'm sure there must be a way for it to work in position  mode though? 

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345367 by spumco
Replied by spumco on topic Lathe C axis homing
Yes, possibly the drive itself is responsible for the choppy movement.

What input methods are available for velocity mode?  If the drive accepts PWM, you can change stepgens to PWMgens on Mesa cards.

You also may be able to tune the drive to run more smoothly in position mode.  Perhaps the drive permits different tuning values to be changed on-the-fly by the user via inputs (or modbus)?  This might allow you to keep the drive in position mode, but have a tight tune for Caxis and a more gentle tune for spindle/velocity mode.

What is the drive mfgr/model?

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345369 by jetbadger
Replied by jetbadger on topic Lathe C axis homing
The drive is an Astraada SRV-63. There's only analog in and serial for speed mode sadly.

However shouldn't the stepgen treat it like a velocity signal anyway? As in it generates signal until it reaches setpoint, the drive will turn the motor as long as it receives steps, right? I've been breaking my head about this all day and can;t seem to figure out why is even the setpoint from LCNC choppy? The joint.2.motor-pos-cmd is the origin of the signal it seems to me and shouldn't it be a smooth slope, letting the pid loop take care of reaching the values? Can;t seem to find info on what actually happens in LCNC between something like "G0C0" and joint.x.motor-pos-cmd. A bit stumped now :|

Please Log in or Create an account to join the conversation.

More
6 months 3 weeks ago #345377 by spumco
Replied by spumco on topic Lathe C axis homing
Keep in mind that we're reaching the limits of my competency...

I think the typical/standard configuration is to put the LCNC stepgen in velocity mode (stepgen.N.control-type = 1), and let LCNC's PID manage getting to the target position.

I seem to recall reading a forum post a while back describing where some developers discovered (years ago) that a velocity-mode stepgen w/PID wound up being more accurate - or otherwise 'better' - than a position-mode stepgen.

So instead of using stepgen.N.position-cmd as the PID output, stepgen.N.velocity-cmd is used.  Or something like that.

How are your other axes controlled?  Velocity-mode or position-mode stepgens?

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds
Powered by Kunena Forum