Hello Guest it is May 06, 2024, 01:45:21 PM

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 »
81
VB and the development of wizards / Re: macro external center piece
« on: December 29, 2020, 03:44:29 AM »
the modification works great !!!
if I don't ask too much is it possible to separate axes?
I mean having 2 macros, one for x axis (always x for full)
one for y axis (always for full)
I sincerely thank you for the help given

82
VB and the development of wizards / Re: macro external center piece
« on: December 29, 2020, 02:05:38 AM »
Good morning
by double touch I mean that once the probe touches the piece it moves backwards by 2mm and then slowly touches the piece for the second time obtaining the most accurate measurement
I hope I explained myself (translated with google)
thanks TPS

83
VB and the development of wizards / macro external center piece
« on: December 20, 2020, 04:53:27 AM »
Buongirno
I use this macro for full center piece (modified to my needs by TPS) I would like to make some changes:
add double tap as it is not in my capacity.
I thank those who can help me.

  Rem VBScript To center probe outside diameter Metric Version
 
 
 
 
Speak (" psizionarsi CINQUE millimetri sopra il pezzo") 'Avviso Vocale
response = MsgBox ("   5 mm    SOPRA IL PEZZO")


  Begin Dialog ButtonSample 250,200,120,60,"   CENTRO PEZZO PIENO ? "
   OKButton 12,20,40,14
   CancelButton 68,20,40,14
End Dialog

Dim Dlg2 As ButtonSample
Button = Dialog (Dlg2)
If Button = 0 Then
   MsgBox "CENTRO PEZZO CANCELLATO !"
    Speak ("     CENTRO        PEZZO      CANCELLATO") 'Avviso Vocale
   Exit Sub
End If




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

 Message "**** zero assi ****"
 
   DoOEMButton (1008) 'zero X
   DoOEMButton (1009) 'zero Y
   DoOEMButton (1010) 'zero Z
   Sleep (2000) ' pausa di 1 secondi   
Speak ("ZERO assi completato") 'Avviso Vocale


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

    XCurrent = GetDro(0)
    YCurrent = GetDro(1)
    OutsideDiameter = GetUserDRO(1152)

    Code "G4 P1" 'Pause 1 second to give time to position probe plate
    While IsMoving ()
    Wend
    Call SetDro (0,0.000)
    While IsMoving ()
    Wend
    Call SetDro (1,0.000)
    Code "F50" 'slow feed rate to 100mm/sec
    Code "G90 G0 X" &XNew + OutsideDiameter * .6
    Code "G91 G0 Z-10"

Rem Probe Left

    XNew = Xcurrent - 75
    Code "G31 X" &XNew
    While IsMoving() 'wait for the move to finish
    Wend
    XPos1 = GetVar(2000) 'get the probe touch location
    Code "G91 G0 X2"
    Code "G91 G0 Z10"
    Code "G90 G0 X" &XCurrent 'rapid move back to start point
    Code "G91 G0 X" &XCurrent - OutsideDiameter * .6
    Code "G91 G0 Z-10"

Rem Probe Right

    XNew = XCurrent + 75 'probe 75mm to right
    Code "G31 X" &XNew
    While IsMoving()
    Wend
    XPos2 = GetVar(2000)
    Code "G91 G0 X-2"
    Code "G91 G0 Z10"
    XCenter = (XPos1 + XPos2) / 2 'center is midway between XPos1 and XPos2
    Code "G90 G0 X" &XCenter 'rapid move to the x center location
    While IsMoving ()
    Wend
    Call SetDro (0,0.000)
    Code "G4 P0.25"
    Code "G90 G0 Y" &YNew - OutsideDiameter * .6
    Code "G91 G0 Z-10"

Rem Probe up

    YNew = YCurrent + 75
    Code "G31 Y" &YNew
    While IsMoving()
    Wend
    YPos1 = GetVar(2001)
    Code "G91 G0 Y-2"
    Code "G91 G0 Z10"
    Code "G90 G0 Y" &YCurrent
    Code "G91 G0 Y" &YCurrent + OutsideDiameter * .6
    Code "G91 G0 Z-10"

Rem Probe down

    YNew = YCurrent - 75
    Code "G31 Y" &YNew
    While IsMoving()
    Wend
    YPos2 = GetVar(2001)
    Code "G91 G0 Y2"
    Code "G91 G0 Z10"
    YCenter = (YPos1 + YPos2) / 2

Rem move To the center

    Code "G90 G0 Y" &YCenter
    While IsMoving ()
    Wend
    Call SetDro (1,0.000)
    While IsMoving ()
    Wend
    Call SetUserDro (1152,YPos2 - YPos1 - CurrentToolDiameter)

    Code "G4 P0.25"

    Code "F" &CurrentFeed 'restore starting feed rate
   Call ReturnG90G91State()
   Exit Sub
End If

84
VB and the development of wizards / post processor modification
« on: January 13, 2020, 05:38:11 AM »
good morning
I would like to insert in the gcode (saved by artcam) the date of creation of the file, example:
(FILE = clock)
date <--------------------------------------------
(MATERIAL MEASUREMENT) (X = 310.000, Y = 380.000, Z = 10.400)
  (3,000 mm Flat tool diam.)
%
G90
G49
M3 S15000
G0 X-1.097 Y-10.347 Z3.000
G1 Z-0.936 F1140
.........
I do not know if it is feasible, I ask for help from those who know more than me
the post processor that I use is the following:

;
; Fanuc G - Code 4-Axis rotary post processor
;
; Linear Y Axis is wrapped onto A rotary axis
;
; History
;
; Who When     What
; === ======== ========================================
; TM  04/07/95 Written
; BEM 06/08/96 Modified for Rotary Axis support
; BEM 19/06/00 Fixed
; BEM 03/02/00 Added description
; JVG 27/10/03 Modified for Mach2 controller, Wolverine3 or Elite6 machines
; JVG 12/12/03 Modified for Mach2 3axis machining
; JVG Feb 23 05 Small modifications with Bill P

DESCRIPTION = "Mach2 mm(*.txt)"
;
FILE_EXTENSION = "txt"
;
UNITS = MM
;
;
; Cariage return - line feed at end of each line
;
END_OF_LINE = "[13][10]"
;
; Block numbering
;
LINE_NUM_START     = 0
LINE_NUM_INCREMENT = 1
LINE_NUM_MAXIMUM   = 999999
;
; Set up default formating for variables
;
; Line numbering
FORMAT = [N|@|N|1.0]
; Spindle Speed
FORMAT = [S|@|S|1.0]
; Feed Rate
FORMAT = [F|#|F|1.0]
; Tool moves in x,y and z
FORMAT = [X|#|X|1.3]
FORMAT = [Y|#|Y|1.3]
FORMAT = [Z|#|Z|1.3]
; Home tool positions
FORMAT = [XH|@|X|1.3]
FORMAT = [YH|@|Y|1.3]
FORMAT = [ZH|@|Z|1.3]
;
; Set up program header
;
START = "(FILE=[FILENAME])"
START = "(MISURA MATERIALE) (X=[XSIZE], Y=[YSIZE], Z=[ZMATERIAL])"
START = " ([TOOLDESC])"
START = "%"
START = "G90"
;START = "G21"
; G20 = Use MM as unit value
START = "G49"
;START = "M6 T1"
; M6T1 = tool change via macros (commented out)
START = "M3 "
;START = "M7"
; M7 = turn misting coolant on (commented out)
;
; Program moves
;
FIRST_RAPID_RATE_MOVE  = "G0 [X] [Y] [Z]"
FIRST_FEED_RATE_MOVE   = "G1 [X] [Y] [Z] [F]"
FEED_RATE_MOVE         = "[X] [Y] [Z]"
;
; End of file
;
END = "G0[ZH]"
END = "[XH][YH]"
END = "M05"
END = "M30"
END = "%"


  I sincerely thank those who can help me
regards

85
Mach Screens / change color keys
« on: August 24, 2019, 04:20:34 AM »
good morning
Is it possible to change the color of the button when it is selected?
I would like to change it from blue to red
I thank those who can help me


86
VB and the development of wizards / Re: edit script
« on: May 16, 2019, 04:49:11 AM »
I made the recommended changes everything works great !!!!!!!
sincere thanks to TPS for your availability for the help given and for the problems solved
regards

87
VB and the development of wizards / Re: edit script
« on: May 16, 2019, 04:19:48 AM »
ok TPS
  I tried the change, it works fine
after choosing the values it asks me where to save triplet file
save and immediately part of the scan, for security you could put a confirmation start scan?

88
VB and the development of wizards / Re: edit script
« on: May 16, 2019, 03:03:28 AM »
bungiorno
thanks TPS for the help, I added the suggested changes:

Zmin = Question ("minimum value at which the probe drops:") the minimum value at which the probe drops, depends on the part to be probed and the length of the stylus
Zmax = Question ("altitude Z for the rapid movement of the X axis:") 'altitude Z for the rapid movement of the X axis when the scan reaches the bottom of Xmax and returns to Xiniz
Xmax = Question ("upper right corner end scan x max:") 'upper right corner end scan
Ymax = Question ("upper right corner end scan Ymax:") 'upper right corner end scan
StepZsu = Question ("movement in Z + when the probe touches Z high:") 'step shift in Z + when the probe touches
StepX = Question ("resolution of the scnsione X:") resolution of the scansione, for Y any value can be put, for X the maximum stroke of the stylus must not be exceeded
StepY = Question ("resolution of the Y scnsione:") resolution of the scnsione, for Y any value can be put, for X the maximum stroke of the stylus must not be exceeded
AvanzZgiu = Question ("Z 'axis descent speed-:")' speed for the relative axes
Advance Zsu = Question ("Z + axis climb speed:") 'speed for the relative axes
AvanzX = Question ("X-axis speed:") 'speed for the relative axes
AvanzY = Question ("velocity Y axis:") velocity for the relative axes
Xiniz = Question ("bottom corner X:") 'bottom left corner start of scan
Yiniz = Question ("bottom angle Y:") 'bottom left corner start of scan


seems to work well, as I repeat programming I understand little, I ask you how I did okay?
I thank you for the help given
regards

89
VB and the development of wizards / edit script
« on: May 15, 2019, 06:38:03 AM »
good morning
I found the following macro for tracer points on the net,
I would like to modify it, if possible, in the following way:
when I click on the button a menu should come where I set the parameters:
Zmin = -20
Zmax = 20
Xmax = 5
Ymax = 5
StepZsu = 5
StepX = 1
Stepy = 1
AvanzZgiu = 200
AvanzZsu = 1000
AvanzX = 1000
AvanzY = 1000
Xiniz = 0
Yiniz = 0
I don't know if it's a feasible thing, given that I'm not capable of VB programming.
I thank those who could help me
ps I apologize for English use google translator

'da fare attenzione al valore StepX
'quando lo stilo tocca il pezzo durante la discesa si ferma e vengono registrate le coordinate nel file, poi risale del valore 'StepZsu e se il contatto si chiude, si sposta verso X+ del valore inserito in StepX
'se durante lo spostamento in X lo stilo tocca la macchina non si ferma, viene comunque fatto tutto lo spostamento pari a StepX, 'quindi il valore da mettere non deve essere maggiore della corsa massima dello stilo lungo l'asse X




' Macro scansione con tastatore 3D
' partenza scansione da Xiniz Yiniz Z0
' altezza max pezzo = Z0
' spostamenti in rapido a Zmax
' scansione da X0 a Xmax


Rem TASTATURA 3D
Speak ("PRIMA DI INIZIARE IMPOSTARE VALORI") 'Avviso Vocale
Speak ("confermare TASTATURA 3D") 'Avviso Vocale
Message "************  INIZIO TASTATURA 3D ************"
Sleep (1000) ' pausa di 1 secondi
response = MsgBox ("CONFERMARE TASTATURA 3D")



Zmin=-20 'valore minimo a cui scende la sonda, dipende dal pezzo da tastare e dalla lunghezza dello stilo
Zmax=20 'quota Z per lo spostamento in rapido dell'asse X quando la scansione arriva in fondo a Xmax e torna a Xiniz
Xmax=5 'angolo superiore destro fine scansione
Ymax=5 'angolo superiore destro fine scansione
StepZsu=5 'step spostamento in Z+ quando la sonda tocca
StepX=1 'risoluzione della scnsione, per Y può essere messo qualunque valore, per X non bisogna superare la corsa massimo dello stilo
StepY=1 'risoluzione della scnsione, per Y può essere messo qualunque valore, per X non bisogna superare la corsa massimo dello stilo
AvanzZgiu=200 'velocità per i relativi assi
AvanzZsu=1000 'velocità per i relativi assi
AvanzX=1000 'velocità per i relativi assi
AvanzY=1000 'velocità per i relativi assi
Xiniz=0 'angolo inferiore sinistro inizio scansione
Yiniz=0 'angolo inferiore sinistro inizio scansione

Code "G17 G21 G90"
Code "G1 Z" & Zmax & "F" & AvanzZsu
Code "G1 X" & Xiniz & "Y" & Yiniz & "F" & AvanzY
Code "G1 Z0 F" & AvanzZgiu
OpenDigFile()

Label0:
   Code "G31 Z" & Zmin & "F" & AvanzZgiu   ' Avvia scansione fino a Zmin
   While IsMoving()            ' Aspetto mentre si muove
   Wend

Label1:
   Code "G91"
   Code "G1 Z" & StepZsu & "F" & AvanzZsu   ' Salita Z dopo contatto tastatore
   While IsMoving()            ' Aspetto mentre si muove
   Wend
   Code "G90"
   If GetOemLed (825)<>0 Then         ' verifica se tastatore attivo
      GoTo Label1
   End If
Label3:
   Code "G91"
   Code "G1 X" & StepX & "F" & AvanzX
   While IsMoving()            ' Aspetto mentre si muove
   Wend
   Code "G90"

   If GetOemLed (825)<>0 Then         ' verifica se tastatore attivo
      Code "G91"
      Code "G1 X-" & StepX & "F" & AvanzX
      While IsMoving()            ' Aspetto mentre si muove
      Wend
      Code "G1 Z" & StepZsu & "F" & AvanzZsu
      While IsMoving()            ' Aspetto mentre si muove
      Wend
      Code "G90"
      'If Zdro < Zmax Then
      If GetVar(2002) < Zmax Then
         GoTo Label3
         Else
         If GetOemLed (825)<>0 Then      ' verifica se tastatore attivo
            MachMsg("Errore, asse Z max superato","ERRORE",0)
            End
         Else
            GoTo Label3
         End If
      End If
   Else
      'If Xdro < Xmax Then
      If GetVar(2000) < Xmax Then
         GoTo Label0
      End If
      Code "G0 Z" & Zmax
      While IsMoving()            ' Aspetto mentre si muove
      Wend
      Code "G0 X" & Xiniz
      While IsMoving()            ' Aspetto mentre si muove
      Wend
      Code "G91"
      Code "G1 Y" & StepY & "F" & AvanzY
      While IsMoving()            ' Aspetto mentre si muove
      Wend
      Code "G90"
      'If Ydro > Ymax Then
      If GetVar(2001) > Ymax Then
         End
      Else
         GoTo Label0
      End If
   End If


90
VB and the development of wizards / REFF ALL HOME 2 SCRIPT
« on: December 23, 2018, 07:18:56 AM »
Good morning
I have the following script for "REFF ALL HOME" modified a window two buttons "NORMAL and FAST" (I had the TPS user had me) the normal part works fine.
what I would like to change is the fast part:
1) the "Z" rises to the origin
2) "X and Y" at the same time
I state that I have no skills with VB, I thank those who can help me
GOOD HOLIDAYS TO EVERYONE!

Sub Main
 Begin Dialog SelectCentering 350,145,125,96,"REFF ALL HOME"
   OKButton 20,68,40,14
   CancelButton 70,68,40,14
   GroupBox 30,5,72,52,"REFF ALL HOME",.GroupBox1
   OptionGroup .OptionGroup1
   OptionButton 46,24,54,8," NORMALE",.OptionButton1
   OptionButton 46,40,54,8," VELOCE"  ,.OptionButton2
  End Dialog

  Dim Dlg1 As SelectCentering
  Button = Dialog (Dlg1)
 
  If Button = 0 Then Exit Sub
  Selected  = Dlg1.OptionGroup1

  'NORMALE is selected ********************************************************************
  If Selected = 0 Then '*****************************************************************

Speak ("  zero   macchina") 'Avviso Vocale
   Message "************   ZERO MACCHINA ************"
   Sleep (1000) ' pausa di 1 secondi
   
   DoButton(24)
   RefCombination(3)
   'DoButton(23)
   'DoButton(22)
   'DoButton(25)
   While IsMoving()
   Sleep(100)
   Wend
   SetParam("XRefPer", GetParam("XRefPer")/15)
   SetParam("YRefPer", GetParam("YRefPer")/15)
   SetParam("ZRefPer", GetParam("ZRefPer")/15)
   'SetParam("ARefPer", GetParam("ARefPer")/15)
   DoButton(24)
   RefCombination(3)
   'DoButton(23)
   'DoButton(22)
   'DoButton(25)
   While IsMoving()
   Sleep(100)
   Wend
   SetParam("XRefPer", GetParam("XRefPer")*15)
   SetParam("YRefPer", GetParam("YRefPer")*15)
   SetParam("ZRefPer", GetParam("ZRefPer")*15)
   'SetParam("ARefPer", GetParam("ARefPer")*15)
   Speak ("zero macchina completato") 'Avviso Vocale


 
  End If '********************************************************************************
 
  'VELOCE is selected ***********************************************************************
  If Selected = 1 Then '******************************************************************
 
     Speak ("  zero   macchina  veloce") 'Avviso Vocale
Message "***   ZERO MACCHINA VELOCE   ***"
   Sleep (1000) ' pausa di 1 secondi
   
   RefCombination(7)
   'RefCombination(15)
   
   Sleep(300)
   'While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true) Or (GetOemLed(810) = true))
   While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true))
   Sleep(50)
   Wend
   
   SetParam("XRefPer", GetParam("XRefPer")/15)
   SetParam("YRefPer", GetParam("YRefPer")/15)
   SetParam("ZRefPer", GetParam("ZRefPer")/15)
   'SetParam("ARefPer", GetParam("ARefPer")/15)
   
   RefCombination(7)
   'RefCombination(15)
   
   Sleep(300)
   'While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true) Or (GetOemLed(809) = true))
   While ((GetOemLed(807) = true) Or (GetOemLed(808) = true) Or (GetOemLed(809) = true))
   Sleep(50)
   Wend
   
   SetParam("XRefPer", GetParam("XRefPer")*15)
   SetParam("YRefPer", GetParam("YRefPer")*15)
   SetParam("ZRefPer", GetParam("ZRefPer")*15)
   'SetParam("ARefPer", GetParam("ARefPer")*15)
   
   Speak ("ZERO MACCHINA VELOCE COMPLETATO") 'Avviso Vocale

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