fbpx

CS-Lab Support Forum for CNC Community

Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help! 

 

Please or Register to create posts and topics.

simCNC tool lifetime

Page 1 of 2Next

Hello,

i am wondering if there is a chance that there will be tool lifetime function available in the future simCNC versions?

Actutally i am satisfied with the simCNC software, looks good and works well so far. But i am struggeling with programming the tool lifetime in python by myself. I have used Mach3 before for many years with many custom build functions, need to learn alot for handling python to get the specific commands.

I tried to integrate the tool lifetime in the progress bar in the gui editor, also the analog io indicator. But with no success.

I tried to code timer functions(Set timer by gui, then check which tool is running etc.) and implement them in the simCNC, but also without much success. 

 In general i would like to use it as this example:

Each tool can be set with a specific life time (hours;minutes) . When for example T1 is running in the spindle the lifetime for T1 will count down, when it reaches the end of the lifetime there should be a message that this tool needs to be replaced.

Maybe someone have an simple idea about that?

Thanks in advance!

Dobbelju

andre has reacted to this post.
andre

I have to admit that this is an interesting option.
We are planning to add machine work statistics to simCNC:
- spindle working time
- distance traveled by axes
- the number of starts of a machine
- number of emergency stops
- machine working time

Maybe then we'll add what you're asking for.

I must admit that what you want to achieve is possible with Python, but it's not as simple as it might seem.
It would definitely take some time and effort, so I can't promise I'll do it for you.

If you can, hold off on it for a while. Maybe our developers will find some time and add it to simCNC.

Regards,

Wojtek

carbonkid, andre and Dobbelju have reacted to this post.
carbonkidandreDobbelju

Interesting request!

Some Phython thoughs...

The below example is just a rough idea how I would tackle this task. It does only count spindle run time of the tool, so rapids will be counted towards tool life.

  • Modify the M3/M4 macros to store the current time stamp in seconds in a volatile machine parameter.
    • d.getSpindleToolNumber( ) to get current tool number
    • time.time() to get a UNIX style timestamp in seconds since 01.01.1970
    • d.setMachineParam( ) to store values
  • Upon M5, retreive the start time for the current tool and calculate difference to the current time stamp
    • d.getMachineParameter() to retreive start time
  • Fetch current runtime of tool from non-volatile (!) machine parameters and add the result of above's calculation
    • d.getMachineParameter() to retreive current cumulated time for tool
    • d.setMachineParameter() to store new time

For displaying the tool life in GUI for current tool, modify the M6 script to be triggered after every tool change.

  • Fetch tool hours from non-volatile machine parameters calculate remaining tool life
    • d.getSpindleToolNumber( ) to get current tool number
    • d.getMachineParameter() to retreive current tool time
    • gui.myProgressBar.setValue() to write value to progress bar
  • In the M6 script, you could also check right in the beginning if the tool life is < 0 and prompt a msg.info() warning.

As a workaround...
Maybe you could run a diameter probe cycle and check tool wear this way. Blunt tools should wear in dimensions noticably... I run a precision laser fork barrier on my machine for this purpose, which makes probing of diameter quite easy. 

Cheers,
André

PS: Would be interesting, what other custom functions you had used under Mach3!

Dobbelju has reacted to this post.
Dobbelju

@Woijtek

Perhaps you could also integrate the spindle warm run under Settings->Spindle when talking about wear/use times. For example, 1-5 RPM levels and a time in minutes. The time is then simply divided by the number of RPM levels selected. In the screen you then have only one button that starts the spindle warm-up. Many now have high-quality spindles where this is certainly advantageous to perform a warm-up.

 

We assumed that the simCNC configuration should be clean and transparent. This means that only options related to the basic functions of a machine are included.
Functions such as spindle warm-up are quite highly personalized functions and should be added via, for example, macros
Maybe when I find some time I will write such a macro and share it.

In principle, this is also very good with the simCNC software. What basic functions are or not is of course a matter of opinion. I just thought that it would be so good because everyone probably has different times and RPM´s which he can then enter once in the basic setup of his machine with simCNC. Thus, this is reduced in the screen because you make the settings only once during installation. But I trust in you, just wanted to put the idea for discussion. 😉

CS-Lab Support has reacted to this post.
CS-Lab Support

On my part, I can promise that if I find some time, I will create a screen with the spindle warm-up option.

 

carbonkid has reacted to this post.
carbonkid

Thanks to all for the input!

 

Quote from CS-Lab Support on 26 June 2023, 07:03

I have to admit that this is an interesting option.
We are planning to add machine work statistics to simCNC:
- spindle working time
- distance traveled by axes
- the number of starts of a machine
- number of emergency stops
- machine working time

Maybe then we'll add what you're asking for.

I must admit that what you want to achieve is possible with Python, but it's not as simple as it might seem.
It would definitely take some time and effort, so I can't promise I'll do it for you.

If you can, hold off on it for a while. Maybe our developers will find some time and add it to simCNC.

Regards,

Wojtek

Sure, i can hold on for a while for that! Also the other mentioned functions which will be implemented will be nice to have. I am looking forward for the update! 

My Problem in python is that i maybe got personally  confused in programming with that function. 

Will do a workaround for that on the weekend, maybe i can find some basics to work with. 

--------------------------------------------------------------------------------------------------------------

@andre

Nice thoughts about that! I guess i will try with that on the weekend. Never used these machine params before in simCNC, but this could be a good direction with the m3/m5/m6 method. I tried for example to save the timer in an xml file to store and calculate, maybe an combination can solve the stability issue for me.

I have looked in your knowledge base. You have interesting projects there! 

About Mach3 custom functions for example:

Tool Table with drop down menu - each tool position can be set with a tool (variable name and diameter) from the drop down menu

advanced tool measurment for grinding ceramics - tool length deviation control and possible to repeat the last 8000 lines in gcode with adjusted used length if the deviation is in tollerance(for example 0.3mm used on a complete sinthered tool which are made to be worn in length)

Re Entry menu to continue milling any time at a specific point, even if the machine was shut down completely and restarted (with log file and entry points generated while loading the nc file)

 

and much more small / bigger ones. 

Quote from andre on 26 June 2023, 16:21

Interesting request!

Some Phython thoughs...

...

That's more or less how I imagined it.
I always say that 95% of success is having an idea and you have it.
So now all you have to do is replace it with macros 😉

Quote from Dobbelju on 29 June 2023, 20:28

I tried for example to save the timer in an xml file to store and calculate, maybe an combination can solve the stability issue for me.

4000 parameters are provided for a user, where the first 1000 are permanently saved.
Take advantage of this, and you won't have to write data to XML.

I would like to add that the machine parameters are present practically everywhere in simCNC (it's something similar to userDRO in Mach3 but better):
- GUI

- Gcode
Notation : #100 = 40
Read: G1 X[#100] F200
Assign #100 = #101
Subtraction #99 = #100 - #101
And other arithmetic operations.

- Python
d.setMachineParam( int paramNumber, float value )
d.getMachineParam( int paramNumber )

- Parameter table

Dobbelju has reacted to this post.
Dobbelju
Page 1 of 2Next

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland

×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?