1171
FAQs / Re: parallel port to serial
« on: July 11, 2019, 08:06:11 AM »
have a look to the Motors for a type, then can can a look for a stepper Controller like leadshine and power supply.
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.
Sub Main()
Probe 100,0,0
end sub
#Expand <\..\..\macros\Dein Profilname\ProbeFunktionen>
'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
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?
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
DeactivateSignal(OUTPUT2) 'Turn off Spindle 2
DeactivateSignal(OUTPUT1) 'Turn off Spindle 1