Macroloop - Log Gcode File Load + Log File Run Time

Here is where you can drop off Examples of WORKING macros,plugins,Gcode programs , macro Wizards etc.
Please give a brief description of what it is and how it works.

Re: Macroloop - Log Gcode File Load + Log File Run Time

Postby Robertspark » Thu Jul 20, 2017 10:26 pm

All Macros Updated in this thread in line with comments.

We have:
M1002.txt which is the most basic logging macro, it logs what date and time a gcode file was run
M1003,txt which is the next step up for logging when a file was loaded and when that file was run.
M1004.txt logs when which and when a gcode file was loaded, when the gcode file was run, stopped, feedhold was active, and when the gcode file ended (it requires you to copy and paste a short function within the M30 macro in order for the M1004 macro to log when the program completed) (included within the M1004 macro).

M1004 could be further modified (if you require) to save a file for each g-code file that is run to a location of your choosing (including a network address). PM me if you want me to do this for you as I'm sure you'd prefer them logged somewhere specific. This can also be setup to run each time you run the specific g-code file it saves the information to an individual file or it appends an existing file.

There are other options to log tool changes / what tools were used, what the set feedrate was at different times, what the linear error settings were etc etc. Basically most things can be logged if you advise what you want, in what format and where you want it to go.
Attachments
M1002.txt
UCCNC Macroloop to log running gcode file name
(1.04 KiB) Downloaded 854 times
M1003.txt
UCCNC Macroloop to log when gcode file was loaded and when the gcode file ran
(1.39 KiB) Downloaded 850 times
M1004.txt
UCCNC Macroloop to log Gcode File Open, File Close, Cycle Start, FeedHold, Cycle Stop & Cycle Ended.
(3.06 KiB) Downloaded 861 times
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Macroloop - Log Gcode File Load + Log File Run Time

Postby Guenter_Schmied » Sat Jul 22, 2017 2:53 pm

Hi Robert
thanks a lot , I am learning how to do many improvements to automatize UCcnc , and your macros
will help me.
I ve tested M1003, and it does exactly what I meant in the other post.
As I sayd I resolved this witout using Mloops, since I do not know how Mloops affect performance of
Gcode running , and since I am machining almost in 3D complex parts, I have my concerns with Mloops
I really do not need them . Changing the button is straightforward and I am shure of 100% Uccnc performance
is not affected.
But anyway you show me an excellent work and I am most grateful.

B.regards
Guenther
Guenter_Schmied
 
Posts: 24
Joined: Tue Mar 28, 2017 9:15 pm

Re: Macroloop - Log Gcode File Load + Log File Run Time

Postby Robertspark » Sat Jul 22, 2017 4:52 pm

Guenther,

I'm fairly certain that performace will not be affected with running those macroloops.

The reason is because they only log data at the change of a cycle, not at every macroloop (but they do compare values at every macroloop).

Also the UC100, 300 & 400 are motion controllers, hence the step and direction processing is all carried out within the motion controller. The motion controller is just fed (and returns) data at set intervals by all the hard bit banging is done within the UC microcontrollers.

You can have a look at this by checking the loop latency (from within UCCNC >> Configuration >> Profiles >> Statistics) and also by checking out the processor and memory load (by using CTRL + ALT + DEL >> Task Manager >> Processes & Performance)

If you are running a fairly reasonable PC I cannot see problems, one of the biggest issues is probably the graphics card surprisingly .... because of the refresh rate of the toolpath display.

If you are running 3D (4 / 5 / 6 axis ) motion [not 2.5D] then you'll be running a fairly good PC which is probably dedicated to running machine code (no wifi and other applications that may be polling) so you'll more than likley be fine running macroloops.

However .... it would be nice to get some idea of macroloop overhead from CNCDrive.
__________________________________________________________________________________________________________________

Glad the code I've published is helping to give ideas ...... it's all a learning process to me ..... (I've got too many part finished projects at present and really need to focus on finishing some of the plugins I've been working on :roll: :ugeek: [probing + simple 2D shape cutting for plasma .... err similar to Hypertherm Pheonix [or thats the plan....] graphics side looks fine... just got to finish the code.... haha :lol: )
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Macroloop - Log Gcode File Load + Log File Run Time

Postby cncdrive » Sat Jul 22, 2017 10:11 pm

It's possible to cause issues with a macroloop or with a plugin if you overloading the computer.
I mean if for example a macro loop runs into an infinate loop causing a 100% CPU usage or declaring a virtually infinate amount of variables that will be a problem for the UCCNC.
Ofcourse this was an extreme example, but the only thing which could cause trouble is if you overloading the CPU or the memory.
Such problems could be found quickly.
A properly constructed macroloop will not cause any problems.
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Previous

Return to UCCNC TOOL BOX

Who is online

Users browsing this forum: No registered users and 0 guests