Can a plugin or macroloop change feedrate

If you have a question about the software please ask it here.

Can a plugin or macroloop change feedrate

Postby beefy » Fri Dec 09, 2016 10:44 pm

Hi Balazs,

is it possible to change FEEDRATE with either a macroloop or a plugin while gcode is running.

My gcode set the feedrate at 1000.

In a macroloop I programmed:

AS3.Setfield(50, 867);
AS3.Validatefield(867);

I intentionally programmed a very low feedrate of 50 so I could "visually" see any change in feedrate.

The SET FEEDRATE DRO changed to 50 but the ACTUAL FEEDRATE DRO stayed at 1000, and it was obvious looking at the toolpath display that there was no slowdown in feedrate.

So is it not possible to change feedrate like this while gcode is running ??

Keith
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Can a plugin or macroloop change feedrate

Postby beefy » Sat Dec 10, 2016 7:42 pm

Hi Terry,

yes I understand and appreciate the dangers involved. I wouldn't for instance try and insert code to make the axis go a different direction to what the gcode had commanded. That would be like having gcode pulling the right leg one way and macro code pulling the left leg the other way at the same time, a bit disastrous.

All I'm wanting is a temporary reduction in feedrate then put back to normal a short time later.

I ended up doing the following and things did not go well:

for(i = 0; i < 4; i++) // "Press" decrease feedrate button 4 times to get 60% feedrate
{
exec.Callbutton(133);
while(exec.IsMoving()){}
exec.Wait(2000)
}

That one worked but it worked in a very strange way. The code would just halt for 8 seconds (4 x 2000 milliseconds) then the DRO would change from 1000 to 600 in one hit. There was no change every 2 seconds like I expected - 1000, 900, 800, 700, 600. A point of note is that the axis were NOT in motion when the feedrate was reduced.

Anyway at least it worked BUT putting the feedrate back to normal did not work.

for(i = 0; i < 4; i++) // "Press" increase feedrate button 4 times to go from 60% to 100% feedrate
{
exec.Callbutton(132);
while(exec.IsMoving()){}
exec.Wait(2000)
}

This time the axis were already in motion when it came to putting the feedrate back to normal.
This time is was complete disaster, the feedrate would only increase to 700 so it seems as though button 132 is only getting called once.
I even tried taking the code out of the for loop and just running it 4 times directly but the result was the same.
I had to go and start pulling the friggin excavator apart again so left it at that but the next thing I might try is just doing "exec.Code(132);" four times in a row all on its' own.

Keith
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Can a plugin or macroloop change feedrate

Postby beefy » Sat Dec 10, 2016 7:55 pm

Ahh, I didn't read what you said properly, the FRO dro, i.e 90% 80% etc. I'll give that a try.

At first glance I thought you were saying Fset DRO. I tried that one and it didn't work.

Keith.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

Re: Can a plugin or macroloop change feedrate

Postby beefy » Sat Dec 10, 2016 10:33 pm

Worked perfect, thanks Terry.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 20 guests