586,635 active members*
3,042 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    240

    How can I set the Feed Rate from a C file?

    I have a C file, which is capturing the constant Feed Rate in Inches Per Minute (IPM) of what is my Feed Rollers... on the input to a Wood Profiling Machine. This is where the boards, going into the machine, get shaped.

    The speed of this machine, due to the incoming Power Supply, is going up and down, during the day; which does change the speed of the feed rollers, or the IPM.

    My C file, ReadEncoder.c; captures the speed in IPM; based on the files you sent the other day, which I Modified.

    I need this IPM to be the GCode Feed Rate, and to update automatic. I already am getting the Feedrate, and it is my variable "dxx".

    Right now, I am using printf, to write to the Console, only once; when I first start my GCode file via M3, which runs the C file. The C file does not run forever, only a few seconds.

    Then the customer has to manually enter this, into the Gcode program, for the Feed Rate.

    Then restart the GCode file once the right Feed Rate is entered. So not so automatic.

    In my C file, the var.

    double dxx = Captured_Feed_Rate_Calculated;
    __________________________________________________ _____

    How do I pass this to the Interpreter?

    SetFeedRate(dxx);
    SET_FEED_RATE(dxx);
    __________________________________________________ _____

    I was able to pass this to the GCode program, through the Var 199, in KMotionCNC, however; my customer does not want to allow his operators near that much control, such as Jogging, FRO, and such.

    The GCode program is more suitable, for this Automated machine.


    Thanks so much!

    - Jeff
    Robot & Machine Design - BLUECNC4, GreenCNC3, RedCNC2L, SilverCNC2; CNC Software!
    www.truemachinedesign.com - - - - - - - - - - - - - www.truemachineautomation.com

  2. #2
    Join Date
    May 2006
    Posts
    4047

    Re: How can I set the Feed Rate from a C file?

    Hi Jeff,

    Maybe FRO would be more appropriate to change the Feedrate on-the-fly? There is a function in KFLOP:

    void SetFRO(float FRO); // change from current to the specified FRO (FRO=1.0=Realtime)using a nominal rate based on computed time to change from 1.0 to 0.0



    It isn't clear when/where you want the Feedrate sampled/adjusted. Setting the F word in the Interpreter would have a delayed effect and wouldn't effect motion that was already planned.

    KMotionCNC can accept commands from KFLOP to upload GCode Variables. So at the beginning of your GCode you might add:

    M100 (Upload the desired Feedrate from KFLOP into GCode Variable #199)
    F#199

    HTH
    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Jul 2004
    Posts
    240

    Re: How can I set the Feed Rate from a C file?

    Thanks,

    I need to set the Feed Rate, automatically. You have already explained that I cannot pass variables to the Gcode program, in Kmotion.exe... and I verified this. It don't work.

    However, if I can set the Feed Rate in the interpreter... the boards we are profiling... take approx. 15 seconds to run, then less than 2 seconds after that here comes another one.

    It does not matter that the feed rate has a delay in changing. If I set it automatically, every 15 seconds, this means I wont run 100's of boards, without it being corrected. Right now it is only set manually, when they start a job.

    If I can set this Feed Rate, then the machine is not depending on the operator to manually put the info. in correct. The machine will set its own feed rate, based on it own monitored reading. This is an Automated machine.

    This is not a CNC mill, lathe or even close to the like. It is a CNC Profiling machine. It profiles Arc's into the wood. There is actually no Y axis, it only has an X axis, which moves the cutter head, to profile the shape of the wood. The machine tells the machine to Machine an XY move... and monitors the encoder on ch3, to get the feed rate. There is no gearing off the encoder, though some may think that would be good.

    What we do, is set the feed rate, based on the rollers feed rate; in IPM. This feed rate, if correct; will produce an exact part. For instance, G3 X.500 Y100 R10000.25. A 10000.25 inch arc, on this board... the arc is calculated automatic. The Gcode is calculated completely automatic, by the dim. of the board the customer desires.

    I need the feed rate as well to be automatic. I have all the code done. I just need to be able to Set the Feed Rate.

    FRO will not work.

    On one board, it will be cut at 750 inches per minute. Then on another hard wood board, they may run 350 inches per minute. This is set on the machine with a dial... variable belt, to the feed roller, which feed the board through the machine.

    If we can set this, this will increase the accuracy of our machine, and will follow whatever voltage changes or manual changes the customer makes; while the machine is in operation.

    What I really need, and this will eliminate the customer having to do, what should be able to be automated.

    I wish I had you at the machine, to show you; but it is what we need.

    Thanks so much,

    - Jeff R.
    Robot & Machine Design - BLUECNC4, GreenCNC3, RedCNC2L, SilverCNC2; CNC Software!
    www.truemachinedesign.com - - - - - - - - - - - - - www.truemachineautomation.com

  4. #4
    Join Date
    Jul 2004
    Posts
    240

    Re: How can I set the Feed Rate from a C file?

    OK,

    I admit, that FRO could be used. After thinking about it, I could set the Standard Feed rate to "F1000". Then use my auto program to set it to 750, 500 or whatever it should be.... I will test this. I appologize for being so stubborn about the Feed Rate only idea.

    Thanks again...
    Robot & Machine Design - BLUECNC4, GreenCNC3, RedCNC2L, SilverCNC2; CNC Software!
    www.truemachinedesign.com - - - - - - - - - - - - - www.truemachineautomation.com

  5. #5
    Join Date
    Jul 2004
    Posts
    240

    Re: How can I set the Feed Rate from a C file?

    I am trying this... as a test of FRO with the Kmotion.exe GCode program... I probally don't know how to implement... can you help me with how to use?

    #include "KMotionDef.h"

    float FRO;

    main()
    {
    FRO = 100 / 1000;
    void SetFRO(FRO);
    }
    Robot & Machine Design - BLUECNC4, GreenCNC3, RedCNC2L, SilverCNC2; CNC Software!
    www.truemachinedesign.com - - - - - - - - - - - - - www.truemachineautomation.com

  6. #6
    Join Date
    May 2006
    Posts
    4047

    Re: How can I set the Feed Rate from a C file?

    Hi Jeff,

    Regarding "Set Feed Rate" that would need to be added to the code. Or as I suggested you might use KMotionCNC using a GCode Var as suggested. The KMotion.exe GCode Screen is obsolete and replaced by KMotionCNC. Another option that might be simpler that updating KMotion.exe with KMotionCNC.exe functionality would be to use KMotionCNC and hide buttons you don't want to make it look like the old GCode Screen.

    #include "KMotionDef.h"

    float FRO;

    main()
    {
    FRO = 100 / 1000;
    void SetFRO(FRO);
    }
    Integer division of 100/1000 is zero. Try 100.0/1000.0 = 0.1 instead.

    HTH
    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. feed rate is zero
    By pecos in forum SheetCam
    Replies: 2
    Last Post: 07-01-2016, 02:00 AM
  2. feed rate and plunge rate help required please
    By curiosity22 in forum Australia, New Zealand Club House
    Replies: 17
    Last Post: 12-07-2015, 09:30 AM
  3. Okuma mill feed rate jumps to rapid feed
    By easyguy97 in forum Okuma
    Replies: 6
    Last Post: 12-20-2009, 11:14 AM
  4. Feed rate Ovverride also Increases rapid rate.
    By Korellibopper in forum Machines running Mach Software
    Replies: 1
    Last Post: 01-31-2008, 12:37 AM
  5. Feed Rate and Spindle Rate for this cut?
    By DroopyPawn in forum MetalWork Discussion
    Replies: 20
    Last Post: 11-22-2007, 06:12 AM

Tags for this Thread

Posting Permissions

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