Hello Guest it is March 28, 2024, 06:23:38 AM

Author Topic: Plasma, Consumables tracking  (Read 7445 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
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:


« Last Edit: June 24, 2010, 02:07:22 PM by BR549 »
Re: Plasma, Consumables tracking
« Reply #1 on: June 24, 2010, 03:20:39 PM »
Hello to all

BR549 I will like to ask if this version of the macros will work with the latest version of Mach or do You need and older version to run it?
Thanks for Your help.
rem

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Plasma, Consumables tracking
« Reply #2 on: June 24, 2010, 08:15:22 PM »
I have been  running this on the V.020 AND V.040 versions (;-)

Because it does not involve any Gcode/VB motion code there should not be any problems with compatibility with older/newer versions