Hello Guest it is April 19, 2024, 02:40:23 AM

Show Posts

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.


Topics - BR549

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »
151
MACH TOOL BOX / TUBE COPING program
« on: November 04, 2010, 11:43:48 AM »
Enclosed is an X/A axis Tube/Pipe coping program.  There are 2 code examples included, one is a standard program that you manually modify the variables before start and then begin.

The other has a programable front end macro that ASKs the question and you fill in the blanks. You will need to copy the macro code into a macro and move to YOUR macro directory before it will work.

There is NO Zaxis startup code such as Spindle speed or start or Zhom and plasma start etc. This just provides the motion code for you.


There are 4 variables  that HAVE to be input for correct operation.On the Programable Front End version it is NORMAL on file load to get a divide by ZERO error. That is because the Variable values have NOT been load yet by the macro. JUST say OK and hit rewind to continue. AS sonn as the macro runs and you have filled in the values the screen will reload and you will see the correct cut profile displayed.

#100 = CutTube Diameter
#101 = Uncut Tube Diameter
#103 = Cut Tube wall Thickness
#104 = Joint ANGLE



##### Program Code #####################################################

(CNC A axis Plasma TUBE Coping routine)
(Math derivative by Dan Hopper Copyright 2006)
#100= 1.250       (CutTube Diameter)
#101= 1.250       (Uncut Tube Diameter)
#103= .095         ( Tube Thickness )
#104= 45             (Joint ANGLE)
#200 = [#100 / 2]         (RO)
#201 = [#101 / 2]         (RU)
#202 = [#200 - #103]  (RI)
#203 = #104                (AF)
#204 = 0                       (ID)
#300= 2                        (A step in deg)
G0 G40 G54 G90 G49 G17 G50 G64 G91.1 G94
G0 A0.000 x0.000 Z1.000 F500
Z0.000
M98 P01 L180
G0  A0.000 X0.000 Z1.000
M30
o01
G1  A#300 X  [sqrt [#201 **2 - [ [#202 * sin [#204]] **2]] /  sin[#203] -  tan [90-#203] * #202 * cos[#204]]
#204=[#204+2]
#300=[#300+2]
m99
%


*****Programable Front End VERSION************************

'M1222  Macro to program Tube Coping Gcode Program
SetVar(100, Question (" P1  Cut Tube Diameter ?"))
SetVar(101, Question (" P2  Uncut Tube Diameter ?"))
SetVar(103, Question (" P1  Tube Thickness ?"))
SetVar(104, Question (" P2  Tube JOINT ANGLE ?"))
DoOemButton(160)
end


******************************************************

(CNC A axis Plasma TUBE Coping routine)
(Programable Front End)
(Divide By Zero ERROR is normal on startup)
(Caused By EMPTY variable values at this point)
(Hit REWIND and continue)
(Math derivative by Dan Hopper Copyright 2006)
G0 G40 G54 G90 G49 G17 G50 G64 G91.1 G94
M1222
#200 = [#100 / 2]         (RO)
#201 = [#101 / 2]         (RU)
#202 = [#200 - #103]  (RI)
#203 = #104                (AF)
#204 = 0                       (ID)
#300= 2                        (A step in deg)
(Verify Start Point and Press CYCLE START to Begin)  
G0 A0.000 x0.000 Z1.000 F500
Z0.000
M98 P01 L180
G0  A0.000 X0.000 Z1.000
M30
o01
G1  A#300 X  [sqrt [#201 **2 - [ [#202 * sin [#204]] **2]] /  sin[#203] -  tan [90-#203] * #202 * cos[#204]]
#204=[#204+2]
#300=[#300+2]
m99
%

152
Brains Development / Zmovement brain
« on: August 14, 2010, 10:57:00 AM »
Has anyone ever found a way to sense IF the Z axis is moving DOWN. We are looking for a brain function to sense if the Z is moving in the down direction only. not sitting still or moving up.

(;-)

153
VB and the development of wizards / Auto Batch Loader(;-)
« on: July 20, 2010, 12:25:00 AM »
Here is some code to play with for an Auto Batch Loader This idea came from another thread(ya-nvr-no) I just brought it here to expand on the idea (;-)

Code: [Select]
'Auto Batch Loader

Dim fname1,fname2,fname3,fname4,fname5 As String
Dim F1offset,F2offset,F3offset,F4offset,F5offset As Double

fname1 ="c:\mach3\gcode\" & AskTextQuestion("File#1 Name?")
F1offset= "" & Question("File#1 Offset#")
Message(Fname1  & "  AND  G" & F1offset)


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
fname2 ="c:\mach3\gcode\" & AskTextQuestion("File#2 Name?")
F2offset= "" & Question("File#2 Offset#")
Message(Fname2  & "  AND  G" & F2offset)

fname3 ="c:\mach3\gcode\" & AskTextQuestion("File#3 Name?")
F3offset= "" & Question("File#3 Offset#")
Message(Fname3  & "  AND  G" & F3offset)

fname4 ="c:\mach3\gcode\" & AskTextQuestion("File#4 Name?")
F4offset= "" & Question("File#4 Offset#")
Message(Fname4  & "  AND  G" & F4offset)

fname5 ="c:\mach3\gcode\" & AskTextQuestion("File#5 Name?")
F5offset= "" & Question("File#5 Offset#")
Message(Fname5  & "  AND  G" & F5offset)

For x = 1 To 5

If x = 1 Then loadfile(fname1)
While Isloading()
Sleep(1000)
Wend
If X = 1 Then  Code"G" & F1offset
Sleep(1000)
  
If x = 2 Then loadfile(fname2)
While Isloading()
Sleep(1000)
Wend
If X = 2 Then  Code"G" & F2offset
Sleep(1000)

If x = 3 Then loadfile(fname3)
While Isloading()
Sleep(1000)
Wend
If X = 3 Then  Code"G" & F3offset
Sleep(1000)

If x = 4 Then loadfile(fname4)
While Isloading()
Sleep(1000)
Wend
If X = 4 Then Code"G" & F4offset
Sleep(1000)

If x = 5 Then loadfile(fname4)
While Isloading()
Sleep(1000)
Wend
If X = 5 Then  Code"G" & F5offset
Sleep(1000)

Message(filename)

While Isloading()
Sleep(5000)
Wend

runfile()
Sleep(2000)

While IsMoving()
Sleep(2000)
Wend

'Insert STOP code here

Next x
Message("thats all folks")

End

    

154
Galil / Mesa card plugin
« on: July 18, 2010, 09:06:22 PM »
STEVE any word on the status of the Mesa card plugin?

155
General Mach Discussion / New Plasma Function In Mach TOOL BOX
« on: July 16, 2010, 09:00:51 PM »
I have just downloaded a new plasma function for those with a CanCNC DTHC. It is an auto preset function to be able to load the preset tip voltage from Gcode. This way you will not forget to preset the required tip voltage setting(;-)

YOu simply insert the macro with a P# value equal to your preset voltage and Mach will auto update the value AND notify the DTHC on file load.

Helps make plasma So easy a caveman can do it.

(;-)

156
MACH TOOL BOX / Plasma Auto Preset tip voltage
« on: July 16, 2010, 08:53:25 PM »
This is a routine to be able to AUTO PRESET the tip voltage setting On your MP3000 DTHC from CandCNC FROM the gcode program. The way it works is you insert this Macro along with a P# that equals the preset tip voltage. This way you will never forget to set those values as they will auto load and notify the DTHC before the Gcode runs. It will also alert you IF you set a value lower than a safe voltage.

M549 P100     will autopreset the tip voltage to 100volts AND notify the MP3000 of the change.(;-)


**********************************************************

'M549 Auto tip voltage PRESET
PresetV = param1
None2 = Param2
None3 = Param3
SetUserDro(1036,PresetV)
Sleep(1000)
Call NotifyPlugins(25502)
If GetUserDro(136) < 50 Or PresetV <50 Then
   MsgBox("Preset Voltage is Below Minimum, Reset PARAMETER and RESTART")
   DoButton(1)
   While Ismoving()
   Sleep(10)
   Wend
   DoButton(2)
Else
End If


We are working with Les at SCam to be able to include the Macro INFO at post time based on TOOL# used for the operation.

157
VB and the development of wizards / OEM Buttons ???
« on: July 14, 2010, 08:44:42 PM »
ANYONE know HOW to create an OEM BUTTON that can be called from VB??

(;-)

158
General Mach Discussion / Auto XML backup ?
« on: June 26, 2010, 10:26:13 AM »
Does anyone know IF you can turn the "Auto XML backup" feature OFF ??

159
There is a new Mach function for plasma users in the mach tool box. It tracks plasma consumables for you.

 http://www.machsupport.com/forum/index.php/topic,15197.new.html

160
MACH TOOL BOX / Plasma, Consumables tracking
« on: June 24, 2010, 02:01:36 PM »
Enclosed is a Mach funtion to track consumables

Screen shots show the Screen mods and give the DRO#s used in the code.

Also a shot of the Hardcopy report is provided.

To work properly you must also Modify the Cam post to do the following     
Just before the M30 at file end it must enclude
#650=*********x              where *********X = total cut inches.

Les at Sheetcam has already developed this mod to the post for sheetcam users.


VB CODE:

CODE to drive the Consumable tracking function(;-)

'M3 macro
'Code to udate the pierce counts******
SetOemDro(2001,(GetoemDro(2001)+1))
SetOemDro(2005,(GetoemDro(2005)+1))
SetOemDro(2018,(GetoemDro(2018)+1))
SetOemDro(2012,(GetoemDro(2012)+1))
'*************************************
DoSpinCW()

###########################################

'M1030 macro
'Code to drive the consumables page update*********************
SetOemDro(2008,GetOemDro(2008)+ GetVar(650))
SetOemDro(2015,GetOemDro(2015)+ GetVar(650))
SetOemDro(2011,GetOemDro(2011)+ GetVar(650))
SetOemDro(2019,GetOemDro(2019)+ GetVar(650))
SetOemDro(2007,GetOemDro(2005)/GetOemDro(2006))
SetOemDro(2010,GetOemDro(2008)/GetOemDro(2009))
SetOemDro(2014,GetOemDro(2012)/GetOemDro(2013))
SetOemDro(2017,GetOemDro(2015)/GetOemDro(2016))
'Code For Autopark**********************************************
If GetUserLed(1199)<>0 Then
SetVar(401,GetOemDro(4))
SetVar(402,GetOemDro(11))
Code" G0 Z1.00"
While IsMoving()
Wend
Code"X#401 Y[#402+0.250]"
While IsMoving()
Wend
End If
'CODE forWorkLogUpdate*******************************************
If GetVar(499) =0 Then
Open "C:/mach3/worklog.txt" For Append As #1
Write #1,"          " &Filename &"..........EndingTime" & Time()
Close #1
setVar(499,1)
End If
End

########################################################
 
'MacroPump
'Code to drive the consumables warning*************************************************
If GetOemDro(2006) >1 And GetOemDro(2001) > GetOemDro(2007) Or GetOemDro(2011) > GetOemDro(2010) Then SetUserLed(2020,1) Else SetUserLed(2020,0)
If GetOemDro(2007) >1 And GetOemDro(2018) > GetOemDro(2014) Or GetOemDro(2019) > GetOemDro(2017) Then SetUserLed(2021,1) Else SetUserLed(2021,0)
'Code to drive the consumables cost update*********************************************
SetOemDro(2042,GetOemDro(2040)/GetOemDro(2007))
SetOemDro(2044,GetOemDro(2040)/Getoemdro(2010))
SetOemDro(2043,GetOemDro(2041)/GetOemDro(2014))
SetOemDro(2045,GetOemDro(2041)/Getoemdro(2017))
End  
  
 ###########################################################

'Macro "ResetE" Button
'Code to UPDATE/create Consumables Log*********************************
Open"C:/Mach3/ConsumableLog.txt" For Append As #1
Write #1,"Tip Changeout......... " & Date &" .. " & Time()&" .. " &"TTP.. " & GetOemDro(2001)&" .. " &"TTCI.. " &GetOemDro(2011)
Close#1
'Code to Reset electrode Dro and Update Consumables page***************
SetOemDro(2001,0)
SetOemDro(2011,0)
SetOemDro(2006,GetOemDro(2006) + 1)
SetOemDro(2009,GetOemDro(2009) + 1)
Message "TIP Count RESET"    
End

############################################################

'Macro to drive "ResetN" button
'code to Update/create Consumables LOG*********************************
Open"C:/Mach3/ConsumableLog.txt" For Append As #1
Write #1,"Nozzle Changeout... " & Date &" .. " & Time() &" .. " &"TNP.. " & GetOemDro(2018) &" .. "&"TNCI.. " &GetOemDro(2019)
Close#1
'code to update consumables page****************************************
SetOemDro(2018,0)
SetOemDro(2019,0)
SetOemDro(2013,GetOemDro(2013) + 1)
SetOemDro(2016,GetOemDro(2016) + 1)
Message"Nozzle Count Reset"
End

############################################################
      
'Macro to drive "View Consumables Log" button
 Shell("c:\windows\notepad.exe  c:\mach3\ConsumableLog.txt")
End

#############################################################

'Macro Master Reset Button
'Code to drive the "Master Reset" button
SetOemDro(2005,0)
SetOemDro(2006,1)
SetOemDro(2007,1)
SetOemDro(2008,0)
SetOemDro(2009,1)
SetOemDro(2010,1)
SetOemDro(2012,0)
SetOemDro(2013,1)
SetOemDro(2014,1)
SetOemDro(2015,0)
SetOemDro(2016,1)
SetOemDro(2017,1)
SetOemDro(2001,0)
SetOemDro(2011,0)
SetOemDro(2018,0)
SetOemDro(2019,0)
End

*************************************************

Screenshots:



Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »