Hello Guest it is March 29, 2024, 03:44:27 AM

Author Topic: How to set the feedrate with a button  (Read 5880 times)

0 Members and 1 Guest are viewing this topic.

How to set the feedrate with a button
« on: March 05, 2013, 04:35:36 PM »
I want to set a new feedrate in the middle of a running program with a button.

Example:

The feedrate is a 1000mm/min in the middle of running program.
When i push a button (make in a new screen) the feedrate must be 10 mm/min.
When i push the button again the feedrate must be previous feedrate.

All this without stopping the running program.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to set the feedrate with a button
« Reply #1 on: March 05, 2013, 04:58:14 PM »
This should get you started.

'Macro to toggle feedrate +/- 10
 If  Getuserled(2000) = 0 Then
SetDro(18, (GetDro(18)+10))
SetUserLed(2000,1)
Else
SetDro(18,(GetDro(18)-10))
SetUserLed(2000,0)
End If
End

(;-) TP
Re: How to set the feedrate with a button
« Reply #2 on: March 05, 2013, 07:59:50 PM »
This should get you started.

'Macro to toggle feedrate +/- 10                    
 If  Getuserled(2000) = 0 Then
SetDro(18, (GetDro(18)+10))
SetUserLed(2000,1)
Else
SetDro(18,(GetDro(18)-10))
SetUserLed(2000,0)
End If
End
(;-) TP


Hey TP, wouldn't that be .......
'Macro to toggle feedrate  BETWEEN  10 and 1000      
               ... SetDro(18, (GetDro(18)*.01))
       and ....  SetDro(18, (GetDro(18)*100)) ... ?
Just guessing,
Russ


Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to set the feedrate with a button
« Reply #3 on: March 05, 2013, 09:28:43 PM »
WOOPS I can't read very well I guess. Need new glasses. But you can see from the bad example how to do the function (;-) I Just need to take a math class or reading class to finish it out.

Thanks Russ, (;-) TP

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: How to set the feedrate with a button
« Reply #4 on: March 06, 2013, 04:28:58 AM »
A little caution here guys with where you are so far. Feedrate is 1000. You press the button and feedrate drops to 10. But what happens if a gcode F1000 happens to come along? You press the button again expecting a feed of 10 but you get a feed of 100,000.

Ian
Re: How to set the feedrate with a button
« Reply #5 on: March 06, 2013, 06:17:54 AM »
Thanks for the reply`s.

@Striling,

Nice one!

But there is another issue .
The feedrate is not always 1000mm/min.
I can also be a other value.
Re: How to set the feedrate with a button
« Reply #6 on: March 06, 2013, 07:16:36 AM »
new to this so don't try without drycutting. but would it be something like this;

'Macro to toggle feedrate
If GetOEMDRO(Don’t know #) = 0 Then
SetOEMDRO(?, (GetOEMDRO(?)*.01))
Else
SetOEMDRO(?,(GetOEMDRO(?)*100))
End If
End
Kenneth
Re: How to set the feedrate with a button
« Reply #7 on: March 06, 2013, 07:27:53 AM »
TP, you did all the work, I just caught a typo. Couldn't have done it without ya. :)
Thanks,
Russ

Good point Ian .... real good !

« Last Edit: March 06, 2013, 07:33:14 AM by Overloaded »
Re: How to set the feedrate with a button
« Reply #8 on: March 06, 2013, 07:30:30 AM »
The feedrate is not always 1000mm/min.
I can also be a other value.


Doesn't matter what the FR is, it just gets multiplied by .01 then back to the originally called FR by the *100.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to set the feedrate with a button
« Reply #9 on: March 06, 2013, 11:51:00 AM »
normally I would capture the current FR and then ASK what you wanted for a new feedrate.

Just as easy to TYPE in the wanted feedrate in the DRO.

Russ, I could have sworn I read it as, want to reduce it by 10 IPM and then back to normal.  (;-)



(;-) TP
« Last Edit: March 06, 2013, 11:53:00 AM by BR549 »