Hello Guest it is April 26, 2024, 06:28:18 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Adam_M

Pages: « 1 2 3 4 5 6 7 8 »
51
General Mach Discussion / Re: BigTexBlue Screen.. modify gcode?
« on: November 20, 2014, 07:05:50 AM »
So let me see if I understand how this is working...

         **********************************************************************************************************************************
Code: [Select]
        ZNew = GetDro(2) - 6       'Reads the current Z from the DRO(2) or "DRO Z" and subtracts 6" from it. This is the range to search for the touch off plate
         Code "G31Z" &ZNew 'Starts the probe headed towards -Z from the current Z
         While IsMoving()       'wait for probe move to finish
         Wend
  
         ZNew = GetVar(2002)     'Found the touch point and set a variable GetVar(2002) to that touch point called ZNew
         Code "G0 Z" &ZNew +.1          'move Z to ZNew + 1"
         While IsMoving ()                      'wait for the process to take place
         Wend
         Code "F2"         'slow down feed rate to 2 ipm
         ZNew = GetDro(2) - .25              'Set variable ZNew = the current Z read from DRO(2) or "DRO Z" and subtracts .25" from it.  
                                                'Would this make more sense to be the same as above, ZNew = GetDro(2) - 6 or at least greater than 1" to offset the 1" added to Z from above???

         Code "G31Z" &ZNew                      'Start another probe headed towards -Z from the current "DRO Z" that has been increased by 1" going -.25
         While IsMoving()     'wait for the process to take place
         Wend

         ZNew = GetVar(2002)       'Found the touch point and set a variable GetVar(2002) to that touch point called ZNew
         Code "G0 Z" &ZNew       'Move to GetDro(2) - .25, This should be Z zero I think????
         While IsMoving ()                      'wait for the process to take place
         Wend


52
General Mach Discussion / Re: BigTexBlue Screen.. modify gcode?
« on: November 19, 2014, 09:37:15 AM »
Thanks Gerry,

Quote
This is a second, slower probe move. DRO(2) is the current Z position, so it's probing down .25".

Yes, exactly as I interpreted it. The problem is the Z axis is going up instead of down... which is why I'm confused???

Quote
Also, make sure your in Absolute Mode (G90) when you run this macro, or you'll also get strange results.

Can you tell me how to make sure I'm in the Absolute Mode (G90)?

Adam,

53
General Mach Discussion / Re: BigTexBlue Screen.. modify gcode?
« on: November 18, 2014, 10:38:44 PM »
I'm trying to work through a problem with the Macro in Big Texas' Blue screen... it seems like the math is not calculating correctly. I'll try to explain what's happening..

I have set my plate offset to +.0625, I believe this is DRO(2), my settings are in inches.

In an attempt to Zero my "Z" axis after the initial touch off my "Z" jumps an inch "+" as it should but instead of heading back to the plate moving towards "-" or the touch-off plate it heads towards the "+" side. In stepping through the code associated with the "Z-" button on the screen the math seems to be incorrectly calculated and I'm uncertain as to why?

I stepped through the code and in this section ZNew was set to (.444...) it then bumps an inch towards the "+".

Quote
ZNew = GetVar(2002)          'read the touch point   (current setting .444...)
Code "G0 Z" &ZNew +.1      'move back  +.1 to hit point in case there was overshoot +.1
While IsMoving ()
Wend

Then it gets to this part and sets ZNew to (.77....)  which I don't understand, why is ZNew increasing and not decreasing ?? The feed rate decreases as it should but instead of heading towards the touch-off plate it's going the opposite direction, I'm confused.  ???

Quote
      
Code "F2"                          'slow down feedrate to 2 ipm
ZNew = GetDro(2) - .25      'probe move to current z - .25 inches  (current setting .77...)
Code "G31Z" &ZNew


Adam,


************************************************************************

Total Code

Quote
Rem   VBScript To probe In the z axis    


If GetOemLED(16)<>0 Then 'Checks for machine coordinates
        code "(Please change to working coordinates)"
Else


   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 "F10"         'slow down feedrate to 10 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   
      Rem .444 - .25 = .77***
      Code "F2"         'slow down feedrate to 2 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 + 3.6315   'calc retract
         'Code "G0 Z" &ZNew       'put the Z retract height you want here
         Code("G53G0Z-0.5")      'Z retract

         While IsMoving ()
         Wend
         Code "(Z axis is now zeroed in English Units)"    'puts this message in the status bar
      
      End If

      Code "F" &CurrentFeed       'returns to prior feed rate
   End If
End If         

 

54
General Mach Discussion / Re: BigTexBlue Screen.. modify gcode?
« on: November 01, 2014, 06:53:18 PM »
Ah, thanks Hood.. that should get me started.

Adam,

55
General Mach Discussion / BigTexBlue Screen.. modify gcode?
« on: November 01, 2014, 11:25:28 AM »
I'm pretty new to Mach and GCode so go easy on me please..

I'm trying to utilize BigTex's BlueScreen's Auto tool zero and I see that it says that it zeroed in "Metric" when I ran it.

I have 2 questions:

1) How do I edit the GCode in Bigtex's screen for the speed in which it auto zero's, etc.?

2) If I can't edit the GCode can I change it to inches?

Thanks,

56
General Mach Discussion / Re: How to - code manual tool change?
« on: October 24, 2014, 07:32:29 AM »
So, MachScreen shows 1200,1201 and 1202 as User defined on the overview and are located on page 6 on the 1024.set.

When I go to view design on page 6 I see the "Tool Change Location" boxes but when I click on them it doesn't show the code just a box opens with DRO "139" not with 1200,1201 and 1202 DRO's, so I'm a little confused.

I thought they would have the 1200,1201 and 1202 in them?


57
General Mach Discussion / Re: How to - code manual tool change?
« on: October 23, 2014, 08:37:53 PM »
OK that makes more sense Gerry this is the tool probe...

Quote
Code "G90 G31 Z" &DownStroke &" F" &DownFeedRate 'probing move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
If Abs(ZprobePos) <= Abs(DownStroke)-0.1 Then 'Check if the probe has been found

I don't see the 1200,1201 and 1202 on the DRO wiki, are these established somewhere?

Quote
  'Get the tool change pos from the settings page
  ChangeX = GetOEMDRO(1200)
  ChangeY = GetOEMDRO(1201)
  ChangeZ = GetOEMDRO(1202)


Bob, I realize there is always someone willing to do something for money but it kind of the defeats the purpose of building your own cnc. I'll keep your suggestion in mind in case I can't manage to solve the puzzle, thanks.


58
General Mach Discussion / Re: How to - code manual tool change?
« on: October 23, 2014, 07:54:07 AM »
OK, things are coming together now...

So whats the purpose of setting the old tool again?

Quote
If (oldTool <>  tool) Then
SetOEMDRO(1212,tool)

I assume this depends on the job your running... and assuming you want the old tool settings restored?

This line I believe zero's Z to the touch plate.

Quote
Code "G0 Z" &ZProbePos

What determines the speed at which it does it?

Quote
Code "G31Z-5 F" &ProbeFeed

59
General Mach Discussion / Re: How to - code manual tool change?
« on: October 22, 2014, 11:08:17 PM »
Thanks Gerry.

What about the other items and where the numbers come from?

PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
ZProbePos = GetVar(2002) 'get the axact point the probe was hit

60
General Mach Discussion / Re: How to - code manual tool change?
« on: October 22, 2014, 05:46:06 PM »
Appreciate the posts.

I've been doing some digging around and I think I've found some macro's that I can add to the M6Start.mls but since I'm new to this I'm not 100% certain on where the functions are getting the represented information.

Hopefully the owners of the macro's won't mind me posting their work.

For instance, GetOemDRO(818) or GetOEMDRO(800) where does 818 and the 800 come from and how/where do I find it???

Do I need to save the current tool like in the last macro?

Why do you need to set the current tool? SetCurrentTool( tool )

Obviously this opens a can of questions from a greenie such as myself.

Adam,

 
Quote
Rem Auto Tool Zero Z- Metric Version
DownStroke = -25 'Set the down stroke to find probe
DownFeedRate = 100 'Set the down FeedRate
RetractStroke = 10 'Set the retract Stroke
RetractFeedRate = 300 'Set the retract FeedRate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31 Z" &DownStroke &" F" &DownFeedRate 'probing move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
If Abs(ZprobePos) <= Abs(DownStroke)-0.1 Then 'Check if the probe has been found
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z" &PlateThickness + RetractStroke &" F" &RetractFeedRate 'retract
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "G0 Z0" 'retract to start pos
While IsMoving ()
Wend
Code "(Z-Plate not found, check connection or stroke and try again)" 'puts this message in the status bar
End If
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If
Code "F" &CurrentFeed 'Returns to prior feed rate
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If
Exit Sub


Quote
Code("G0 Z35")
Code("G0 X0 Y-40")
tool = GetSelectedTool()
SetCurrentTool( tool )

PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-40 F500" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z25.4" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If


Quote
'M6 start macro with auto tool touch off

'M6Start.m1s
tool = GetselectedTool()
oldTool = GetOEMDRO(1212)
If (oldTool <>  tool) Then

Old_tool = GetCurrentTool()
New_Tool = GetSelectedTool()

 DoSpinStop()
 If getoemled(13) Then
   'coolant is on
   setuserled(1000,1)' set user led on
   Code "M9"
 Else
   'coolent is off
   setuserled(1000,0) ' set user led off
 End If

  'Get the tool change pos from the settings page
  ChangeX = GetOEMDRO(1200)
  ChangeY = GetOEMDRO(1201)
  ChangeZ = GetOEMDRO(1202)
 
  Code "G00 G54 Z.25"
  Code "G00 G53 X" & ChangeX & "Y" & ChangeY
  'Code "G00 G53 Z" & ChangeZ, You may want to use this.

 
     Response = MsgBox ( "Would you like to set your Z height automatically? If so, click OK", 1 )
     If Response = 1 Then
      CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
       PlateThickness =0.062
       ProbeFeed = 5


       Code "G90 F" &ProbeFeed

       If GetOemLed (825)=0 Then
       'Code "G4 P5" 'Time to get to the z-plate
       Code "G31Z-5 F" &ProbeFeed
       While IsMoving()
       Wend
       Code "G4 P0.25"
       ZProbePos = GetVar(2002)
       Code "G0 Z" &ZProbePos
       While IsMoving ()
       Wend
       Call SetDro (2, PlateThickness)
       Code "G4 P0.5" 'Pause for Dro to update.
       Code "G0 Z0.25" 'Change the Z retract height here
       Code "(Z axis is now zeroed)"
       Code "F" &CurrentFeed
       Else
       Code "(Z-Plate is grounded, check connection and try again)"
       Exit Sub
       End If
    End If   
  SetCurrentTool( tool )                                   
 
End If




This is the M6 End Macro

'M6End.m1s

tool = GetDRO(24)
oldTool = GetOEMDRO(1212)

If getuserled(1000) Then ' check user led
   'coolant was on
   Code "M8"
End If

If (oldTool <>  tool) Then
SetOEMDRO(1212,tool)

End If

Pages: « 1 2 3 4 5 6 7 8 »