Welcome to Our Community

Some features disabled for guests. Register Today.

Dwell in Post processor

Discussion in 'CNC Mills/Routers' started by Wendel Clement, Apr 24, 2024.

  1. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    Hello,

    Under my basic assumption that my spindle does what it is told to do from gcode, and that the post processor files are machine specific I am asking my question here…


    I am using a new VFD water cooled spindle which has to spin up therefore needing a dwell command. I have inserted the dwell right after the M3 command but my spindle in pausing prior to spinning up.


    It is also spinning down during rapid moves and back up before plunge. Obviously this is all dangerous as it will damage my work and bits as the bit is reaching down before the spindle is at full speed.

    im using the OB mm Post processor

    Any ideas?
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,093
    Likes Received:
    4,127
    Post processor for which of the many CAMs? :)
     
  3. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
    I'll assume you are referring to some Vectric flavor since you mentioned OB mm. If that's the case, you'll want to edit the processor here

    upload_2024-4-24_11-57-46.png

    Change G4 Px to how long you want in seconds.
     
    Peter Van Der Walt likes this.
  4. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,701
    Likes Received:
    1,328
    If the spindle is slowing down during a job we need to see your g-code to get an idea of what's happening.
    Upload a file here.

    Alex.
     
  5. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    Yes the issue is based upon increasing G4. It simply pauses then spin up rather than starts spinning then pausing.

    g code is being posted in the below message.
     
  6. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    Here is the PP g code…
    POST_NAME = "OpenBuilds GRBL (mm) (*.GCODE)"

    FILE_EXTENSION = "GCODE"

    UNITS = "MM"

    DIRECT_OUTPUT = "VTransfer"

    LASER_SUPPORT = "YES"

    MIN_ARC_RADIUS = 1

    +------------------------------------------------
    + Line terminating characters
    +------------------------------------------------

    LINE_ENDING = "[13][10]"

    +------------------------------------------------
    + Block numbering
    +------------------------------------------------

    LINE_NUMBER_START = 0
    LINE_NUMBER_INCREMENT = 10
    LINE_NUMBER_MAXIMUM = 999999

    +================================================
    +
    + Formatting for variables
    +
    +================================================

    VAR LINE_NUMBER = [N|A|N|1.0]
    VAR POWER = [P|C|S|1.0|10.0]
    VAR SPINDLE_SPEED = [S|A|S|1.0]
    VAR FEED_RATE = [F|C|F|1.1]
    VAR X_POSITION = [X|C|X|1.3]
    VAR Y_POSITION = [Y|C|Y|1.3]
    VAR Z_POSITION = [Z|C|Z|1.3]
    VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.3]
    VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.3]
    VAR X_HOME_POSITION = [XH|A|X|1.3]
    VAR Y_HOME_POSITION = [YH|A|Y|1.3]
    VAR Z_HOME_POSITION = [ZH|A|Z|1.3]

    +================================================
    +
    + Block definitions for toolpath output
    +
    +================================================

    +---------------------------------------------------
    + Commands output at the start of the file
    +---------------------------------------------------

    begin HEADER

    "T1"
    "G17"
    "G21"
    "G90"
    "G0[ZH]"
    "G0[XH][YH]"


    +---------------------------------------------------
    + Command output after the header to switch spindle on
    +---------------------------------------------------

    begin SPINDLE_ON

    "M3"
    "G4 P1.5"


    +---------------------------------------------------
    + Commands output for rapid moves
    +---------------------------------------------------

    begin RAPID_MOVE

    "G0[X][Y][Z]"


    +---------------------------------------------------
    + Commands output for the plunge move
    +---------------------------------------------------

    begin PLUNGE_MOVE

    "G1[X][Y][Z][F]"


    +---------------------------------------------------
    + Commands output for the first feed rate move
    +---------------------------------------------------

    begin FIRST_FEED_MOVE

    "G1[X][Y][Z][P][F]"


    +---------------------------------------------------
    + Commands output for feed rate moves
    +---------------------------------------------------

    begin FEED_MOVE

    "G1[X][Y][Z][P]"


    +---------------------------------------------------
    + Commands output for the first clockwise arc move
    +---------------------------------------------------

    begin FIRST_CW_ARC_MOVE

    "G2[X][Y][J][F][P]"


    +---------------------------------------------------
    + Commands output for clockwise arc move
    +---------------------------------------------------

    begin CW_ARC_MOVE

    "G2[X][Y][J]"


    +---------------------------------------------------
    + Commands output for the first counterclockwise arc move
    +---------------------------------------------------

    begin FIRST_CCW_ARC_MOVE

    "G3[X][Y][J][F][P]"


    +---------------------------------------------------
    + Commands output for counterclockwise arc move
    +---------------------------------------------------

    begin CCW_ARC_MOVE

    "G3[X][Y][J]"


    +---------------------------------------------------
    + Commands output when the jet is turned on
    +---------------------------------------------------

    begin JET_TOOL_ON

    "M4[P]"
    "G4 P5"

    +---------------------------------------------------
    + Commands output when the jet is turned off
    +---------------------------------------------------

    begin JET_TOOL_OFF

    "M5"

    +---------------------------------------------------
    + Commands output when the jet power is changed
    +---------------------------------------------------

    begin JET_TOOL_POWER
    "[P]"



    +---------------------------------------------------
    + Commands output at the end of the file
    +---------------------------------------------------

    begin FOOTER

    "M5"
    "G0[ZH]"
    "G0[XH][YH]"
    "M2"
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,093
    Likes Received:
    4,127
    Change to what you need and save the Post
     
  8. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    I did change to 5. But when I run the session my head moves up and pauses for the duration but the spindle does not spin up. It still only starts spinning up after the dwell period despite the M3 being before the G4.
     
  9. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
    In the pp you posted it says 1.5. The stock PP has 1.8. So just want to confirm that you changed it to P5 and not P1.5.

    Can you also confirm that your M3 command has a S value with it?
     
  10. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    That’s probable just me playing around with it, but it was at 5 and not 1.5. I even had it at 20 just to see the change.

    Regarding the M3, it is my assumption that the parameters after M3 in the PP master will be populated with the value fed to it from Vectric tool setup.
     
  11. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,701
    Likes Received:
    1,328
    Spindle speed is a variable that the post processor will assign to the S command after the M3. If there is no "S" the post processor can't assign a value to it.

    Alex.
     
  12. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,042
    Likes Received:
    1,436
    Yep. But since you didnt post your gcode, we can only assume that its correct. Just trying to rule out obvious issues.
     
  13. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    Sorry, I thought that you meant the PP Code, here is the Gcode for one of the runs...
    T1
    G17
    G21
    G90
    G0Z20.320
    G0X0.000Y0.000
    M3S12000
    G04P5
    G0X0.000Y191.675Z5.080
    G1Z0.000F2032.0
    G1X-5.464Y191.597Z-3.000
    G1X-10.923Y191.364Z-6.000
    G1X-5.464Y191.597Z-9.000
    G1X0.000Y191.675Z-12.000
    G3X-191.675Y0.000I0.000J-191.675F2540.0
    G3X0.000Y-191.675I191.675J0.000
    G3X191.675Y0.000I0.000J191.675
    G3X0.000Y191.675I-191.675J0.000
    G1X0.000Y196.755
    G3X-196.755Y0.000I0.000J-196.755
    G3X0.000Y-196.755I196.755J0.000
    G3X196.755Y0.000I0.000J196.755
    G3X0.000Y196.755I-196.755J0.000
    G0Z5.080
    G0X0.000Y202.245
    G1Z0.000F2032.0
    G1X5.461Y202.171Z-3.000
    G1X10.917Y201.950Z-6.000
    G1X5.461Y202.171Z-9.000
    G1X0.000Y202.245Z-12.000
    G2X202.245Y0.000I0.000J-202.245F2540.0
    G2X0.000Y-202.245I-202.245J0.000
    G2X-202.245Y0.000I0.000J202.245
    G2X0.000Y202.245I202.245J0.000
    G1X0.000Y207.325
    G2X207.325Y0.000I0.000J-207.325
    G2X0.000Y-207.325I-207.325J0.000
    G2X-207.325Y0.000I0.000J207.325
    G2X0.000Y207.325I207.325J0.000
    G0Z5.080
    G0X0.000Y191.675
    G1Z-12.000F2032.0
    G1X-5.464Y191.597Z-15.000
    G1X-10.923Y191.364Z-18.000
    G1X-5.464Y191.597Z-21.000
    G1X0.000Y191.675Z-24.000
    G3X-191.675Y0.000I0.000J-191.675F2540.0
    G3X0.000Y-191.675I191.675J0.000
    G3X191.675Y0.000I0.000J191.675
    G3X0.000Y191.675I-191.675J0.000
    G1X0.000Y196.755
    G3X-196.755Y0.000I0.000J-196.755
    G3X0.000Y-196.755I196.755J0.000
    G3X196.755Y0.000I0.000J196.755
    G3X0.000Y196.755I-196.755J0.000
    G0Z5.080
    G0X0.000Y202.245
    G1Z-12.000F2032.0
    G1X5.461Y202.171Z-15.000
    G1X10.917Y201.950Z-18.000
    G1X5.461Y202.171Z-21.000
    G1X0.000Y202.245Z-24.000
    G2X202.245Y0.000I0.000J-202.245F2540.0
    G2X0.000Y-202.245I-202.245J0.000
    G2X-202.245Y0.000I0.000J202.245
    G2X0.000Y202.245I202.245J0.000
    G1X0.000Y207.325
    G2X207.325Y0.000I0.000J-207.325
    G2X0.000Y-207.325I-207.325J0.000
    G2X-207.325Y0.000I0.000J207.325
    G2X0.000Y207.325I207.325J0.000
    G0Z5.080
    M5
    G0Z20.320
    G0X0.000Y0.000
    M2
     
  14. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4
    Problem solved. It was that $32 was set to 1 enabling Laser which explains why the spindle was also stopping when doing a fast Z travel.

    Thanks for the input.
     
    Alex Chambers likes this.
  15. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,280
    Likes Received:
    1,836
    turn off laser mode!
    upload_2024-4-25_15-19-7.png

    set laser mode to disabled
    click the save button at top left (it will change color when soemthing needs to be saved
    reset the BB if prompted
     
  16. Wendel Clement

    Builder

    Joined:
    Mar 19, 2023
    Messages:
    88
    Likes Received:
    4

    Thank you for the info. I had already done that and it solved the problem. I did it from the OB c controls app rather than from G-code prompt.
    See above.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice