No problem for a video, will do it tomorrow .
I post the two main pages with all DRO's. As you said, I would still need to add some more.
This is also the macro I use, not finish because I made so much mods to it.
'CNC_SAW Post
Sub Main ()
SawKerf=GetUserDRO(1003)
If SawKerf=0 Then
Message("Saw Kerf can't = 0")
Exit Sub
End If
MaterialLength=GetUserDRO(1004)
If MaterialLength=0 Then
Message("Material Length can't = 0")
Exit Sub
End If
SawRPM=GetUserDRO(1005)
If SawRPM=0 Then
Message("Saw RPM can't = 0")
Exit Sub
End If
SawFeed = GetUserDRO(1006)
If SawFeed = 0 Then
Message("Feed can't = 0")
Exit Sub
End If
StartCutHeight=GetUserDRO(1010)
If StartCutHeight=0 Then
Message("Start Cutting height can't = 0")
Exit Sub
End If
EndCutHeight=GetUserDRO(1011)
If EndCutHeight=0 Then
Message("End cutting height can't = 0")
Exit Sub
End If
'************************************
LengthOfPart=GetUserDRO(1001)
If LengthOfPart=0 Then
Message("Length of Part can't = 0")
Exit Sub
End If
NumberOfParts=GetUserDRO(1002)
If NumberOfParts=0 Then
Message("Number of Parts can't = 0")
Exit Sub
End If
If MaterialLength<((SawKerf*NumberOfParts)+(LengthOfPart*NumberOfParts)) Then
Message("Material length is not long enough for the number of parts")
Exit Sub
End If
SetUserDRO(1009,0)
p=GetUserDRO(1009)
'***New File
OpenTeachFile "cnc_saw.tap"
Code "(cnc_saw.tap)"
Code "G20 G50 G64 G90 G94"
If GetUserLED(1006) Then
ActivateSignal(OUTPUT2)
End If
Code "G4 P0.2"
Code "M3 S" & SawRPM
If p=0 Then
Code " M200 ( Close Feeder Clamp ) "
Code "G00 A " & StartCutHeight
Code " M203 ( Open Saw Clamp ) "
Code "M214"
If GetUserLED(1001) then
Code "M8"
End If
Code "G00 Z " & (LengthOfPart+sawKerf)
Code " M211 "
Code " M213 "
Code " M202 ( Close Feeded Clamp ) "
Code "G01 A " & EndCutHeight & " F " & SawFeed
SetUserDRO(1009,1)
End If
NewZ=LengthOfPart+SawKerf
p=GetUserDRO(1009)
If p>0 Then
For i=0 To (NumberOfParts-1)
NewZ=(NewZ+LengthOfPart+SawKerf)
' Code " M200 ( Close Feeder Clamp ) '
Code "G00 A " & StartCutHeight
Code " M203 ( Open Saw Clamp ) "
Code " M210 ( Counter Increment ) "
Code "G00 Z " & (NewZ+SawKerf)
Code " M202 ( Close Saw Clamp ) "
Code "G01 A " & EndCutHeight & " F " & SawFeed
'Code " M210 ( Counter Increment ) "
SetUserDRO(1205,NewZ+SawKerf)
Next i
Code "G00 A " & StartCutHeight
'SetUserDRO(1009,0)
End If
Code "G00 A0 "
Code "M30 "
CloseTeachFile
Call LoadTeachFile()
'****Exit Wizard back to mach
Call LoadStandardLayout()
End Sub
Other macro are:
M200 Close Saw Clamp
M201 Open Saw Clamp
M202 Close Feeded Clamp
M203 Open Feeder Clamp
M210 Parts Counter Increment
M211 Reset a DRO
M212 reset a DRO
M213 Reset a DRO
M214 Reset a DRO
M211, 212,213,214 are for Reset MaterialCounter, PartsCounter and some others
Like I said, I'm not good at all for macro so I modify one small part and try it.
Thanks for the reply.
Jeff