Hello Guest it is May 05, 2024, 07:46:18 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
General Mach Discussion / Re: turn manual tool change
« on: July 10, 2019, 02:59:12 PM »
you do not have to split anything. if you select Manual tool Change
first M6Start.M1s will be executed (after the M6T*********x) in GCode),
and if you press Start  M6End.M1S will be executed.

witch code has to be in M6Start or M6End depends on your machine/and/or how the toolchange will be done.

1182
General Mach Discussion / Re: Another Newbie Help
« on: July 10, 2019, 02:53:54 PM »
not realy sure what you mean with Setup coordinate System.

normaly you Zero X/Y to a lower left Corner of the raw part you whant to cut,
and Zero Z to the top of your surface, and then you can start to do simple cut's. 

1183
German / Re: Bauteil ausrichten
« on: July 10, 2019, 02:49:42 PM »
Du kannst Dir alle diese Funktionen einfach in ein file in c:\mach3\macros\dein profilname kopieren.

sagen wir mal das file heisst: ProbeFunktionen.M1S

dann machst Du einen Button mit VB Script.

hier wäre der Code für ein einfaches Antasten X+ 100mm

Code: [Select]
Sub Main()

Probe 100,0,0
end sub

#Expand <\..\..\macros\Dein Profilname\ProbeFunktionen>

der Vorteil der #Expand Anweisung liegt darin, das Du deine Funktionen "bündeln" kannst, um diese immer
wieder aus unterschiedlichen Situationen heraus aufrufen kannst, und, wenn Du einen Fehler behebst, ist dieser
für alle Aufrufe behoben.

OK momentan ist das alles vielleicht ein bisschen viel, aber im Laufe der Zeit wird es immer einfacher, und der
Vorteil der Bündelung von Funktionen wird deutlich klarer.

Gruß Tom



1184
German / Re: Bauteil ausrichten
« on: July 10, 2019, 02:41:21 PM »
ok ich habe die Funktion Probe mal allgemeingültig umgeschrieben:

Code: [Select]
'Antastfunktion
Public Function Probe(X as Double, Y as Double , Z as Double)
Dim axisreverse,axisprobe,probedist

'prüfen ob Probe bereits aktiv
If GetOEMLed(825) Then
MSGBox "Probe aktiv",vbOK + vbCritical ,"Fehler !"
DoButton(21)
End
End If
'Antasten immer mit Konturdrehung 0 Grad
Code "G69"


'Softwarelimits ggf. ausschalten
Dim SoftLimitswhereon As Boolean
If GetOEMLed(23) Then
DoOEMButton(119)
SoftLimitswhereon = True
Sleep(250)
End If


'Meldungen ausgeben
IF X > 0 Then
Message("Probe X+")
axisprobe = "X+"
axisreverse = "X-"
probedist = X
End if
IF X < 0 Then
Message("Probe X-")
axisprobe = "X-"
axisreverse = "X+"
probedist = X
End if
IF Y > 0 Then
Message("Probe Y+")
axisprobe = "Y+"
axisreverse = "Y-"
probedist = Y
End if
IF Y < 0 Then
Message("Probe Y-")
axisprobe = "Y-"
axisreverse = "Y+"
probedist = Y
End if
IF Z > 0 Then
Message("Probe Z+")
axisprobe = "Z+"
axisreverse = "Z-"
probedist = Z
End if
IF Z < 0 Then
Message("Probe Z-")
axisprobe = "Z-"
axisreverse = "Z+"
probedist = Z
End if
Sleep(200)


'1.Versuch
Message "1. Antastung"
Code "G31 " & axisprobe  & probedist & " F200"

While IsMoving()'warten bis Probe fertig
Sleep(20)
Wend

Message "Probe 1.Kontakt bei: " &GetVar(2000) &"," &GetVar(2001) &"," &GetVar(2002) &"," &GetOemDro(83) &"," &GetOemDro(84) &"," &GetOemDro(85)
Sleep(200)

'Probe freifahren
Message "Probe freifahren"
While GetOEMLed(825)
Code "G91 G01 " &axisreverse &"0.1 F600"
While IsMoving()'warten bis Probe fertig
Sleep(20)
Wend
Wend
Code "G90"

'2.Versuch
Message "2. Antastung"
Code "G31 " & axisprobe  & probedist & " F2"

While IsMoving()'warten bis Probe fertig
Sleep(20)
Wend

Message "Probe 2.Kontakt bei: " &GetVar(2000) &"," &GetVar(2001) &"," &GetVar(2002) &"," &GetOemDro(83) &"," &GetOemDro(84) &"," &GetOemDro(85)
Sleep(200)

'Softlimits ggf. wieder einschalten
If ((Not GetOEMLed(23)) And (SoftLimitswhereon = True)) Then
Sleep(500)
DoOEMButton(119)
End If

Message "Probe " &Left(axisprobe,1) &" erfolgreich."

End Function


aber bitte vorsichtig testen, da ich das nur runtergeschrieben habe, ohne (mangels Möglichkeit) es zu testen.

1185
General Mach Discussion / Re: Another Newbie Help
« on: July 10, 2019, 02:36:00 PM »
I have recently completed the CNC router which was in the WoodSmith magazine.  I am new to the CNC world, so please be patient with me.  I have the all the motors wired and the all three axis move.  I have tuned the motors (velocity, accelration, etc.).  Now, I'm kind of stuck.  What would be the next items I need to set-up before I actually try cutting something?  I am not using limit switches at this time, I was planning on using soft limits until I get a little more familiar with things.  Does anyone know of a tutorial than provides the chain of events you need to go through?

the next step would be to have control over the spindle (or you turn it manualy on/off ?)

for the first cut i allways do a simple circle, Sounds easy, but a circle tell's you everything about your machine.
why will be the next question?

-on a circle you will see, if you have, backslash by watching the four quadrants (you will see steps a 12 o clock, 3 o clock, 6 o clock or 9 o clock)

-checking the Diameter of a circle with a gauge on a couple of angles, will tell you everything about your X/Y geometry, because
if X and Y are not 100% in angle you will get different Diameters.

to get a simple perfect circle can be a hard road.

1186
FAQs / Re: parallel port to serial
« on: July 10, 2019, 02:58:57 AM »
maybe a Little bit offtopic, but as Craig said i prefer CSMIO.

when i look for the CSMIO/IP-M it is 229.-€

-Mach3/Mach4 pluging
-real 0-10V Analog Output for spindle
-two analog Inputs for override potis
-all connetors included
-slave axis

ok, no backslash compensation, but IMHO backslash should be solved at the "beginnig" not at the "end".

PS. not getting anything from CSMIO for Promotion  ;)

1187
General Mach Discussion / Re: macro help
« on: July 10, 2019, 02:41:26 AM »
in this case i would work with two workoffset. for example:

G54 = spindle 1
G55 = spindle 2

and modify the GCode to activate the G54/G55 whenever the entire spindle is used.

to Switch on the wright spindle M3 should be modified. example:

Code: [Select]
If GetOEMDro(46) = 1 Then 'G54 is selected
DeactivateSignal(OUTPUT2) 'Turn off Spindle 2
ActivateSignal(OUTPUT1)   'Turn on Spindle 1
End If

If GetOEMDro(46) = 2 Then 'G55 is selected
DeactivateSignal(OUTPUT1) 'Turn off Spindle 1
ActivateSignal(OUTPUT2)   'Turn on Spindle 2
End If

code for M5 would be:

Code: [Select]
DeactivateSignal(OUTPUT2) 'Turn off Spindle 2
DeactivateSignal(OUTPUT1) 'Turn off Spindle 1


1188
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.







1189
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

1190
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.