971
German / Re: Probleme mit PWM
« on: April 10, 2020, 02:22:15 PM »
das ganze Enable Zeug spielt da auch noch mit.
poste mal bitte Deine XML Datei.
poste mal bitte Deine XML Datei.
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()
Dim Zprobe, Zretract, ZfeedRate
Dim PlateX, PlateY
'Note: TouchPlateHeight represents the actual height of the
' Auto Z Touch Plate from the work surface.
' Minor adjustments can be made for calibration purposes (use caution)
'set all parameters in metric
TouchPlateHeight = 30
Zprobe = -50
Zretract = 20
ZfeedRate = 10
PlateX = 10
PlateY = 10
Message( "Auto Tool Zeroing..." )
'check probe allready active
If GetOEMLed(825) Then
MSGBox "Probe allready activ",vbOK + vbCritical ,"Fault !"
DoButton(21)
End
End If
' go to probe position
Code "G53 G0 X" & PlateX & " Y" & PlateY
'clear z-pos
Call SetDRO( 2, 0.00 )
'do the probing
code "G31 Z" & Zprobe & " F" & ZfeedRate
While IsMoving()
Wend
'test for max trave
If GetVar(2002) <= Zprobe + 0.5 Then
MsgBox "no probe hit!",vbOK + vbCritical ,"Fault !"
End
Else
'move to contact point due overrun
Code "G90 G0 Z" &GetVar(2002)
While IsMoving()
Wend
'set z axis height
Call SetDRO( 2, TouchPlateHeight )
'go to retract position
code "G1 Z" & Zretract & "F20"
End If
'clear status line
Message " "
End Sub