587,311 active members*
3,638 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    13

    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
    Join Date
    Mar 2003
    Posts
    4826
    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
    Join Date
    Oct 2003
    Posts
    45
    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
    Join Date
    Mar 2004
    Posts
    1543
    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

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