3621
General Mach Discussion / Re: Wizard and VB Script questions (Brian Barker)
« on: January 14, 2006, 10:25:30 AM »
Try this as you can see I have changed "OpenTeachFile" to "AppendTeachFile". you need one OpenTeachFile to start the file and after that you are going to stick everything on the end of the file.
OpenTeachFile "turn.tap"
CloseTeachFile (Button for adding user file name)
call LoadTeachFile()
AppendTeachFile"turn.tap"
Call DoOEMbutton (2) (Selecting first operation)
AppendTeachFile "turn.tap"
Code "G18 G40 G49 G90 G94 G80" (Starting Code for first operation)
G0 X100Z150
Code "M3"
G0 X100Z150
Code "M5"
CloseTeachFile
Call LoadTeachFile() (End and posting Code for first operation)
Call DoOEMbutton(1)
End Sub
AppendTeachFile "turn.tap"
Call LoadTeachFile() (Selecting second operation)
Call DoOEMButton (3)
call LoadTeachFile()
appendTeachFile "turn.tap"
G0 X100Z150 (Starting code for second operation)
Code "M3"
G0X100Z150
Code "M5"
Code "M30"
CloseTeachFile (Ending and posting second operation)
Call LoadTeachFile
End Sub
Main
After you are all done with the file we are going to add a SAVE code button that will give you a chance to chnge the file name.
OpenTeachFile "turn.tap"
CloseTeachFile (Button for adding user file name)
call LoadTeachFile()
AppendTeachFile"turn.tap"
Call DoOEMbutton (2) (Selecting first operation)
AppendTeachFile "turn.tap"
Code "G18 G40 G49 G90 G94 G80" (Starting Code for first operation)
G0 X100Z150
Code "M3"
G0 X100Z150
Code "M5"
CloseTeachFile
Call LoadTeachFile() (End and posting Code for first operation)
Call DoOEMbutton(1)
End Sub
AppendTeachFile "turn.tap"
Call LoadTeachFile() (Selecting second operation)
Call DoOEMButton (3)
call LoadTeachFile()
appendTeachFile "turn.tap"
G0 X100Z150 (Starting code for second operation)
Code "M3"
G0X100Z150
Code "M5"
Code "M30"
CloseTeachFile (Ending and posting second operation)
Call LoadTeachFile
End Sub
Main
After you are all done with the file we are going to add a SAVE code button that will give you a chance to chnge the file name.