Hello Guest it is May 07, 2024, 04:17:39 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 - TPS

191
i mean G54 is enabled before you do a toolchange with M6.

can't see what your toolchange function is doing because is in

Declare Function ChangeTool Lib ".\Plugins\NcEther-8ts" () As Integer

this lib.

G54 will allways effect your workcoordinates if there are offset's stored.

have a look to you fixtures, with offsets are in there for G54.

192
normaly toolchange is done with activated G54.

so first activate G54 then touch your surface with toolA and the do a toolchange to toolB

193
the code:

Code: [Select]
SetCurrentTool(newtool)

will set the toollength witch is in tooltable, and therefore your Z will be "corrected" with new toollength.

194
VB and the development of wizards / Re: macro correction
« on: September 15, 2022, 06:00:20 AM »
Code: [Select]
' CENTRO ASSE X INTERNO ESTERNO
Sub Main
Dim A As Double
Dim A1 As Double
Dim A2 As Double
Dim A3 As Double
Dim A4 As Double
Dim A5 As Double
Dim A6 As Double
Dim A7 As Double
Dim A9 As Double
Dim B As Double
Dim B1 As Double
Dim B2 As Double
Dim B3 As Double
Dim B4 As Double
Dim B5 As Double
Dim B6 As Double
Dim B7 As Double
Dim F As Double

Speak (" CENTRO ASSE x ") 'Avviso Vocale
Begin Dialog SelectCentering 240,80,140,225,"CENTRO ASSE X"
Picture 5, 65, 130, 130, "c:\mach3\addons\centri_scan_sondaggi\bitmaps\CENTRO ASSE X.BMP"
OKButton 15,203,50,14
CancelButton 70,203,50,14
GroupBox 5,10,130,50,"CENTRO ASSE X",.GroupBox1
OptionGroup .OptionGroup1
OptionButton 10,24,120,8,"-A-  CENTRO ASSE X INTERNO",.OptionButton1
OptionButton 10,38,120,8,"-B-  CENTRO ASSE X ESTERNO",.OptionButton2
End Dialog
Dim Dlg1 As SelectCentering
Button = Dialog (Dlg1)
 
If Button = 0 Then Exit Sub

Selected  = Dlg1.OptionGroup1

'centro asse x INTERNO @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
If Selected = 0 Then
Speak ("centro  interno ASSE x") 'Avviso Vocale

F1= GETOEMDRO(1111) ' leggi F di Spostamento
F2= GETOEMDRO(1014) ' leggi F di Avvicinamento
F3= GETOEMDRO(1003) ' leggi F di Accosto
F4= GETOEMDRO(1000) ' leggi diametro probe
   
Begin Dialog ButtonSample 280,270,100,30,"START SCANSIONE"
OKButton 10,8,40,14
CancelButton 50,8,40,14
End Dialog
Dim Dlg2 As ButtonSample
Button = Dialog (Dlg2)
   
If Button = 0 Then
MsgBox "SCANSIONE CANCELLATA!"
Speak ("scansione cancellata") 'Avviso Vocale
Exit Sub
End If

SetOEMDRO(1181,0)
Speak ("dro azzerati")
Sleep (500) ' pausa di 2 secondi
' TROVA CENTRO IN X
SETDRO(0,0) 'Azzera X
SETDRO(1,0) 'Azzera Y
code "g31x200" & "f" & F2 'muove verso x+
While isMoving()
Sleep (100)
Wend
A1= GETOEMDRO(800) ' legge il valore di X
A2= A1-2
code "g1x"& A2 & "f" & F2
code "g31x200" & "f" & F3 'muove verso x+
While isMoving()
Sleep (100)
Wend
A= GETOEMDRO(800) ' legge il valore di X
code "g1x0" & "F" & F1 'torna a X0
While isMoving()
Sleep (100)
Wend
code "g31x-200" & "f" & F2 'muove verso x+
While isMoving()
Sleep (100)
Wend
B1= GETOEMDRO(800) ' legge il valore di X
B2= B1+2
code "g1x" & B2 & "f" & F2
code "g31x-200" & "f" & F3 'muove verso x+
While isMoving()
Sleep (100)
Wend
B= GETOEMDRO(800) ' legge il valore di X
C= ((A+B)/2) ' trova la metà in X
code "g1 X" & C & "f" & F1 ' va alla metà in X
While isMoving()
Sleep (100)
Wend
Call SetUserDro (1181, A1 + A + F4)
E3= GetUserLED (1011)
If E3 = 0 Then
Speak ("centro  interno completato") 'Avviso Vocale
SETDRO(1,0) 'Azzera Y
SetDRO(0,0) 'Azzera X
Else
G= GETOEMDRO(1049) ' leggi offset X
G1= GETOEMDRO(1050) ' leggi offset Y
G2= GETOEMDRO(800) ' leggi coord X
G3= GETOEMDRO(801) ' leggi coord Y
G4= (G2)+(G) ' nuova coordonata in X
G5= (G3)+ (G1) ' nuova coordonata in Y
Code "G1 X" & G4 & "Y" & G5 & "F500"
While isMoving()
Sleep (100)
Wend
SETDRO(1,0) 'Azzera Y
SetDRO(0,0) 'Azzera X
End If
End If

   
'centro asse x ESTERNO selected @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    If Selected = 1 Then
Speak ("centro  esterno ASSE x") 'Avviso Vocale     
F1= GETOEMDRO(1111) ' leggi F di Spostamento
F2= GETOEMDRO(1014) ' leggi F di Avvicinamento
F3= GETOEMDRO(1003) ' leggi F di Accosto
F4= GETOEMDRO(1000) ' leggi DIAMETRO PROBE

Speak ("centro asse x pieno") 'Avviso Vocale
Begin Dialog ButtonSample1 280,270,100,30,"START SCANSIONE"
OKButton 10,8,40,14
CancelButton 50,8,40,14
End Dialog
Dim Dlg3 As ButtonSample1
Button = Dialog (Dlg3)
If Button = 0 Then
MsgBox "SCANSIONE CANCELLATA!"
Speak ("scansione cancellata") 'Avviso Vocale
Exit Sub
End If
Sleep (500) ' pausa di 2 secondi
SetOEMDRO(1181,0)   
Speak ("dro azzerati") 'Avviso Vocale
Sleep (500) ' pausa di 2 secondi
Speak ("inserire lunghezza asse x") 'Avviso Vocale
A=InputBox("INSERIRE LA LUNGHEZZA IN Y")
Speak ("confermare centro asse x pieno") 'Avviso Vocal
Tasto = MsgBox("CENTRO PIENO ASSE X" ,1+64, "CONFERMARE")
If Tasto <> 1 Then
Exit Sub
End If
A1=((A/2)+12)
SETDRO(0,0) ' azzera Z
code "g31z-50" & "f" & F2 'muove verso z-
While isMoving()
Sleep (100)
Wend
SETDRO(2,0) ' azzera Z
code "g1z3" & "f" & F1 'muove verso z+
While isMoving()
Sleep (100)
Wend
' TROVA CENTRO IN Y
SETDRO(0,0) 'Azzera Y
code "g1x-" & A1 & "f" & F1 'muove verso y-
While isMoving()
Sleep (100)
Wend
code "g1z-6" & "f" & F1 ' muove verso z-
While isMoving()
Sleep (100)
Wend
code "g31x200" & "F" & F2
While isMoving()
Sleep (100)
Wend
B1= GETOEMDRO(800) ' legge il valore di X
B2 = B1-2
code "g1x"& B2 & "f" & F2
While isMoving()
Sleep (100)
Wend
code "g31x200" & "f" & F3 'muove verso y+
While isMoving()
Sleep (100)
Wend
B3= GETOEMDRO(800) ' legge il valore di y
code "g1z4" & "f" & F1 ' alza in z
While isMoving()
Sleep (100)
Wend
code "g1x0" & "f" & F1 ' torna a y0
While isMoving()
Sleep (100)
Wend
code "g1x+" & A1 & "f" & F1 'muove verso y-
While isMoving()
Sleep (100)
Wend
code "g1z-6" & "f" & F1 ' muove verso z-
While isMoving()
Wend
code "g31x-200" & "F" & F2
While isMoving()
Sleep (100)
Wend
B4= GETOEMDRO(800) ' legge il valore di X
B5 = B4+2
code "g1x"& B5 & "f" & F2
While isMoving()
Sleep (100)
Wend
code "g31x-200" & "f" & F3 'muove verso y+
While isMoving()
Sleep (100)
Wend
B6= GETOEMDRO(800) ' legge il valore di y
code "g1z4" & "f" & F1 ' alza in z
B7= ((B3+B6)/2) ' trova la metà di Y
code "g1 x" & B7 & "f" & F1 ' va alla metà in x
While isMoving()
Sleep (100)
Wend
SETDRO(0,0) 'Azzera x
While isMoving()
Sleep (100)
Wend
Call SetUserDro (1181, B6+B6 -F4 )
E3= GetUserLED (1011)
If E3 = 0 Then
Speak ("centro asse x pieno completato") 'Avviso Vocale
SETDRO(1,0) 'Azzera Y
SetDRO(0,0) 'Azzera X
Else
G= GETOEMDRO(1049) ' leggi offset X
G1= GETOEMDRO(1050) ' leggi offset Y
G2= GETOEMDRO(800) ' leggi coord X
G3= GETOEMDRO(801) ' leggi coord Y
G4= (G2)+(G) ' nuova coordonata in X
G5= (G3)+ (G1) ' nuova coordonata in Y
Code "G1 x" & G5 & "F500"
While isMoving()
Sleep (100)
Wend
SETDRO(0,0) 'Azzera x
End If
End If
End Sub




195
General Mach Discussion / Re: Enable 2 pins via Mcode
« on: September 14, 2022, 07:33:16 AM »
you can only activate OutPuts one by one:

Code: [Select]
Activatesignal (Output5)
Activatesignal (Output6)

maybe your motioncontroller is able to handle it different.

196
German / Re: PWM 0-5 Volt in Mach3 umdrehen
« on: September 14, 2022, 07:29:16 AM »
Servus,

kurz und bündig gesagt: Nein.

Ich habe das bei mir mit einem Arduino Nano gelöst, da ich keinen anderen
Weg gefunden habe.

Gruß Tom

197
General Mach Discussion / Re: Help please
« on: August 23, 2022, 03:21:58 AM »
what is main menue -> help -> About Mach3 controller

showing?


198
German / Re: Mach3 nimmt G-Code nicht an
« on: August 05, 2022, 07:01:32 AM »
Servus,
ging nicht.

aus dem 'ä' habe ich dann 'ae' gemacht, schon ging es.
Du solltest grundsätzlich auf Umlaute und Sonderzeichen wie 'ß' im Dateinamen verzichten.

Gruß Tom

199
VB and the development of wizards / Re: position memorization
« on: August 05, 2022, 06:54:24 AM »
we had the same couple of day's ago:

Code: [Select]
Dim X,Y as Double
  Open "C:\Mach3\myFile.txt" For Output As #1
  X = GetDRO(0)
  Y = GetDRO(1)
  Print #1, nFmt(X,4)
  Print #1, nFmt(Y,4)
  Close #1

200
General Mach Discussion / Re: Start VB Script with button wired to input
« on: August 05, 2022, 06:16:49 AM »
the oemcode for the triggermacro is allways 301!
in my example it will allway run macro M334.M1S

within this macro you can select the oemtrigger via script:

Code: [Select]
If Oemtrigger(1) Then
     'do code for Oemtrigger1
End If

If Oemtrigger(2) Then
     'do code for Oemtrigger2
End If

'and so on