585,708 active members*
3,731 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 22
  1. #1
    Join Date
    Apr 2012
    Posts
    79

    Machine doesnt pause for spindle to stop

    Hi All

    Can anyone help me as i am stuck with a problem. I have configured a vfd spindle with both m3 and m4 working along with spindle at speed command so the machine doesnt move until it is at 95% commanded speed. The problem is the opposite so the machine does not wait for a M5 command to finish in a program and the spindle is still decelerating when it starts the next positioning moves. I do have the option from the vfd to have a spindle stopped signal output but i was hoping the software could do this from the encoder.

    Thanks

    Lee

  2. #2
    Join Date
    Jun 2007
    Posts
    3757
    Are you using Mach3? Now then I could help.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  3. #3
    Join Date
    Apr 2012
    Posts
    79
    Hi Neilw20

    No its Linuxcnc 2.5 I am using

    Thanks

    Lee

  4. #4
    Join Date
    Jun 2007
    Posts
    3757
    Looks like you need to program a pause in the code after the M5
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  5. #5
    Join Date
    Apr 2012
    Posts
    79
    Hi

    I could get away with that but the decelaration time would vary significantly for different speeds. I was hoping there was a parameter or setting to be able to do this.

    Lee

  6. #6
    Join Date
    Jul 2003
    Posts
    1754
    Can I ask why? I cannot think of a reason why you would need to wait for the spindle to stop before moving..

    That being said - I think there are a few ways to do this.. You could add some logic to hal that if the spindle is off - and the rpm is above a threashold - activate feed hold. Or set the adaptive feed to 0.

    (just off the top of my head)

    There isn't a wait for spindle to stop setting in linuxcnc but is flexable enough that I think you could do it in hal.

    sam

  7. #7
    Join Date
    Apr 2012
    Posts
    79
    Sam

    The machine has an 11kw spindle and runs on a belt with a 1:2 ratio which means at full speed (6000 at the spindle) the motor is doing 12000 rpm. It does actually take a few seconds to slow down and I need the spindle to stop prior to spindle orientation and toolchange which i have not yet implemented. I am just afraid that the machine would rapid to toolchange position and the toolchanger would come in while the spindle was running. Just looking for some closed loop way of doing it.

    Regards

    Lee

  8. #8
    Join Date
    Jul 2003
    Posts
    1754
    Ah,

    Ok - that makes sense. I do the same thing but my logic is in the tool change loop. I don't allow the tool change to happen until the spindle is locked. (which requires the spindle to slow to a creep in a certain gear and then engage a dog. It then waits for the spindle to stop and only then does it allow the tool change to happen.

    another tool change with a 1 inch tap and 7/8 inch drill - YouTube


    Kearney and Trecker CNC running simple program. (tool changing and everything) - YouTube

    I did most of the spindle logic in a hal comp (c like programing wrapper for linuxcnc) I could have done it in ladder - but I could wrap my head around it programmically. (the tool change and chain logic is done in linuxcnc's ladder)

    sam

  9. #9
    Join Date
    Apr 2012
    Posts
    79
    Samco

    I am curious to know how you used hal to allow the tool change to wait until the spindle stops. I am trying to do the same as you in terms of toolchanging using a detent for spindle orientation etc but not sure how to get the program to wait until the spindle is stopped.

    Thanks

    Lomach

  10. #10
    Join Date
    Nov 2005
    Posts
    496
    Well do you have some sort of feedback from the spindle?
    some VFD's have a stopped signal,
    of course an encoder on the spindle
    or a timer set to wait the longest it would ever take.

    linuxcnc has hand shaking pins for tool changing:



    iocontrol.0.tool-change - (bit, out) TRUE when a tool change is requested.
    iocontrol.0.tool-changed - (bit, in) Should be driven TRUE when a tool change is completed.
    iocontrol.0.tool-number - (s32, out) The current tool number.
    iocontrol.0.tool-prep-number - (s32, out) The number of the next tool, from the RS274NGC T-word.
    iocontrol.0.tool-prepare - (bit, out) TRUE when a tool prepare is requested.
    iocontrol.0.tool-prepared - (bit, in) Should be driven TRUE when a tool prepare is completed.

    so when linuxcnc says change the tool your program could :
    look for the VFD signal that it has stopped or
    look at the encoder to see that it isn't moving or
    wait 10 seconds before starting the tool change.

    How are you going to handle the tool changing? Classicladder or comp program?

  11. #11
    Join Date
    Apr 2012
    Posts
    79
    Chester88

    My initial method for the toolchange was going to be standard g code with macros as I am lost when it comes to comp or ladder programming. I have written sub programs for the carousel to index 1 position down and 1 position up so with a bit of maths this should be quite feasable. I am stuck on two things though which I could with help on. The first is as per my previous discussions as I would like to have a function that waits for the spindle to stop ideally using the encoder and hal but I am very lost on this and secondly is there a way to get the tool prep number stored in the memory. I see it is very easy to use #5400 for the current tool but I cant seem to get the prepped tool.

    Lomach

  12. #12
    Join Date
    Dec 2003
    Posts
    24220
    Generally the easiest way if you have the feature available on the VFD is to assign a couple of VFD outputs for Up to Speed and At-Zero-Speed, this is how most commercial spindles handle it, but the normal method used for all M/S/T codes is to use a single input referred to as the FIN(ish) signal, IOW any M or other code issued by the control will wait for the FIN signal before continuing, this would be triggered by the VFD signals and/or any tool change operations.
    I would think this is possible in Linux?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  13. #13
    Join Date
    Apr 2012
    Posts
    79
    Al

    I tried to use the at zero speed from my vfd but it didnt work as it goes active as soon i program m5 and not when the spindle actually stops. i checked the parameters are correct but couldnt see anything wrong. its an emerson drive but cant remember the model off the top of my head.

    thanks

    Lomach

  14. #14
    Join Date
    Jul 2003
    Posts
    1754
    have a look through hal.. there is a ton of componants

    like a window comparator - maybe hook your encoder data into that? There are probably tons of ways to do it.

    WCOMP

  15. #15
    Join Date
    Dec 2003
    Posts
    24220
    Quote Originally Posted by Lomach View Post
    Al

    I tried to use the at zero speed from my vfd but it didnt work as it goes active as soon i program m5 and not when the spindle actually stops.
    Lomach
    It is very unusual, especially for the medium and High end VFD's to not have an configurable ouput for At-Zero-Speed, this usually comes on when the VFD has reached the Min. speed parameter value?
    It sounds as though the output is not set for the right parameter?
    To me you should not need to watch for an encoder motion, as many VFD's do not even use this feature?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  16. #16
    Join Date
    Apr 2012
    Posts
    79
    Al

    I have been through all of the parameters on the drive and it all seems to be correct. Its a commander sk2 11kw drive and parameter 35 is set to n=0 which is at zero speed. I might do a factory reset tomorrow as I am getting very confused.

    Lomach

  17. #17
    Join Date
    Dec 2003
    Posts
    24220
    I looked through the manual and it appears to me that when 35=0 the output default to 0 (none) it shows B3=2 for 'at low speed' if I read it right.
    If indeed you did have it right, you should see the output change state at some point between stopped and up to speed.
    You also have to look at the state of the output and see if you detect the logic right (1 or 0), I did not look further to see if it shows the nature of the output?
    Also I see there is free software to set the VFD up instead of the keypad.
    Al.
    Attached Files Attached Files
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  18. #18
    Join Date
    Apr 2012
    Posts
    79
    Al

    Thanks for taking the time to look at the parameters for me. I reset the drives default settings earlier and changes the ones i needed. The result was exactly the same but I have found the problem. The at zero speed only works while the drive is enabled and when linuxcnc executes an m5 it disables the drive immediately. I have got over the issue by programming a m3 s1 command before waiting for the spindle at zero speed signal. This isnt perfect but it does do exactly what i want. Thanks for your time

    Lomach

  19. #19
    Join Date
    Dec 2003
    Posts
    24220
    Thats Odd, the VFD's I have used, when the M5 is issued and exercises the stop input on the VFD, the at zero speed works as expected?, it seems you are doing some other action with the M5, otherwise, what would be the use of the drive having the at zero speed function?
    What exactly does your M5 perform on the VFD?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  20. #20
    Join Date
    Apr 2012
    Posts
    79
    Al

    I have 3 digital outputs to the vfd which are enable, run forward and run backwards. I will check what I have tomorrow and I understand what you are saying. Maybe I need to change it to enable, run, forward/reverse or my connections from linuxcnc are incorrect. It would explain a lot. will let you tomorrow what i find.

    Lomach

Page 1 of 2 12

Similar Threads

  1. Spindle doesnt stop at end of program
    By S Woods in forum Fadal
    Replies: 2
    Last Post: 07-24-2010, 12:29 AM
  2. SPINDLE DOESNT START AT G97 S600 M3
    By Jedi in forum Haas Lathes
    Replies: 12
    Last Post: 08-18-2009, 06:57 PM
  3. How can I use G-Code to pause the machine?
    By HankMcSpank in forum G-Code Programing
    Replies: 9
    Last Post: 07-24-2009, 05:22 AM
  4. A2100 Program rewind or pause without stopping spindle
    By James_jester in forum Cincinnati CNC
    Replies: 1
    Last Post: 02-20-2009, 01:07 PM
  5. hardeware pause pause detected?????
    By Conquest1224 in forum Commercial CNC Wood Routers
    Replies: 1
    Last Post: 05-08-2007, 04:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •