Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: big-tex on September 11, 2010, 06:10:12 PM
-
I think I got all where I need to be with one exception.
As I go through my machining and I use M6start mach chooses to jog feed rate of previous tool path goes to previous location and then jogs at full speed changes speed to current tool path and machines . Setting initial string say F200 does not affect that.
Is there way to change jogging speed that is not feedrate of previous tool path?
-
Not sure I am really understanding what you are meaning but if its an auto toolchange then it could be the VB in your M6 macro that is determining the feedrate.
Hood
-
Let me explain:
I do manual tool changes and use M6start to bring router to location where I do that. Also I have initial string with F200.
Say I have 2 tool paths in the program 1st at 30ipm second at 100 ipm.
What is happening, machine will come to change tool for first tool path to tool changing location designated as per M6start and after I hit start will proceed and jog to last position at 200 ipm then to 0.0 at 400ipm per motor tuning and to tool path start position and then proceed at 30ipm as per g-code. Now when that tool path is done machine will fast jog to M6start location for tool change after that is done and I hit start it will jog at 30ipm (previous tool path feedrate) to last position, fast jog to 0,0 and proceed with cutting at 100 ipm.
Question: How do I eliminate or change jogging at 30ipm, say if that 1st tool path was at 10 ipm it would have jogged as per above situation at 10ipm. Is there script that overwrite this. Is there list of script numbers and what function they are resposible for?
-
What do your M6 macros have in them?
Hood
-
Only modification was done to M6start I have added x y z location to move to nothing as to feedrate
-
I am not sure what is in the standard M6 macros as I have custom ones so if there is no feedrate specified you could add it or even a G0 if you wished. I would imagine because the new feedrate is being called after the M6 it will not take effect until after the macro has completed.
Hood
-
ok m6start brings machine to tool changing location, m5end moves it back just in case it was jogged of position i know that.
What macro would be responsible for this condition or some typo of setting.
-
Can you attach your macros please
Hood
-
How are you doing the movement? G0? G1? or manual jogging with the keyboard?
Sounds like it's using both G0 and G1? If your using "code G0 ...." or "code G1 ....", then add a feedrate in the move.
You might also need to use SetOEMDRO command to set the current feedrate.
Really need to see the code to know for sure.
-
Code("G53G0Z-0.5")
sleep 100
Code("G53G0X24Y1")
While IsMoving()
Sleep 100
Wend
tool = GetSelectedTool()
SetCurrentTool( tool )
-
Is that all of it?
Try:
Code("G53G0Z-0.5")
While IsMoving()
sleep 100
Wend
Code("G53G0X24Y1")
While IsMoving()
Sleep 100
Wend
-
does not work, fedd rate still as per previous tool path
-
Is there more code?
-
Nope this is it.....
-
What is in the M6end macro?? A tool change is 2 parts M6start and M6end
(;-) TP
-
what ever mach3 comes with i have not changed it at all
-
I think the answer is in the M6end macro. It deals with safez IF z >safez then it does a traverse move and that may be at Frate IF Z=< than safez then it moves at rapid rate.
Might want to check that. It may explain the different rates.
-
REM The default script here moves the tool back to m6start if any movement has occured during the tool change..
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y,SafeZ, a, b, c
StraightFeed x, y, z , a, b, c
else
Code"G00 X" & x & "Y" & y
end if
That is how my unmodified m6end looks like
-
but it does not move at rapid rate that is whole point. it moves at previous feed rate to last location within last tool path.
I think I found bug in my script for probing, it sets feed rate to prior feed rate.
-
Ok now that I found where it comes from and tested it.
I would like to add command to my script f=rapid feed rate
How would I do that?
-
If that does not fix it permanaently.
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
SafeZ = GetSafeZ()
if SafeZ > z then StraightTraverse x, y,SafeZ, a, b, c ****** LOOK here it does a straight traverse at rapid IF condition is met
StraightFeed x, y, z , a, b, c ****** THEN it does a straight FEED possibly at feedrate
else
Code"G00 X" & x & "Y" & y ******* OR just returns at Rapid
end if
ALSO please remember that IF you manually reset the Feedrate to a RAPID rate during a tool change MACRO. Then double check your program code right after it returns to work. MAKE sure it recalls for the proper Frate or else it may try to cut at a rapid rate.
SOme Cams reset the Frate every time. SOME only reset it IF it changed from the last MODAL rate
Just a thought, (;-) TP
-
Ok now that I found where it comes from and tested it.
I would like to add command to my script f=rapid feed rate
How would I do that?
Just use G0 moves for rapid feedrate moves. Then you don't need to change to the rapid feedrate.
-
Rem Rem VBScript To probe In the z axis 'Written by Big-Tex May 23 2010
If GetOemLED(801) Then 'NOTE: This part of script is for Inches as Native Units
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Else
Code "G4 P1" 'Pause 1 seconds to give time to position probe plate
PlateOffset = GetUserDRO(1151) 'Get plate offset DRO
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F12" 'slow down feedrate to 12 ipm
Rem Probe In the z direction
ZNew = GetDro(2) - 6 'probe move to current z - 6 inches
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew +.1 'move back +.1 to hit point incase there was overshoot +.1
While IsMoving ()
Wend
Rem End add lines
Code "F4" 'slow down feedrate to 4 ipm
ZNew = GetDro(2) - .25 'probe move to current z - .25 inches
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
While IsMoving ()
Wend
If PlateOffset <> 0 Then
Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
ZNew = PlateOffset + 2.6315 'calc retract
Code "G0 Z" &ZNew 'put the Z retract height you want here
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
End If
Code "F" &CurrentFeed 'Returns to prior feed rate
End If
Else 'NOTE: This portion of script is for Metric as Native Units
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Else
Code "G4 P1" 'Pause 1 seconds to give time to position probe plate
PlateOffset = GetUserDRO(1151) 'Get plate offset DRO
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F300" 'slow down feedrate to 300 mmpm
Rem Probe In the z direction
ZNew = GetDro(2) - 150 'probe move to current z - 150 mm
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew + 3 'move back + 3 mm to hit point incase there was overshoot + 3 mm
While IsMoving ()
Wend
Rem End add lines
Code "F100" 'slow down feedrate to 100 mmpm
ZNew = GetDro(2) - 6 'probe move to current z - 6 mm
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew 'move back to hit point incase there was overshoot
While IsMoving ()
Wend
If PlateOffset <> 0 Then
Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
ZNew = PlateOffset + 60 'calc retract
Code "G0 Z" &ZNew 'put the Z retract height you want here
While IsMoving ()
Wend
Code "(Z axis is now zeroed in metric Units)" 'puts this message in the status bar
End If
Code "F" &CurrentFeed 'Returns to prior feed rate
End If
End If
Now` that is about most of the code this line is setting feedrate to previous tool path
Code "F" &CurrentFeed 'Returns to prior feed rate
Now I know where its coming from
Now Gerry
you say to change to GO
Code"G00 X" & x & "Y" & y ******* OR just returns at Rapid
Code"G0 X" & x & "Y" & y ******* OR just returns at Rapid
Is that right?