Hello Guest it is May 04, 2024, 06:30:39 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 - birillo1959

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »
101
VB and the development of wizards / Re: Auto corner finding problem
« on: April 29, 2018, 08:24:11 AM »
thanks for the reply Gr21
use mach3 Version R3.043.062 port lpt

102
VB and the development of wizards / Auto corner finding problem
« on: April 29, 2018, 07:27:43 AM »
Good morning
I have a problem with the following script
if I cast Y-Y + X-X + everything works fine instead for the corner search gives me problems
1 press the corner button
2 part and touch the z-
3 rises, moves for probing in x +
4 goes down
at this point it crashes and I get out the words "Probe plate is grounded, check and try again" I state that if I run the script from the window works well, I have done many tests I can not get over it.
Ps: the problem and with all 4 corners

Rem   Auto corner finding X-Y+Z-(button4) With tool diameter Input Metric Version

   Speak (" CONFERMARE RICERCA ANGOLO INFERIORE DESTRO") 'Avviso Vocale
Message "INIZIO RICERCA ANGOLO"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE RICERCA ANGOLO")

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
CurrentToolDiameter = GetOemDRO(1000) 'gets the current tool diameter

If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
   Call ProbeGrounded()
   Exit Sub
Else
   DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
   Code "G4 P2" ' two second delay
   Code "G90 G31 Z-25 F100" 'Z goes down a max of 25mm at 100mm/sec
   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,0.000)
   Code "G4 P0.25" 'Pause for Dro to update.
   Code "G90 G0 Z15" 'retract Z to 15mm
   Code "G91 G0 Y3 X25"
   Code "G90 G0 Z-5"
   Code "F" &CurrentFeed 'Returns to prior feed rate
End If

Rem   VBScript For probing In the x- direction

If GetOemLed (825)<>0 Then    'May need to use =0 if it errors
   Call ProbeGrounded()    'Check to see if the probe is already grounded or faulty
   Exit Sub
Else
   Code "G4 P1"         'Pause 1 second to give time to position probe plate

   CurrentFeed = GetOemDRO(818)    'Get the current feedrate to return to later
   Code "F100"

Rem   Probe Left

   XNew = GetDro(0) - 75      'probe to current position - 75mm
   Code "G31 X" &XNew
   While IsMoving()      'wait for prob move to complete
   Wend
   XNew = GetVar(2000)      'read the touch point

Rem   move back To the hit point incase there was an overshoot

   Code "G90 G0 Z15"
   Code "G90 G0 X" &XNew
   Code "G91 X-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
       
   
   While IsMoving ()
   Wend
        Call SetDro (0,0.000)
        Code "G4 P0.25"
        Code "G91 G0 X-5 Y-25"
        Code "G90 G0 Z-5"
   Code "F" &CurrentFeed       'restore original feed rate
End If

Rem   VBScript For probing In the Y+ direction

If GetOemLed (825) <> 0 Then       'Check to see if the probe is already grounded or faulty
   Call ProbeGrounded()
   Exit Sub
Else
   Code "G4 P1"         'Pause 1 second to give time to position probe plate

   CurrentFeed = GetOemDRO(818)    'Get the current feedrate to return to later
   Code "F100"         'Slow feedrate to 100mm

Rem   Probe up

   YNew = GetDro(1) + 75      'move to current y position + 75mm
   Code "G31 Y" &YNew
   While IsMoving()      'wait for the move to finish
   Wend
   YNew = GetVar(2001)      'read the touch point

Rem   move back To the hit point incase there was an overshoot
   
        Code "G90 G0 Z15"
   Code "G90 G0 Y" &YNew
        Code "G91 Y" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge

   While IsMoving ()
   Wend
        Call SetDro (1,0.000)
        Code "G4 P0.25"
        Code "G90 G0 X0.0"
   Code "F" &CurrentFeed       'restore original feed rate
        Code "(X, Y, and Z axis' are now zeroed)"
        Call ReturnG90G91State()
        Exit Sub
End If

   
Sub ProbeGrounded()
   Code "(Probe plate is grounded, check connection and try again)"
   Call ReturnG90G91State()
End Sub

Sub ReturnG90G91State()
   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
End Sub


103
VB and the development of wizards / Re: trigonometry center
« on: April 23, 2018, 09:35:48 AM »
good morning
thanks Tweakie.CNC for the help. I managed to make it work the problem was mine
I wanted to ask you at the end of the macro inverts the axis (X = y Y = x) and you can modify it? for what I need in the gcode I had to change X with Y, and Y with X. I hope I explained myself.
regards

104
VB and the development of wizards / trigonometry center
« on: April 23, 2018, 06:12:22 AM »
good morning
I downloaded from the site http://www.tweakie.byethost10.com/17.htm
the following script, I have a problem: do not respect me corner, use mm maybe it's the problem? is it possible to modify it?
THANK YOU

Button A script;

 

  Call SetUserLed(1102,1) 'open Klaus's video window

  Call SetOemDRO(118,0) 'reset system rotate DRO

  Code "(Locate Datum then click Button B)" 'message for status bar

  Call SetOemDRO(3,1) 'set slow jog rate to 1%





Button B script;

 

  DoOEMButton (1008) 'zero X axis DRO

  DoOEMButton (1009) 'zero Y axis DRO

  Code "(Locate Reference then click Button C)" 'message for status bar



Button C script;

 

  Sub Main()

  Call SetUserLed(1103,1) 'close Klaus's video window

  X1pos = GetOemDRO(800) 'read x axis DRO

  Y1pos = GetOemDRO(801) 'read y axis DRO

  If (Y1pos=0) Then GoTo Label1 'avoid divide by zero error

  b = Atn(X1pos/Y1pos)*(180/(4*Atn(1))) 'calculate angle

  b = b - (b*2) 'change sign (+/-)

  Code "G0 X0 Y0" 'move to datum

  While IsMoving () 'wait for task to be completed

  Wend

  Xmove = 70.850 'enter your camera offset here

  Ymove = 1.070 'enter your camera offset here

  Code "G91 G0 X" &Xmove & "Y" &Ymove 'make incremental move

  While IsMoving () 'wait while that happens

  Wend

  Code "G90" 'go back to absolute moves

  Call SetOemDRO(118,b) 'set system rotate DRO

  Label1:

  DoOEMButton (1008) 'zero X axis DRO

  DoOEMButton (1009) 'zero Y axis DRO

  Call SetOemDRO(3,80) 'reset jog rate to 80%

  Code "(Process complete)" 'message for status bar

  End Sub

105
VB and the development of wizards / Re: macro tube center modification
« on: April 23, 2018, 03:07:49 AM »
Good morning
thanks TPS (as always very kind) for the answer
I inserted the line after "measuredY = B-A"
works well

THANKS AGAIN !!

106
VB and the development of wizards / macro tube center modification
« on: April 21, 2018, 05:51:44 AM »
Good morning
I have the following script for center hole I would like to make some changes
1 at the end gives me the diameter of the hole without the diameter of the probe (5mm).
the diameter of the probe imposed in the DRO oem code function 1000
the final diameter is displayed in the DRO oem code function 1152

Speak ("ricerca centro pezzointerno") 'Avviso Vocale
Message "RICERCA CENTRO PEZZO INTERNO"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE RICERCA CENTRO PEZZO INTERNO")

Sleep (1000) ' pausa di 1 secondi
Speak (" CONFERMARE centro pezzo interno") 'Avviso Vocale
Message "INIZIO CENTRO PEZZO INTERNO"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE CENTRO PEZZO INTERNO")


   
   Call SetDRO(0,0)
   Call SetDRO(1,0)
   Xpos = GetParam("XDRO")
   Ypos = GetParam("YDRO")
   Fcurr = GetParam("FeedRate")
   SP = 80 ' avanzamento prima palp impostare diametro mm del cerchio da palpare
   VSP = "F200" ' velocita avanzamento prima palp
   bkSP = 3 ' ritorno dopo palp mm
   VbkSP = "F240" ' velocita ritorno
   Spp = 5 ' avanzamento seconda palp mm
   VSpp = "F40" ' velocita seconda palp
   
   Code "G31 X" & (GetParam("XDRO")+SP) & (VSP)
   While IsMoving()
   Wend
   
   Code "G0 X" & (GetParam("XDRO")-bkSP) & (VbkSP)
   While IsMoving()
   Wend
   
   Code "G31 X" & (GetParam("XDRO")+Spp) & VSpp
   While IsMoving()
   Wend
   
   B=GetParam("XDRO")
   
   Code "G0 X" & Xpos
   
   Code "G31 X" & (GetParam("XDRO")-SP) & (VSP)
   While IsMoving()
   Wend
   
   Code "G0 X" & (GetParam("XDRO")+bkSP) & (VbkSP)
   While IsMoving()
   Wend
   
   Code "G31 X" & (GetParam("XDRO")-Spp) & VSpp
   While IsMoving()
   Wend
   
   A=GetParam("XDRO")
   
   measuredX = B-A
   
   Code "G0 X" & (A+(B-A)/2)
   While IsMoving()
   Wend
   
   Code "G31 Y" & (GetParam("YDRO")+SP) & (VSP)
   While IsMoving()
   Wend
   
   Code "G0 Y" & (GetParam("YDRO")-bkSP) & (VbkSP)
   While IsMoving()
   Wend
   
   Code "G31 Y" & (GetParam("YDRO")+Spp) & VSpp
   While IsMoving()
   Wend
   
   B=GetParam("YDRO")
   
   Code "G0 Y" & Ypos
   
   Code "G31 Y" & (GetParam("YDRO")-SP) & (VSP)
   While IsMoving()
   Wend
   
   Code "G0 Y" & (GetParam("YDRO")+bkSP) & (VbkSP)
   While IsMoving()
   Wend
   
   Code "G31 Y" & (GetParam("YDRO")-Spp) & VSpp
   While IsMoving()
   Wend
   
   A=GetParam("YDRO")
   
   measuredY = B-A
   
   Code "G0 Y" & (A+(B-A)/2)
   SetParam("FeedRate",Fcurr)
   
   MsgBox (" Measurement X: " & nFmt(measuredX,3) & " mm  Measurement Y: " & nFmt(measuredY,3) & " mm")
   
   
   
   
      


       


107
VB and the development of wizards / Re: centerpiece full (change)
« on: April 08, 2018, 06:30:47 AM »
I did a search and "oemdro (1000)" is not used anywhere !!
thanks TPS for the help !!

108
VB and the development of wizards / Re: centerpiece full (change)
« on: April 08, 2018, 04:36:50 AM »
good morning
TPS, I documented (in my small) I solved by replacing OEM code fuction 221 with 1000 (I saw 1024.set) then in the macro I replaced:

CurrentToolDiameter = GetOemDRO (43) 'gets the current tool diameter

with

CurrentToolDiameter = (GetOEMDRO (1000) / 2) 'gets the current tool diameter

it works well, I wanted to ask you (of VB I do not understand almost anything !!) if it is done well or if it is dangerous.

109
VB and the development of wizards / Re: centerpiece full (change)
« on: April 07, 2018, 05:58:14 AM »
the switching is immediate, also tested with another probe, the change does not work.

110
VB and the development of wizards / Re: centerpiece full (change)
« on: April 07, 2018, 04:55:36 AM »
tried the macro, same problem maybe I have some wrong setting. when I use it I divide (: 2) the probe !! thanks for the patience TPS !!!

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »