Hello Guest it is April 20, 2024, 06:36:17 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.


Topics - Bob78218

Pages: 1
1
FAQs / Please Help
« on: March 07, 2014, 09:28:13 PM »
Need help with this code. Where how do I input the variables?

' Auto Tool Zero by Dale Walsh <dale@daleenterprise.com>

Dim Initial_Abs_Inc

Dim Initial_Feed_Rate

Dim Initial_G_State

Dim Initial_Machine_Coordinates_State

Dim Initial_Spindle_CW_State

Dim Initial_Spindle_CCW_State

Dim Initial_Spindle_State

Dim Initial_Tool_Offset_State

Dim Probing_Feed_Rate

Dim Guage_Block_Height

Dim Z_Probe_Pos

Initial_Feed_Rate = GetOEMDRO(818)

Initial_G_State = GetOEMDRO(819)

Initial_Machine_Coordinates_State = GetOEMLed(16)

Initial_Tool_Offset_State = GetOEMLED(28)

Initial_Abs_Inc = GetOEMDRO(48)

Guage_Block_Height = GetOEMDRO(1001)

If Guage_Block_Height <= 0 Then
   Answer = MsgBox("A positive value must be entered for the Guage Block Height", 0, "Oh-oh")
   Exit Sub
End If

If GetOEMDRO(824) <= 0 Then
   Answer = MsgBox("A Tool has not been selected, select a tool and try again.", 0, "Oh-oh")
   Exit Sub
End If

If IsSuchSignal(22) Then ' Check whether a probe input is defined..
   If GetOEMLed(825) = 0 Then

      Answer = MsgBox("Do you need to Move X, Y or Z ?", 4, "Do you need to Move")
      If Answer = 6 Then
         Message("Tool zeroing to Material was canceled so you can move.")
         Exit Sub
      End If

      Answer = MsgBox("Place Sensor on work piece.", 1, "Is the Guage Block Sensor in place")
      If Answer = 2 Then
         Message("Tool zeroing to Material was canceled.")
         Exit Sub
      End If

      Message("Tool zeroing to Material is requested.")

      ' Save settings for restoring later
      Initial_Spindle_State = GetOEMLED(11)
      Initial_Spindle_CW_State = GetOEMLED(164)
      Initial_Spindle_CCW_State = GetOEMLED(165)

      If Initial_Spindle_State = true Then  ' Spindle is running so stop it
         If Initial_Spindle_CW_State = Initial_Spindle_CCW_State Then
            MsgBox("Your running spindle is misconfigured -> clockwise = " &  Initial_Spindle_CW_State & " and counter-clockwise" &  Initial_Spindle_CCW_State & " , please fix this.")
            Exit Sub
         End If
         DoSpinStop()
         Sleep(500)
      End if

      ' Turn off Tool Offset if it's on
      Select Case Initial_Tool_Offset_State
         Case True
            DoOEMButton(136)
      End Select

      Select Case Initial_Machine_Coordinates_State
         Case True
            DoOEMButton(180)
      End Select

      '  Get current scale settings.
      XScale = GetOEMDRO(59)
      YScale = GetOEMDRO(60)
      ZScale = GetOEMDRO(61)

      '  Set scale to one to probe.
      Call SetOEMDRO(59, 1)
      Call SetOEMDRO(60, 1)
      Call SetOEMDRO(61, 1)

      Select Case GetOEMLED(802)
         Case true ' Metric System
            Probing_Feed_Rate = 150
            Probe_Travel = 250
         Case false ' Imperial System
            Probing_Feed_Rate = 6
            Probe_Travel = 10
      End Select

      DoOemButton(1010)
      Code "G4 P1"

      ' Perform the probe
      Code "G90 G31 Z-" & Probe_Travel & " F" & Probing_Feed_Rate
      While IsMoving()
      Wend

      Z_Probe_Pos = GetVar(2002)
      Code "G0 Z" &Z_Probe_Pos
      While IsMoving()
      Wend

      Call SetOemDRO(802 , Guage_Block_Height)
      Code "G4 P0.500"
      Code "G28"
      While IsMoving()
      Wend

      Message("Tool is now zeroed to Material.")

      ' Restore the original settings
      Code "F" &Initial_Feed_Rate

      Select Case Initial_Abs_Inc
         Case 0
            Code "G90"
         Case 1
            Code "G91"
      End Select

      Select Case Initial_G_State
         Case 0
            Code "G0"
         Case 1
            Code "G1"
      End Select

      Select Case Initial_Spindle_State
         Case True ' Spindle is running so stop it
            If Initial_Spindle_CW_State = true Then
               DoSpinCW()
            ElseIf Initial_Spindle_CCW_State = true Then
               DoSpinCCW()
            End If
      End Select

      ' Restore the original Tool Offset state
      Select Case Initial_Tool_Offset_State
         Case True
            DoOEMButton(136)
      End Select

      ' Restore original  Machine Coordinates State
      Select Case Initial_Machine_Coordinates_State
         Case True
            DoOEMButton(179)
      End Select

      Call SetOEMDRO(59, XScale)
      Call SetOEMDRO(60, YScale)
      Call SetOEMDRO(61, ZScale)

   Else
      '  Houston we have a problem
      Answer = MsgBox("Guage Height Block is grounded, check connections and try again", 0, "Oh-oh")
   End If
Else
   Answer = MsgBox("Probe input is not defined in Port and Pins config, configure and try again.", 0, "Oh-oh")
End If


Thanks
bob78218

2
General Mach Discussion / Need Help with combining 2 XML Files
« on: December 15, 2011, 06:20:46 PM »
I have a Chinese Mini Mill With a shot driver board. So I got me a Gecko G540.  But i don't know how to take the settings i need from one file to the other. Or to make a new file. can someone help with this?

Thanks
Bob

3
General Mach Discussion / New user
« on: April 22, 2011, 12:50:33 PM »
This my Chinese cnc

http://i276.photobucket.com/albums/kk15/hewittrj78218/CNC/df607af1.png
http://i276.photobucket.com/albums/kk15/hewittrj78218/CNC/db2cea9d.png
http://i276.photobucket.com/albums/kk15/hewittrj78218/CNC/71e8c9f6.png
http://i276.photobucket.com/albums/kk15/hewittrj78218/CNC/af4b4fe4.png
http://i276.photobucket.com/albums/kk15/hewittrj78218/CNC/eb54bc85.png

My computer
http://i276.photobucket.com/albums/kk15/hewittrj78218/CNC/b473a723.png

This cnc does not have a E-stop or limit switchs. I am going to add the following items from CNC4PC.

1 x A31 - Latch Twist-Release E-Stop Button
1 x C16 – PHOTO LIMIT & HOME BOARD
1 x A20 - 5VDC@3A Regulated Switching Power Supply
1 x C11 - Multifunction CNC Board
1 x BX1 - CNC Enclosure

Plus a touch plate. Any help on other mods?

Thanks
Bob78218


Pages: 1