Advanced Search

Search Results (Searched for: stepper spindle)

15 Nov 2023 19:39

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

I just added a LinuxCNC issue for this pncconf issue,
and will ask JT if this has been addressed in MesaCT.
15 Nov 2023 16:02

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

I feel like not knowing what I am doing here. Somehow I copy/paste my way through the configs and hal files. 

Everyone feels that way.  Eventually you'll become familiar enough with terminology and LCNC that you'll get better at self-educating when you encounter a problem and need to search for help.

And be patient with the forum editor - it has issues with attachments and editing posts.

Very happy to hear the fix worked out for you.  To give you some context on what you (somewhat blindly) edited:

HAL file is basically a list of connections for LCNC to make when it starts up.  Sort of a 'here's how the network is wired/configured' idea.

HAL is made up of components, each of which is like a little program that does something specific.  Examples of components are "and2.comp", "logic.comp", "mux2.comp", "motion.comp", and "halui.comp".  When the components are created during the first HAL scan (LCNC startup) some 'pins' are also created specific to that component.

Think of these pins just like the physical pins on your stepper drive: the "STEP+" pin does something specific, the "DIR-" pin also does something specific.  Imagine you have a magic wand and created a "stepper drive"...it would come with STEP & DIR pins, right? Your magic drive would likely also have some other input & output pins, as well as some status LED's and similar.

If you look at the HAL file, the "loadrt" statement is you waving your wand and creating a magic component (like your pretend stepper drive).

The "addf" statement puts that component to work - i.e. starts LCNC checking the component every thread cycle.  So:

loadrt magic_stepper_drive  count=3 (creates 3 instances of your magic drive component)
addf magic_stepper_drive.0  servo-thread
addf magic_stepper_drive.1  servo-thread
addf magic_stepper_drive.2  servo-thread  (starts all three components so they can do things)

Now you have three magic drives, and each one has a number of step & direction pins, as well as the other stuff.  Those pins are connected to other pins from other components in HAL.  And they are connected using 'signals' - much like physical pins are connected with wires.

Components ('comps') can be simple or complicated - and "halui.comp" & "motion.comp" are a couple of the more complicated, or at least extensive, components available in LCNC's HAL library.  What you edited was how the stepgen component is controlled by substituting a pin from motion.comp for halui.comp.

At the bottom of the user manual front page is a section "Man pages", with sub-groups of "userspace components" & "Realtime components & kernel modules".  Halui.comp is located in the 'userspace' sub-page.

If you're a Windows person, the concept of Man pages will be utterly foreign - sorry.  Regardless, when you come across a HAL component you don't know (i.e. all of them right now), I suggest opening up the Man page for that component and reading it.  Some of the pages are very helpful, some are accurate but provide zero context, and a few are simply terrible as there's no context or example of use.  But if you read enough Man pages, and your hal file, and about a million forum posts.... it'll sink in.

If you read the halui page, you'll see one of the pins created when halui is started is halui.machine-is-on.  That's one pin you fiddled with.  The other pin is in 'stepgen', and that is on a different Man page (under realtime components).  And the way you did it was unplug one end of the signal (wire) "spindle-enable" and plug "machine-is-on" in to the stepgen enable pin.

What you did, in essence, is disconnect the pin that was telling the stepper signal generator to be enabled only when the spindle was supposed to be spinning, and you plugged in a different pin that tells the stepper signal generator to stay enabled as long as LCNC is turned on.

Keep in mind that everything I've written is a major oversimplification, but hopefully helps you start to digest what you just did in the HAL file.
15 Nov 2023 13:18

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

I feel like not knowing what I am doing here. Somehow I copy/paste my way through the configs and hal files. Thank you for support!
15 Nov 2023 13:05

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

Was the attachment "broken"?

File Attachment:

File Name: drehmaschi...1-15.hal
File Size:11 KB
15 Nov 2023 12:50 - 15 Nov 2023 13:04

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

In the other thread it was suggested by andypugh to change one line in the .hal The attached .hal file is the changed version.
This now behaves as I would have expected with M3S0 and M5 both slowing down the stepper motor. If I did not overlook something it solved the problem.

forum.linuxcnc.org/10-advanced-configura...-stop-command#205319 Instead of "spindle-enable" the stepgen.02.enable is connected to "machine-is-on" (whatever that means, I still get confused with hal terminology :-) ) It is around line 180 in the hal file.

  [attachment=57374]drehmaschine2.hal[/attachment ]

Greetings and thank everyone for fixing my issue.
15 Nov 2023 12:42

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

If you're really new to LCNC, quite a lot of the thread I linked won't make much sense without some context.  If you find you're still confused post back and we'll try to help translate advanced LCNC jargon

The HAL file will be in your configuration folder under linuxcnc/configs/.  It's a text file, but the forum software won't let you attach it as-is.  Copy the file and rename it to main_hal.txt and you should be good.
15 Nov 2023 11:16 - 15 Nov 2023 13:09

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

Thank everyone for the given responses. I tried to find a hint, but was not able to find the mentioned threds, I will read and try to make some sense out of it.

I dId not have the hal file at hand, But it is the one that Pncconf generated after clicking through the basic menues quickly. Hal file I need to copy from the machine to the Internet, when I am in "the cave".

p.s. solved see next posts :-)


 
15 Nov 2023 04:19 - 15 Nov 2023 04:21

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

Is your servo drive in position or velocity (or torque) mode internally?  I suspect this makes a big difference... but I also don't know of any servo drives that accept S&D command in velocity or torque/current control.
 

Pretty much what you said, it runs S/D in position mode. When I set it up I didn't use any sort of PID on the linuxCNCs ide, for milling it works perfectly fine. Rigid tapping works pretty well too except it switches directions very rapidly which sometimes gets me in trouble with smaller taps. Been planning on tuning it up one day but since I don't have any real issues it'll probably be later than sooner.
15 Nov 2023 04:12

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

A simple fix would be to simply tie the spindle  stepgen enable true.
Then the stepgen accel settings can be used  to limit  the
ramp-up/ramp-down rates.
 

I think that's what Andy and NoJo essentially came up with in the thread I linked for NoJo's C-axis lathe.  Basically tied the stepgen enable to motion.machine-on.

But the issue going to keep cropping up as long as PnCconf outputs configs for newcomers with the 'gotcha' built-in.
15 Nov 2023 04:03

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

A simple fix would be to simply tie the spindle  stepgen enable true.
Then the stepgen accel settings can be used  to limit  the
ramp-up/ramp-down rates.
15 Nov 2023 03:47

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

This is something I never actually noticed. I've been using a 5krpm servo with S/D on my spindle for years. It probably does this but I never actually noticed because it's such a low inertia spindle, even with the tool. I'm sure this would be a much bigger problem on a lathe swinging a part.
 


Is your servo drive in position or velocity (or torque) mode internally?  I suspect this makes a big difference... but I also don't know of any servo drives that accept S&D command in velocity or torque/current control.
 
15 Nov 2023 00:51

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

This is something I never actually noticed. I've been using a 5krpm servo with S/D on my spindle for years. It probably does this but I never actually noticed because it's such a low inertia spindle, even with the tool. I'm sure this would be a much bigger problem on a lathe swinging a part.
14 Nov 2023 23:33

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

This seems to be an issue that's cropped up over the years for stepgen-based spindle control.  I think it's because the stepgen simply turns off at an M5, and if the motor drive is in position mode (typical stepper, and sometimes servo) the drive sees that as a command to stop instantly.  If the drive is in velocity mode, then stopping the stepgen will (likely) result in the drive's internal decel settings taking over.

I've been doing some reasearch on this, and I noticed that both PnCconf and Mesact both create configs where the spindle stepgen control is treated like an axis stepgen.  I brought this up a few months ago, but didn't receive a response.

forum.linuxcnc.org/39-pncconf/49366-pncc...ep-dir-spindle-issue

JT responded to me on github, but I've not checked to see if mesact has been changed.

I've come across two solutions... one mentioned in the post above, and the other was a HAL time-off relay combined with a limit.comp that hijacked the M5 command and ramped down the spindle.

I have a stepgen spindle about a day away from commisioning and I'll have to sort this out as well.  I'll probably go with the method worked out in the link above.
14 Nov 2023 17:46

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

Should probably post your hal file.

M3 S0 may be treated the same as M5. It may be setting a motion hal pin like spindle.M.on = false. Maybe that's connected to the stepgen enable signal or something. hard to guess without seeing it.
14 Nov 2023 17:03 - 14 Nov 2023 17:08

Spindle (stepper motor) stopping too fast.

Category: General LinuxCNC Questions

Hello,

I am playing around with some motors and a lathe configuration. (no physical load on the motor shafts)

I used Pncconf to set up a lathe example with x-z axis and a step dir pulse spindle. 

I put values in for RAMP_RATE, MAX_ACCELERATION and STEPGEN_MAXACCEL
  • M3 S3000 speeds the motor slowly up
  • Then M4 S3000 slows it down and speeds slowly up in reverse direction
  • M3 S3000 and then M3 S0 stops the (stepper motor) immediately, without slowing down
  • M3 S3000 and then M3 S1 slows it down
  • M5 also stops immediately without slowing down first

    Is that normal? Why is M3 S0 behaving totally different from M3 S1?
    Usually the spindle is ramping down over a certain time when M5 is in the program. But the machine is either "freewheeling" or a VFD does its "slowing down procedure" without the Linux computer.
I will be happy about some pointer in the right direction.
Greetings
 
Displaying 151 - 165 out of 179 results.
Time to create page: 0.781 seconds
Powered by Kunena Forum