Testing Script code for speed

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: Testing Script code for speed

Postby Battwell » Sun Sep 23, 2018 10:17 am

this doesnt work in uccnc
tested with statusmessage instead of consolewriteline
was trying to pick up a timer
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Testing Script code for speed

Postby kig23 » Sun Sep 23, 2018 1:57 pm

Hi Terry, hi Battwell,
if you don't know (maybe you missed this topic), time ago Balazs wrote a Console plugin with redirecting the stdout to a listbox on a plugin Form. You can use Console.Write and Console.Writeline to display stuff, just have to enable the plugin. You can use this plugin for debugging. Hope my info is helpful for you.
Attachments
Console.dll
(23.5 KiB) Downloaded 756 times
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: Testing Script code for speed

Postby Battwell » Sun Sep 23, 2018 4:34 pm

i uploaded a good script for macro/macroloop speed testing to the uccnc toolbox section.
ive tested it on my system and it works well.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Testing Script code for speed

Postby cncdrive » Mon Sep 24, 2018 3:51 pm

Yes, I wrote a console plugin which installs with the UCCNC. It can be used as a console, the stdout is redirected to that and so all Console writes are redirected to it.
It is much faster than messageing into the statusbox. We often use it to debug simple things which requires lots of data to be written.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Testing Script code for speed

Postby Battwell » Tue Sep 25, 2018 11:29 am

just tried this- very nice!
what would be really nice is that if errorlog was written to it which would save re opening errorlog every time i make a coding mistake!
that would make my debugging much faster!
i like that it stays on top :-)
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Testing Script code for speed

Postby dezsoe » Tue Sep 25, 2018 12:01 pm

Hm, it's a good idea to send the compiler error to the console too. I'd like it! :)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to Macros

Who is online

Users browsing this forum: Google [Bot] and 5 guests