Hello Guest it is March 19, 2024, 06:40:16 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 - TPS

1181
German / Re: Bauteil ausrichten
« on: July 10, 2019, 02:24:42 AM »
Hallo,
auf die Schnelle habe ich jetzt folgende OEMDRO'S gesehen:
(1055) 'delta der X-Punkte
(1056) 'delta der Y-Punkte
(1027) 'Durchmesser des Messtasters

Bedeutung siehe angehängtes Bild. Diese können natürlich auch durch feste Werte ersetzt werden.

Der Code ist so sicher nicht 1 zu 1 lauffähig, da ich einen CSMIO Controller habe, welche eine spezielle Routine für
da antasten benutzt.

Im Prinzip müssten folgende Funktionsaufrufe ersetzt bzw spezifisch für deine Hardware ersetzt werden:

Im Code wird mehrfach die Funktion Probe aufgerufen, ein Aufruf

Probe 100,0,0

macht ein Antasten in X für 100mm in positiver Richtung.

Probe 0,100,0 dann für Y

hinter dieser Funktion verbirgt sich vereinfacht gesagt ein G31 X100 F200, aber die Funktion mach auch
gleichzeitig ein zweifaches Antasten mit unterschiedlichen Geschwindigkeiten, um die Genauigkeit zu erhöhen.

Es ist natürlich immer die Frage, was, und vor allem wie genau (0.1 , 0.01 , 0.001) will ich antasten.
Ich taste mit einem Messtaster an, da ich mit meiner Maschine (Tongil TNV40 3,5t schwer) nicht mal eben
mit einem Fräser gegen das Werkstück fahren kann und will.

Die zweite Funktion welche im Code verwendet wird ist WaitForMove.

hier die Funktion:
Code: [Select]
'Bewegung abwarten
Sub WaitForMove (Check as Boolean)
While IsMoving()
'prüfen ob wir gegen das Bauteil fahren
If ((GetOEMLed(825) = True) and (Check = True)) Then
MSGBox "Probe während Positionierfahrt aktiv",vbOK + vbCritical ,"Fehler !"
DoButton(21)
End
End If
Sleep(5)
Wend
End Sub

die wartet im Prinzip nur bis die ausgelöste Bewegung beendet ist.
Man kann mit Übergabe True/False noch bestimmen, ob während der Bewegung der Probe Eingang geprüft wird,
um auf eine Kollision zu reagieren.

Der Code wird für eine nicht rechtwinkliges Teil nicht funktionieren.







1182
German / Re: Bauteil ausrichten
« on: July 09, 2019, 02:39:00 PM »
das ist meine Lösung für 4 Punkte, aber sehr spezifisch, dennoch sollte das Grundprinzip klar werden.

Code: [Select]
'Antasten Werkstück (gedreht)
Public Function TouchG()
Message "Antasten schraeges Bauteil"

'Parameter holen
X = GetUserDro (1055) 'delta der X-Punkte
Y = GetUserDro (1056) 'delta der Y-Punkte
CurrentToolDiameter = GetUserDro (1027)

'Parameter prüfen
If X = 0 Then
MSGBox "Delta X zu klein!",vbOK + vbCritical ,"Fehler !"
Exit function
End If
If Y = 0 Then
MSGBox "Delta Y zu klein!",vbOK + vbCritical ,"Fehler !"
Exit function
End If

'PI vorbesetzen -----------------------------------------------
pi=4*Atn(1)

'Koordinatendrehung ausschalten
Code "G69"
Sleep(200)

'X / Y auf null setzen
    Call SetDro (0,0)
    Call SetDro (1,0)
Sleep(200)

'die Y Seite vermessen

'P1 antasten
Probe 100,0,0
'Koordinaten P2
    X1 = GetVar(2000)
    Y1=0

'Vorposition P2 anfahren
Message("Vorposition P2 anfahren")
    Y2 = Y
    Code "G91 G1 X-" &X & "F1800"
WaitForMove(True)
    Code "G91 G1 Y" &Y2
WaitForMove(True)

'P2 antasten
Probe 100,0,0
'Koordinaten P2
    X2 = GetVar(2000)

    'die X Seite vermessen -----------------------------------------------

'Vorposition P3 anfahren
Message("Vorposition P3 anfahren")
X3 = X1 + (CurrentToolDiameter/2) + 10
    Code "G91 G1 X-" &X & "F1800"
WaitForMove(True)
    Code "G90 G1 Y-30"
WaitForMove(True)
    Code "G90 G1 X" &X3
WaitForMove(True)

'P3 antasten
Probe 0,100,0
'Koordinaten P3
    Y3 = GetVar(2001) 

'Vorposition P4 anfahren
Message("Vorposition P4 anfahren")
    X4 = X3 + X
    Code "G91 G1 Y-20 F1800"
WaitForMove(True)
    Code "G90 G1 X" &X4
WaitForMove(True)

'P4 antasten
Probe 0,100,0
'Koordinaten P4
    Y4 = GetVar(2001) 'get the probe touch location

'Z auffahren
Code "G91 G01 Y-0.2 F1800"
WaitForMove(True)
    Code "G91 G1 Z20"
WaitForMove(True)

'Brechnung
t1= (X4-X3)*(Y1-Y3)-(Y4-Y3)*(X1-X3)
b1= (Y4-Y3)*(X2-X1)-(X4-X3)*(Y2-Y1)
ua=t1/b1

'Nullpunkt berechnen
XH=X1+ua*(X2-X1) ' X Home  distance away
YH=Y1+ua*(Y2-Y1) ' Y Home  distance away

' Message("Koordinaten Nullpunkt : X " &XH &" Y " &YH)
' Sleep(200)


'Winkel aus der längeren Seite berechnen
If X>Y Then
'längere Seite=X
a=(Y4-Y3)
b=(X4-X3)
v=a/b
NewAngle=Atn(v)*(180/pi)
Else
'längere Seite=Y
a=(X2-X1)
b=(Y2-Y1)
v=b/a
NewAngle=Atn(v)*(180/pi)

If NewAngle > 0 Then
NewAngle=NewAngle-90
Else
NewAngle=NewAngle+90
End If
End If
' Message("Neuer Winkel : " &NewAngle )
' Sleep(200)

'zum neuen Nullpunkt fahren
'Winkel = errechneter Winkel + 45°
siWi = 2*Pi/360*(NewAngle+45)
hyWi = SQR((CurrentToolDiameter/2)*(CurrentToolDiameter/2)*2)

Dx = hyWi * Cos(siWi)
Dy = hyWi * Sin(siWi)
' Message("Koordinaten Berechnung : X " &Dx &" Y " &Dy)
' Sleep(200)

'Zu neuen Nullpunkt fahren
    Code "G90 G1 X" &XH+Dx & " Y" &YH+Dy
WaitForMove(True)

'neuen Nullpunkt setzen
    Call SetDro (0,0)
    Call SetDro (1,0)

'Koordinatendrehung setzen
    Call SetOemDro (118,NewAngle)

'Koordinaten ausgeben
' Message "X1 " &X1 &" Y1 " &Y1 & "   X2 " &X2 &" Y2 " &Y2 & "   X3 " &X3 &" Y3 " &Y3 & "   X4 " &X4 &" Y4 " &Y4

'wieder auf absolut stellen
Code "G90"
Message ""

End Function

1183
FAQs / Re: parallel port to serial
« on: July 09, 2019, 02:33:49 PM »
if you are on the "retrofit road" IHMO the first things are (before buying anything):

-figure out witch stepper Motors are mounted, to get a idea witch stepper Controllers will fit.
-figure out witch spindle is mounted, to get a idea witch Controller will fit.

SmoothStepper is not a bad idea, even i am not a fan of These 5v Controllers.

1184
FAQs / Re: parallel port to serial
« on: July 09, 2019, 02:41:29 AM »
after a while of searching on the net, it Looks like the machine has a standalone Controller, and the Serial Interface is
used for file Transfer (GCode or HPGL). But found no Information about the used protocol.

if the supplier is not able to give some documentation, it will be very hard maybe impossible to figure this out.

anyway it will not be "compatible" to Mach3/4.

the only way i see is to use the existing stepper's and do a "retrofit" with new stepper Controllers and external Motion
controler. plus an other new controler for the spindle.

1185
Tangent Corner / Re: It's a Dog thing.
« on: July 08, 2019, 02:00:59 PM »
it is allway's the Point of view.
a cat likes mouses raw, i don't like them well done.

1186
General Mach Discussion / Re: Plasma ignition and stop lag problem
« on: July 06, 2019, 06:59:30 AM »
if your run in Plasma mode with THC on, it will allways wait until torch on Signal Shows up.

1187
General Mach Discussion / Re: Crazy zero
« on: July 06, 2019, 03:04:59 AM »
from your code:

...
Z0.6
G28 G91 Z0.
G90
...

from Mach3 GCode help:
G28 should not be used in one line with G90/G91


Switch your machine ti single BLK mode and step through code to see where exactly the move up is initiated.




1188
General Mach Discussion / Re: Plasma ignition and stop lag problem
« on: July 06, 2019, 02:51:05 AM »
there is a G04 in your GCode witch causes the delay


...
Z1
Z0
M3
G4P1
G3X-0.8I-1.3J-50.4F2000
...

1189
General Mach Discussion / Re: Crazy zero
« on: July 06, 2019, 02:47:23 AM »
pls post your GCode.

1190
General Mach Discussion / Re: Work offset not remembered
« on: July 05, 2019, 02:15:47 AM »
you can put the following code into macropump, then the Offset will be saved every 60 seconds.

just make sure OEMDRO(1300) is not used

Code: [Select]
Const LastMsDRO = 1300 'DRO for data
Dim LastMs As Long

LastMs = GetUserDRO(LastMsDRO)
If LastMs > 6000 Then
LastMs = 0
'save the actual workoffset
Open "C:\Mach3\ActOffset.txt" For Output As #1 ' Open to write file.
'get the actual offset
wo = GetOEMDro(46)+53
Write #1, wo
Close #1
End If
LastMs = LastMs + 10
'save data
SetUserDRO(LastMsDRO,LastMs)