Skip to content

Commit e8372ae

Browse files
committed
Initial commit
0 parents  commit e8372ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+22939
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

Curve0.dat

36 Bytes
Binary file not shown.

Curve1.dat

36 Bytes
Binary file not shown.

Curve2.dat

36 Bytes
Binary file not shown.

Curve3.dat

36 Bytes
Binary file not shown.

Curve4.dat

36 Bytes
Binary file not shown.

Curve5.dat

36 Bytes
Binary file not shown.

FeedRate.m1s

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
Feed = CommandedFeed()
3+
SetFeedRate( Feed )

HiddenScript.m1s

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MsgBox("This is under construction")' Sub Main()' ' Z- Probing Script' ' Author verser' ' vers.by - touch probes, tool setters and precision home switches' Dim FRate1, FRate2' Dim DMax, Latch, EdgeLength' Dim XYclearance' Dim AutoZeroFlag' Dim ToolNo' Dim ToolD' Dim ProbeD' Dim Zdepth' Dim ZHit' Dim Zpos' Dim ZScale' Dim AbsIncFlag' Dim CurrentFeed' 'Init vars' FRate1 = abs(GetUserDRO(1821))' FRate2 = abs(GetUserDRO(1822))' DMax = abs(GetUserDRO(1823))' ToolNo = GetCurrentTool()' ToolD = GetToolParam(ToolNo,1) ' If GetUserDRO(1829) = 0 then ' ProbeD = ToolD ' Else ' ProbeD = GetUserDRO(1829) ' End If' Latch = abs(GetUserDRO(1825))' Zdepth = GetUserDRO(1830)' If GetOEMLED(1871) Then' AutoZeroFlag=1' Else' AutoZeroFlag=0' End If' AbsIncFlag = GetOEMLED(49) ' Get the current G91 state' 'Temporary save all Axis Scale factors' ZScale = GetOEMDRO(61)' 'Set Z Scale to 1' SetOEMDRO(61,1)' Sleep(250)' 'Check for Errors' If GetOemLED(16)<>0 Then ' Check for Machine Coordinates' Message "Please change to working coordinates"' SetOEMDRO(61,ZScale)' Sleep(250)' Exit Sub ' Exit if in Machine Coordinates' End If' If GetOemLED(825)<>0 Then' Message "Probe is active! Check connection and try again"' Call SetOEMDRO(61,ZScale)' Sleep(250)' Exit Sub ' Exit if probe is tripped' End If' CurrentFeed = GetOEMDRO(818) 'FeedRate()' 'main working ' 'Save Z start position ' Zpos = GetDRO(2) ' 'Probe Z- ' ZHit=ProbeZ(-1,DMax,Latch,FRate1,FRate2) ' If ZHit=999999 Then ' Exit Sub ' End If ' SetUserLabel (14, Format(ZHit, "####0.000")) ' PushMSG("Z- = " & (ZHit)) ' 'Safe back to start position ' If Not SafeMoveZ((Zpos-GetDRO(2)),FRate1) Then ' PushMSG("Return to the search position is interrupted") ' Exit Sub ' End If ' If AutoZeroFlag = 1 Then ' SetOEMDRO(42, ZHit) ' Sleep(150) ' End If' 'epilog' SetOEMDRO(61,ZScale)' Sleep(250)' Call SetLED49(AbsIncFlag)' SetOEMDRO(818,CurrentFeed) 'SetFeedRate(CurrentFeed)' Sleep(125)' End Sub' 'Functions' Function ProbeZ(Dir,DMax,Latch,FRate1,FRate2) ' Dim Res ' Dim Zstart ' Dim Ftmp ' Dim AbsIncF ' ProbeZ=999999 ' Zstart = GetDRO(2) ' Ftmp = FeedRate() 'FeedRate() ' AbsIncF=GetOEMLED(49) ' 'Fast Probe Z ' Code "G91" ' Code "F" & FRate1 ' Sleep(125) ' Call WaitProbeReady() ' Code "G31 Z" & (Dir*DMax) ' While IsMoving() ' Wend ' Res = GetVar(2002)' ' PushMSG("Res=" & Res &", Zstart=" & Zstart & ", DMax=" & DMax & ", FRate1=" & FRate1) ' If Abs(Res - Zstart - Dir*DMax) < 0.01 Then ' PushMSG("Error: G31 Z search finished without making contact") ' PushMSG("Manually return to the starting position and repeat the search") ' Call SetLED49(AbsIncF) ' SetOEMDRO(818,Ftmp) ' Sleep(125) ' Exit Function ' End If ' 'Move back ' Code "G00 Z" & -Dir*Latch ' While IsMoving() ' Wend ' Call WaitProbeReady() ' 'Latch Probe Z ' Zstart = GetDRO(2) ' Code "F" & FRate2 ' Sleep(125) ' Code "G31 Z" & Dir*Latch*2 ' While IsMoving() ' Wend ' 'Save result ' Res = GetVar(2002) ' If Abs(Res - Zstart - Dir*Latch*2) < 0.01 Then ' PushMSG("Error: G31 Z latch finished without making contact") ' PushMSG("Manually return to the starting position and repeat the search") ' Call SetLED49(AbsIncF) ' SetOEMDRO(818,Ftmp) ' Sleep(125) ' Exit Function ' End If ' Code "G00 Z" & -Dir*Latch ' While IsMoving() ' Wend ' Call SetLED49(AbsIncF) ' SetOEMDRO(818,Ftmp) ' Sleep(125) ' ProbeZ=Res' End Function' Function SafeMoveZ(Z1, F1) As Boolean 'return 1 (error) if probe tripped ' Dim Zstart ' Dim Ftmp ' Dim AbsIncF ' SafeMoveZ=True ' Zstart = GetDRO(2) ' Ftmp = FeedRate() 'FeedRate() ' AbsIncF=GetOEMLED(49) ' Code "G91" ' Code "F" & F1 ' Sleep(125) ' Call WaitProbeReady() ' Code "G31 Z" & Z1 ' While IsMoving() ' Sleep(100) ' Wend ' ZHit = GetVar(2002) ' Call SetLED49(AbsIncF) ' SetOEMDRO(23,Ftmp) ' Sleep(125)' End Function' Function PushMSG(Str1 As String) As Boolean ' SetUserLabel (21,GetUserLabel(20)) ' SetUserLabel (20,GetUserLabel(19)) ' SetUserLabel (19,GetUserLabel(18)) ' SetUserLabel (18,GetUserLabel(17)) ' SetUserLabel (17,Str1) ' Message Str1 ' PushMSG=True' End Function ' Sub WaitProbeReady() ' While GetOemLED(825) ' Sleep(100) ' Wend' End Sub' Sub SetLED49(Flag) ' If Flag Then ' Code "G91" ' Sleep(125) ' Else ' Code "G90" ' Sleep(125) ' End If' End Sub

Linearity.dat

808 Bytes
Binary file not shown.

M10.m1s

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
rem #define DIGTRIGGER 0
3+
rem #define ENABLE1 1
4+
rem #define ENABLE2 2
5+
rem #define ENABLE3 3
6+
rem #define ENABLE4 4
7+
rem #define ENABLE5 5
8+
rem #define ENABLE6 6
9+
rem #define EXTACT1 7
10+
rem #define EXTACT2 8
11+
rem #define EXTACT3 9
12+
13+
rem the following activated signal 9 (EXTACT3)
14+
15+
ActivateSignal( 9 )

M11.m1s

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
rem #define DIGTRIGGER 0
3+
rem #define ENABLE1 1
4+
rem #define ENABLE2 2
5+
rem #define ENABLE3 3
6+
rem #define ENABLE4 4
7+
rem #define ENABLE5 5
8+
rem #define ENABLE6 6
9+
rem #define EXTACT1 7
10+
rem #define EXTACT2 8
11+
rem #define EXTACT3 9
12+
13+
rem the following de-activates signal 9 (EXTACT3)
14+
15+
DeActivateSignal( 9 )

M40.m1s

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OpenDigFile()

M41.m1s

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CloseDigFile()

M50.m1s

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
rem #define DIGTRIGGER 0
3+
rem #define ENABLE1 1
4+
rem #define ENABLE2 2
5+
rem #define ENABLE3 3
6+
rem #define ENABLE4 4
7+
rem #define ENABLE5 5
8+
rem #define ENABLE6 6
9+
rem #define EXTACT1 7
10+
rem #define EXTACT2 8
11+
rem #define EXTACT3 9
12+
13+
rem the following toggles signal 9 (EXTACT3)
14+
15+
if IsActive( 9 ) then
16+
DeActivateSignal( 9 )
17+
else
18+
ActivateSignal( 9 )
19+
end if

M51.m1s

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rem #define ACTIVATION1 18
2+
rem #define ACTIVATION2 19
3+
rem #define ACTIVATION3 20
4+
rem #define ACTIVATION4 21
5+
rem #define DIGITIZE 22
6+
rem #define INDEX 23
7+
rem #define LIMITOVER 24
8+
rem #define EMERGENCY 25
9+
10+
SystemWaitFor( 19 )

M55.m1s

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a = GetVar(1000)
2+
SetVar 1001, a

0 commit comments

Comments
 (0)