Hello Guest it is December 13, 2019, 02:19:38 AM

Author Topic: Time estimation until tool change  (Read 7714 times)

0 Members and 1 Guest are viewing this topic.

Time estimation until tool change
« on: May 01, 2010, 05:28:45 PM »
Dear all,

due to the fact that i run quite long tap files and dont have a automatic tool changer on my mill i would like to know how long the estimated time
until the next tool change is. I didnt find much in the forum about that topic. Could somebody give me a hint how such a macro could look like?
Great would be of course to have a DRO which shows the time until next tool change and which is updated every minute or so. Possible?

Thanks in advance for your ideas and support!

Wolfgang

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Time estimation until tool change
« Reply #1 on: May 04, 2010, 07:27:52 AM »
Hi Wolfgang - not sure how you'd do this and as no one else has come up with a solution...
I remember reading somewhere how you could come at it from a different angle. Stick a mobile phone somewhere appropriate on your rig and a "finger" somewhere on your Z assembly. Pre set a text and toolchange gcode to hit the send button. Now your mill texts you when it needs a toolchange - cute or what?  ;D

Cheers

Ian
Re: Time estimation until tool change
« Reply #2 on: May 04, 2010, 03:16:59 PM »
Hi Ian,
yeah, cute! :-* I already thought my question is so unbelievable good that nobody
has a solution. But i see you are creative. Unfortunately my wife always demands that
i know in advance when i need to go back to basement to my cnc......how to do?  ???
Still hope somebody can help me to find out in advance when i have the next meeting with my
cnc to change the tools!
Thanks!!!
Wolfgang

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Time estimation until tool change
« Reply #3 on: May 04, 2010, 04:45:59 PM »
I have looked through all my notes and don't have a solution. The only way to know when the next tool change would be is to let mach do an TIME estimate based on the gcode(feedrate * distance) to the next TC  THEN start a countdown timer running, BUT we don't have access to that info(;-).

That would need to be done at a pluin level OR the driver level.

You could use a digital Kitchen timer and set it for each segment?

PS: It is not a new question(;-) that was asked several years back along with a countdown timer for program end.

THERE IS a process that mach does when loading a new program file that checks the code for errors before it loads. THAT would be a place to include the countdown timer calculation process. You would just have to convince Brian that it is a good idea.
« Last Edit: May 04, 2010, 04:52:35 PM by BR549 »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Time estimation until tool change
« Reply #4 on: May 05, 2010, 10:54:59 AM »
The best I can suggest is that you turn off your controler, select auto toolchange in configs and modify the M6start macro. Then you can do a real time simulation run prior to your actual cutting which will record the time of the toolchanges. Not ideal but at least it is 100% accurate. (remember to switch back to manual toolchange before your real run)

here's a skeletal addition to M6start.m1s. I'll leave it to you to convert to HH:MM:SS

Open "toolchangetimes.txt" For Append As #1
Print #1, Timer & " " & getselectedtool()
Close #1    

Just don't let your wife see it she'll probably point out that it's not an optimal or ideal solution  ;D

Cheers

Ian
« Last Edit: May 05, 2010, 11:03:32 AM by stirling »

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Time estimation until tool change
« Reply #5 on: May 05, 2010, 11:36:19 AM »
HUM that is a good idea Ian. You could also just look at the TC led to use to trigger the time function as the program ran.

 I think I will ADD that routine to the JOB REPORT function that we run. It might be handy to know the spans between tool changes along with total run time of the job.

Then if really needed you could run a simple countdown routine that you plugged in the span times and it would allow you to see the countdown time LIVE.

You could also add a function to output to a relay so a TC warning alarm could be used say 5min BTC the flashing light/buzzer goes off to alert you to an upcoming TC.

(;-)
« Last Edit: May 05, 2010, 11:40:23 AM by BR549 »

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Time estimation until tool change
« Reply #6 on: May 05, 2010, 04:53:13 PM »
OK it is possible to do a SOSO countdown timer BUT you would need to input each leg or devise a scheme to use #vars in the preamble of your GCode to set #vars with the TC times.

NOW to integrate it into looking at T#s and the M6start macro to do a tool count.

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Time estimation until tool change
« Reply #7 on: May 06, 2010, 12:18:17 AM »
The new WorkLog works with the new TC code.

Sample report:

"5/5/2010.....C:\Mach3\GCode\TestWorkLog.txt, StartTime 11:28:57 PM"
"__________ToolChange  T# 1 ,11:28:58 PM"
"__________ToolChange  T# 2 ,11:29:17 PM"
"__________ToolChange  T# 3 ,11:29:46 PM"
"__________ToolChange  T# 4 ,11:30:05 PM"
"          C:\Mach3\GCode\TestWorkLog.txt..........EndingTime11:30:26 PM"
"5/5/2010.....C:\Mach3\GCode\roadrunner.tap, StartTime 11:31:26 PM"
"__________ToolChange  T# 6 ,11:31:26 PM"
"__________ToolChange  T# 12 ,11:33:57 PM"
"__________ToolChange  T# 0 ,11:37:02 PM"
"          C:\Mach3\GCode\roadrunner.tap..........EndingTime11:37:10 PM"

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Time estimation until tool change
« Reply #8 on: May 07, 2010, 02:07:17 PM »
THis will do a basic Time to TC countdown based on times derived from the worklog it will ouput the countdown to either the message bar OR a user DRO you would create on the screen.

'Program Load,  Program The Vars to the TC time values derived from the WorkLog
#310 = 0      'Turns OFF Timer
#400 = 0      'Sets TC Var Holder to Zero
#401 = 10      'Start of the TC values 401 = 1st TC time
#402 = 2      '2nd
#403 = 6      '3rd
#404 = 0      '4th, etc

***************************
'M6Start (add too)
setvar(310,0)         'Turn Off Timer
SetVar(400,(Getvar(400)+1)      'Up the Tool# count
IF GetVar(400) = 0 Then End      'IF var value = 0 then end
IF GetVar(400) > 0 then SetVar(301,400)   'IF Var has a value then process
End   

***************************
'M6End (add too)
SetVar(310,1)      'Turn ON Timer
End

**************************
'M1030 End ( Create) , Is called by the M30/program end
Message" End Of Program Run"
SetVar(310,0)      'Turn Off Timer
'SetOemDro(1000,0)      'Reset Dro
SetVar(400,0)      ' Reset TC Vars to Zero
SetVar(401,0)
SetVar(402,0)
SetVar(403,0)
SetVar(404,0)
SetVar(405,0)
SetVar(406,0)
SetVar(407,0)
SetVar(408,0)
SetVar(409,0)
SetVar(410,0)
End

***************************
'Macropump (add to)
If Getvar(310)<>1 Then End      ' IF Timer is OFF then end
settimer(10)
SETvar(298,(GetTimer(10)))
setvar(299, (Getvar(299) + (GetVar(298)/60)))
Setvar(301, (Getvar(300)- Fix(Getvar(299))))
Message" Next TC Due In " &getvar(301) &"  Minutes"      'Use IF you use message bar
'SetOemDro(1000,Getvar(301))          'Use only if you use a DRO to display countdown
End   


Hope it helps,
Re: Time estimation until tool change
« Reply #9 on: May 09, 2010, 10:02:20 AM »
Dear BR549,

i have some questions to your post. Sorry for the maybe stupid questions but i am not that experienced with macros yet.

1) Where do i get the "new WorkLog" Macros from?
2) When/how to start the "Worklog" Macros? Like a button which starts worklog and then directly the program run?
3) What do you mean with the "  'Program Load " part? What/how to create to get the
    TC times from the worklog inside the #40x variables? Do i manually need to input?
4) Is the M1030 macro automatically called if the program reaches the M30 line
    or do i need to change anything?

Thanks for your support!

Wolfgang