Results 1 to 4 of 4

Thread: G4 and GETRPM

  1. #1
    Registered
    Join Date
    Oct 2007
    Location
    Belgium
    Posts
    12
    Downloads
    0
    Uploads
    0

    Thumbs up G4 and GETRPM

    Hi,

    This is the code

    LOADING \4
    IF\4=0THENEXIT
    TIME ON;\4
    \4={\4*60}
    :LOOP
    TIME ON;\55
    \55={\55*60}
    IF{\55-\4}<ITHENGOTO :LOOP
    -----G4

    I see in the book G04 L#

    I try everything G04 L100,G4 L100,G4I100 but nothing works

    I want to see the RPM from my spindle I have an encoder from 500
    I try this but I see always strange values -0.59 It doesn't change
    like 100,200,900 from my Galil card I can see he is reading this encoder


    #50=1 'START MOTOR SPINDLE LEFT
    LIGHT 4;ON
    GETRPM 8;\550
    DISPLAY5 \550
    -----M3

    where is this calculate \74
    DISPLAY4 {f*(\73/100)}
    DISPLAY5 {s*(\74/100)}
    GO x;y;z;u;a;b;c

    Thanks


  2. #2
    Moderator HuFlungDung's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    4826
    Downloads
    0
    Uploads
    0
    The correct command is:
    TIMER ON

    What are the contents of your timer.fil?
    Here is mine, giving spindle rpm and a current feedrate update:
    ~@~TIMER.FIL
    GETRPM 3;\57 ISPLAY5 \57
    DISPLAY4 {\273*f}

    The logic that you wish to have the timer execute needs to be written within the timer.fil
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered
    Join Date
    Oct 2003
    Location
    TEXAS
    Posts
    41
    Downloads
    0
    Uploads
    0
    CNC1970

    'g4 dwell
    'program example ~ G4 L2

    SLEEP l 'lower case L
    -----G4


    'display programmed spindle rpm

    DISPLAY5 {s*(\74/100)}


    'display spindle rpm from encoder

    SPINDLERPM \550
    DISPLAY5 \550
    -----M3


    \74 is calculated internally when set into parameter in CNCSETUP ~ Analog Controls ~ SPEED (variable) ~ \74


    PM your .CBK file to review for CNCSETUP parameter settings.

    Del


  4. #4
    Registered Karl_T's Avatar
    Join Date
    Mar 2004
    Location
    Dassel,MN,USA
    Posts
    1363
    Downloads
    0
    Uploads
    0
    n174k has your G4 code spot on.

    It takes a bit of effort to get your spindle RPM readout working.

    <I'm assuming you have spindle speed control on an aixs>First run TEST SPINDLE to get the three parameters to put in your startup.ini. I not with my manuals so I don't remember the exact names of these.

    Then you have to set up your speed pot. Read on this, instructions vary by how you set this up and whether you have a phisical pot, an on screen slider, none, speed mulitplier etc.

    Finally, your M3 and M4 code will have to include the SPINFORWARD command. <My M3 and M4 turns on different contacts to start spindle, then issue SPINFORWARD> I like to use TIMER.FIL to read the spindle rpm every second or so and then put the rpm on the display. Several ways to do this.

    Karl


Posting Permissions



About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.