LB Booster
« LBB runs 7 times slower than LB on my GBRL-Sender »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:36am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 2 3 4 5  Notify Send Topic Print
 locked  Author  Topic: LBB runs 7 times slower than LB on my GBRL-Sender  (Read 1567 times)
tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #26 on: Dec 24th, 2017, 8:19pm »

Hello xtal
Looking to profiler report - long time is spent changing fonts.
Are you by chance changing font in a loop?
Is there any reason to change font at all - not to set it right after opening window, once and for all?
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #27 on: Dec 24th, 2017, 9:43pm »

on Dec 24th, 2017, 8:19pm, tsh73 wrote:
long time is spent changing fonts

Exactly. As I suggested from the start, the profiler makes the cause of the slowness obvious.

I expect LB 4 checks to see whether the selected font happens to be the same as what was previously selected, and ignores the command if so. LBB doesn't do that, because I had no reason to suspect that anybody would keep selecting the same font repetitively.

All in all, a bit of a wild (Christmas) goose chase!

Richard.
« Last Edit: Dec 24th, 2017, 9:44pm by Richard Russell » User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #28 on: Dec 24th, 2017, 10:10pm »

I noticed I was setting the same font on the DRO, when the profiler was running, I just set the font every time I entered a procedure.

I will remove some of the redundant font settings, and see what happens, but keep in mind that the shortened program was
having issues, and it had very little font changes... shocked

thx all
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #29 on: Dec 24th, 2017, 11:12pm »

on Dec 24th, 2017, 10:10pm, xtal wrote:
keep in mind that the shortened program was having issues

Sort out your coding flaws first: eliminate unnecessary repetitions, set the font just once when the window is created, don't update controls faster than somebody can read the changes etc.

Then, and only then, check whether there are any remaining issues. Until that point I'm not "keeping anything in mind" because as far as I'm concerned there is nothing wrong with LBB.

Richard.
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #30 on: Dec 25th, 2017, 01:22am »

Using the full program with fonts usage changed..
If I remark out NOMAINWIN [ie] enable a print window
and not using any print cmds

Run program and open Comm port
program window selected code runs slow angry
print window selected code runs fast rolleyes shocked
program window selected code runs slow angry
etc, etc, etc huh
« Last Edit: Dec 25th, 2017, 01:23am by xtal » User IP Logged

Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #31 on: Dec 25th, 2017, 07:42am »

So what is the profiler telling us when you run slow and what when you run fast?
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #32 on: Dec 25th, 2017, 12:45pm »

Running fast Profile Program terminates after 3rd tic msg

Profiler report for C:\Users\msw10\AppData\Roaming\Liberty BASIC Pro v4.5.1\GRBL-NU5DggmZ10h-lbb-100.bas

Mon. 25 Dec 2017, 07:37:00

Figures in the first column indicate approximate
time in milliseconds spent in each program line.

Figures in the second column indicate approximate
percentage of the time spent in each program line.

Time spent profiling: 12.726 seconds.

86: 0.68 '** Liberty BASIC 4.51 pro - 3/14/2017 GCode Sender using GRBL 1.1F Program with simple Graphics
8: 0.06 Menu #main, "DROreset", "Reset MPX", [ZX], "Reset MPY", [MZY], "Reset MPZ", [MZZ], "ResetALL", [MZR]
6: 0.05 Menu #main, "HELP", "Q/A.txt", [HELPx],"LibertyBasic.chm",[HELPchm],"LB-Forum",[HELPforum]
2: 0.02 button #main.Pause, "Pause", [PAUSE], UL, 5, 450, 45, 20
2: 0.02 button #main.JZMd,"--",[JZMd],UL,158,549,12,13 '
6: 0.05 texteditor #main.WinStatus, 55,125, 420, 80 ' LBB adjust ' Top left Corner - over, down
2: 0.02 texteditor #main.GCwindow, 55, 210, 420, 260 ' LBB adjust ' bottom right - width, down
4: 0.03 bmpbutton #main.EMRRESET, BMPdir$;"estop6.bmp",[ESTOP],UL, 188,575 ' EM STOP / CLOSE
2: 0.02 button #main.mac7, "Mac7", [mac7], UL, 728, 0, 40, 20
2: 0.02 button #main.EditGcode, "Edt GCode", [EditCode], UL, 940,104, 62, 20
2: 0.02 textbox #main.DROMPx, 55, 0, 110, 30 ' Right Justify & TextboxColor$ = "White"
2: 0.02 texteditor #main.PopUp, 500, 250, 475,350 '
4: 0.03 #main.Status "setfocus" 'MUST setfocus to graphicbox '
14: 0.11 #main "font ms_sans_serif 8" ' was 10 slightly to big
296: 2.33 #main.Status, "font arial 24"
2: 0.02 #main.DROWCx, "!font arial 14" ' Digital Read Out font size 14
2: 0.02 #main.DROWCy, "!font arial 14"
4: 0.03 #main.DROMPx, "!font arial 14"
2: 0.02 #main.DROMPy, "!font arial 14"
6: 0.05 #main.DROMPz, "!font arial 14"
2: 0.02 #main.DROWPx, "!font arial 14"
2: 0.02 #main.DROWPy, "!font arial 14"
2: 0.02 #main.DROWPz, "!font arial 14"
2: 0.02 #main.green,"!font roman 6 10" '
2: 0.02 #main.yellow,"Folder" '
2: 0.02 #main.green,"File" '
2: 0.02 #main.PopUp, "!hide" '
2: 0.02 #main.Filebox,"fill green" '
2: 0.02 #main.JX, str$(JXvar) : #main.JY, str$(JYvar) : #main.JZ, str$(JZvar)
4: 0.03 #main.JXF, "F";str$(JXFvar) : #main.JYF,"F";str$(JYFvar) : #main.JZF,"F";str$(JZFvar)
2: 0.02 magnify=1 : #main.Mag1,1 ' show magnifer value
2: 0.02 if len(P$)>0 then #main.Comx, P$ '
2: 0.02 if len(BaudRate$)>0 then #main.Baud, BaudRate$ '
2: 0.02 call GetCommPorts ' scan & load com#'s array
4: 0.03 timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
2: 0.02 #main.GCwindow, Xtime$ '
116: 0.91 #GRBL, "?"; '' Keep semicolen so ok-ok won't display approx 100 ms interval not sure how semicolen does this
6: 0.05 comlof=lof(#GRBL) ' lof >1 data is in buffer
4: 0.03 timer 0 ' stop timer until line processed *****
2: 0.02 Ze=instr(WIN$,"|",2) : winswitch = 1 ' <Idle|MPos
4: 0.03 #GRBL, "M5" ' ensure spindle off
26: 0.20 Q=DelayMS(500) ' wait 1/2 second
2: 0.02 #GRBL, CTLx$; ' send soft reset
32: 0.25 Q=DelayMS(500) ' wait 1/2 second
2: 0.02 close #GRBL ' comm port
3564: 28.01 END ' must stop main here
2: 0.02 #main.DROWCx, WCX ' update WCOx
2: 0.02 #main.DROWCy, WCY ' update WCOy
2: 0.02 #main.DROWCz, WCZ ' update WCOz
2: 0.02 #main.DROMPy, MPY ' load MPOSy
2: 0.02 #main.DROMPz, MPZ ' load MPOSz
2: 0.02 #main.DROWPx, MPX - WCX ' load WPOSx
2: 0.02 #main.DROWPy, MPY - WCY ' load WPOSy
2: 0.02 #main.DROWPz, MPZ - WCZ ' load WPOSy
918: 7.21 while time$("milliseconds") < td '
22: 0.17 wend '
92: 0.72 open "Com";str$(p);":115200,n,8,1" for random as #com ' use this for LBB
4: 0.03 close #com '
36: 0.28 #main.CommPort, "reload" '
2: 0.02 #main.Baudrate, "!" ' clr listbox 'BaudRate$
2: 0.02 #main.CommPort, "!" ' clr listbox 'laugh$
8: 0.06 open P$;":";BaudRate$;",n,8,1" for random as #GRBL ' LBB
2: 0.02 #main.CommPort, "!"laugh$ ' combo select box
2: 0.02 #main.Comx, P$ ' testbox
2: 0.02 #main.Baud, BaudRate$ ' test box
2: 0.02 #main.GCwindow, P$;" WAS / IS OPEN " '
2: 0.02 #GRBL, CTLx$ '
6: 0.05 #GRBL, "$$" ' request params
2: 0.02 open DefaultDir$;"\GUI-INI.ini" for input as #MAC '
4: 0.03 #main.GCwindow, "GcodeDir$ = ";GcodeDir$ '
2: 0.02 #main.GCwindow, "EditPath$ = ";EditPath$ '
4: 0.03 #main.GCwindow, "GUI-1Line-[Mac";x;"] = "; Macro$(x) '
8: 0.06 #main.GCwindow, "<";x;"> ";MP1$(x) '
2: 0.02 #main.GCwindow, "<";x;"> ";MP2$(x) '
2: 0.02 #main.GCwindow, "<";x;"> ";MP3$(x) '
2: 0.02 #main.GCwindow, "<";x;"> ";MP4$(x) '

426: 3.35 (Unaccounted for)

« Last Edit: Dec 25th, 2017, 12:49pm by xtal » User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #33 on: Dec 25th, 2017, 12:47pm »

Running Slow profile Program terminates after 3rd tic msg

Profiler report for C:\Users\msw10\AppData\Roaming\Liberty BASIC Pro v4.5.1\GRBL-NU5DggmZ10h-lbb-100.bas

Mon. 25 Dec 2017, 07:36:08

Figures in the first column indicate approximate
time in milliseconds spent in each program line.

Figures in the second column indicate approximate
percentage of the time spent in each program line.

Time spent profiling: 93.978 seconds.

78: 0.08 '** Liberty BASIC 4.51 pro - 3/14/2017 GCode Sender using GRBL 1.1F Program with simple Graphics
8: 0.01 Menu #main, "DROreset", "Reset MPX", [ZX], "Reset MPY", [MZY], "Reset MPZ", [MZZ], "ResetALL", [MZR]
6: 0.01 Menu #main, "HELP", "Q/A.txt", [HELPx],"LibertyBasic.chm",[HELPchm],"LB-Forum",[HELPforum]
2: button #main.JXFe,"--",[JXFe],UL,5,624,14,13 ' - 1
6: 0.01 texteditor #main.WinStatus, 55,125, 420, 80 ' LBB adjust ' Top left Corner - over, down
2: texteditor #main.GCwindow, 55, 210, 420, 260 ' LBB adjust ' bottom right - width, down
2: bmpbutton #main.EMRRESET, BMPdir$;"estop6.bmp",[ESTOP],UL, 188,575 ' EM STOP / CLOSE
2: button #main.rtz, "RTNZERO", [Ret2ZERO], UL, 375, 600, 60, 30 '
2: button #main.mac10, "MP_1", [macP1], UL, 445, 25, 40, 20 ' "G21G90G0Z-26X-230Y-188"
2: statictext #main.nbrfilename, "#File's",570,70,30,14 '
2: listbox #main.S2, SB$(),[Prm2],580,125,102,108 '
2: texteditor #main.PopUp, 500, 250, 475,350 '
1116: 1.19 Open "Liberty Basic GRBL GUI" for Window as #main '
6: 0.01 #main.Status "setfocus" 'MUST setfocus to graphicbox '
12: 0.01 #main "font ms_sans_serif 8" ' was 10 slightly to big
286: 0.30 #main.Status, "font arial 24"
2: #main.DROWCx, "!font arial 14" ' Digital Read Out font size 14
2: #main.DROWCy, "!font arial 14"
2: #main.DROWCz, "!font arial 14"
2: #main.DROMPx, "!font arial 14"
2: #main.DROMPy, "!font arial 14"
6: 0.01 #main.DROMPz, "!font arial 14"
2: #main.DROWPx, "!font arial 14"
2: #main.DROWPy, "!font arial 14"
2: #main.DROWPz, "!font arial 14"
2: #main.green,"!font roman 6 10" '
2: #main.yellow,"Folder" '
2: #main.green,"File" '
2: #main.selbox2, "hide" ' hide this box
2: #main.Filebox,"fill green" '
2: #main.JX, str$(JXvar) : #main.JY, str$(JYvar) : #main.JZ, str$(JZvar)
4: #main.JXF, "F";str$(JXFvar) : #main.JYF,"F";str$(JYFvar) : #main.JZF,"F";str$(JZFvar)
2: magnify=1 : #main.Mag1,1 ' show magnifer value
2: plotxy=2 : #main.PLOTa,"TL" '
2: #main.GCwindow, "TotalScreen Height = "; DisplayHeight '
2: call GetMacros ' load macros from GUI-INI.ini
2: if len(P$)>0 then #main.Comx, P$ '
2: if len(BaudRate$)>0 then #main.Baud, BaudRate$ '
6: 0.01 timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
83048: 88.37 wait '
2: #main.GCwindow, Xtime$ '
204: 0.22 #GRBL, "?"; '' Keep semicolen so ok-ok won't display approx 100 ms interval not sure how semicolen does this
8: 0.01 lastsent=time$("ms") '
4: comlof=lof(#GRBL) ' lof >1 data is in buffer
58: 0.06 if comlof>= 1 then GRBLin$ = GRBLin$ + input$(#GRBL,comlof) ' save comm data to GRCLin$
2: win$=left$(GRBLin$,crlfPos+1) ' extract this line
8: 0.01 timer 0 ' stop timer until line processed *****
16: 0.02 #main.GCwindow, win$ ' print response in response window
116: 0.12 #main.WinStatus, "<";Qcnt;"> ";win$ ' print <~~~~~~~> msg in status window
4: #GRBL, "M5" ' ensure spindle off
34: 0.04 Q=DelayMS(500) ' wait 1/2 second
2: #GRBL, CTLx$; ' send soft reset
26: 0.03 Q=DelayMS(500) ' wait 1/2 second
2: close #GRBL ' comm port
34: 0.04 close #main ' main window
7028: 7.48 END ' must stop main here
2: #main.DROWCx, WCX ' update WCOx
2: #main.DROWCy, WCY ' update WCOy
2: #main.DROWCz, WCZ ' update WCOz
2: #main.DROMPx, MPX ' load MPOSx
2: #main.DROMPy, MPY ' load MPOSy
2: #main.DROWPx, MPX - WCX ' load WPOSx
2: #main.DROWPy, MPY - WCY ' load WPOSy
2: #main.DROWPz, MPZ - WCZ ' load WPOSy
926: 0.99 while time$("milliseconds") < td '
12: 0.01 wend '
2: #main.Status, "fill ";color$ ' fill yellow
8: 0.01 #main.Status, "\"grinata$ ' print data
46: 0.05 #main.GCwindow, "CommPort <"laugh;"> checked at ";time$() '
104: 0.11 open "Com";str$(p);":115200,n,8,1" for random as #com ' use this for LBB
4: close #com '
34: 0.04 #main.CommPort, "reload" '
2: #main.Baudrate, "!" ' clr listbox 'BaudRate$
2: #main.CommPort, "!" ' clr listbox 'laugh$
8: 0.01 open P$;":";BaudRate$;",n,8,1" for random as #GRBL ' LBB
2: #main.Baudrate, "!";BaudRate$ ' combo select box
2: #main.CommPort, "!"laugh$ ' combo select box
2: #main.Comx, P$ ' testbox
2: #main.Baud, BaudRate$ ' test box
4: #main.GCwindow, P$;" WAS / IS OPEN " '
2: #GRBL, CTLx$ '
4: #GRBL, "$$" ' request params
2: #main.GCwindow, "GcodeDir$ = ";GcodeDir$ '
2: #main.GCwindow, "EditPath$ = ";EditPath$ '
2: #main.GCwindow, "GUI-1Line-[Mac";x;"] = "; Macro$(x) '
6: 0.01 #main.GCwindow, "<";x;"> ";MP1$(x) '
2: #main.GCwindow, "<";x;"> ";MP2$(x) '
2: #main.GCwindow, "<";x;"> ";MP3$(x) '
2: #main.GCwindow, "<";x;"> ";MP4$(x) '
562: 0.60 (Unaccounted for)
ENDEND
« Last Edit: Dec 25th, 2017, 12:50pm by xtal » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #34 on: Dec 25th, 2017, 1:32pm »

on Dec 25th, 2017, 12:45pm, xtal wrote:
4: 0.03 timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
2: 0.02 #main.GCwindow, Xtime$ '

Where has the WAIT statement gone? Have you deleted it from your program so that it runs fast? Or have you deleted it from the profiler report because it reported zero time?

Also, where has the OPEN statement gone? In the so-called 'slow' program it takes about a second to open the #main window but in the 'fast' report the line is missing entirely.

Do you realise that your program won't be working the same as in LB 4 because of item 12 in the Compatibility docs: "Opening a file in BINARY mode does not prevent PRINT outputting a newline (CRLF)"? Your code does open the COM port in binary mode so you probably need to add a semicolon to each PRINT.

Richard.
« Last Edit: Dec 25th, 2017, 1:58pm by Richard Russell » User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #35 on: Dec 25th, 2017, 1:57pm »

2: 0.02 #main.GCwindow, Xtime$

the quit was right after this probably need delay......

-- my edit pgm must have screwed up ?
0: [LoopExit] ' wait for user input
4: 0.03 timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
5510: 43.30 wait '
0:



could not having enough memory allocated [something like swapspace] be causing this? Just a thought...
« Last Edit: Dec 25th, 2017, 2:00pm by xtal » User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #36 on: Dec 25th, 2017, 2:24pm »

corrected FAST profiler

Profiler report for C:\Users\msw10\AppData\Roaming\Liberty BASIC Pro v4.5.1\GRBL-NU5DggmZ10h-lbb-100.bas

Mon. 25 Dec 2017, 07:37:00

Figures in the first column indicate approximate
time in milliseconds spent in each program line.

Figures in the second column indicate approximate
percentage of the time spent in each program line.

Time spent profiling: 12.726 seconds.

86: 0.68 '** Liberty BASIC 4.51 pro - 3/14/2017 GCode Sender using GRBL 1.1F Program with simple Graphics
8: 0.06 Menu #main, "DROreset", "Reset MPX", [ZX], "Reset MPY", [MZY], "Reset MPZ", [MZZ], "ResetALL", [MZR]
6: 0.05 Menu #main, "HELP", "Q/A.txt", [HELPx],"LibertyBasic.chm",[HELPchm],"LB-Forum",[HELPforum]
10: 0.08 Menu #main, "DEBUG","--NA1--",[XBUG1],"--NA2--",[XBUG2],"DLY15/35",[DLY32],"DLY25/45",[DLY48],"DLY55/75",[DLY64],"DLY70/90",[DLY80],"DLY85/105",[DLY96]
2: 0.02 button #main.Pause, "Pause", [PAUSE], UL, 5, 450, 45, 20
2: 0.02 button #main.JZMd,"--",[JZMd],UL,158,549,12,13 '
6: 0.05 texteditor #main.WinStatus, 55,125, 420, 80 ' LBB adjust ' Top left Corner - over, down
2: 0.02 texteditor #main.GCwindow, 55, 210, 420, 260 ' LBB adjust ' bottom right - width, down
4: 0.03 bmpbutton #main.EMRRESET, BMPdir$;"estop6.bmp",[ESTOP],UL, 188,575 ' EM STOP / CLOSE
2: 0.02 button #main.mac7, "Mac7", [mac7], UL, 728, 0, 40, 20
2: 0.02 button #main.EditGcode, "Edt GCode", [EditCode], UL, 940,104, 62, 20
2: 0.02 textbox #main.DROMPx, 55, 0, 110, 30 ' Right Justify & TextboxColor$ = "White"
2: 0.02 texteditor #main.PopUp, 500, 250, 475,350 '
1160: 9.12 Open "Liberty Basic GRBL GUI" for Window as #main '
4: 0.03 #main.Status "setfocus" 'MUST setfocus to graphicbox '
14: 0.11 #main "font ms_sans_serif 8" ' was 10 slightly to big
296: 2.33 #main.Status, "font arial 24"
2: 0.02 #main.DROWCx, "!font arial 14" ' Digital Read Out font size 14
2: 0.02 #main.DROWCy, "!font arial 14"
4: 0.03 #main.DROMPx, "!font arial 14"
2: 0.02 #main.DROMPy, "!font arial 14"
6: 0.05 #main.DROMPz, "!font arial 14"
2: 0.02 #main.DROWPx, "!font arial 14"
2: 0.02 #main.DROWPy, "!font arial 14"
2: 0.02 #main.DROWPz, "!font arial 14"
2: 0.02 #main.green,"!font roman 6 10" '
2: 0.02 #main.yellow,"Folder" '
2: 0.02 #main.green,"File" '
2: 0.02 #main.PopUp, "!hide" '
2: 0.02 #main.Filebox,"fill green" '
2: 0.02 #main.JX, str$(JXvar) : #main.JY, str$(JYvar) : #main.JZ, str$(JZvar)
4: 0.03 #main.JXF, "F";str$(JXFvar) : #main.JYF,"F";str$(JYFvar) : #main.JZF,"F";str$(JZFvar)
2: 0.02 magnify=1 : #main.Mag1,1 ' show magnifer value
2: 0.02 if len(P$)>0 then #main.Comx, P$ '
2: 0.02 if len(BaudRate$)>0 then #main.Baud, BaudRate$ '
2: 0.02 call GetCommPorts ' scan & load com#'s array
4: 0.03 timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
5510: 43.30 wait '
2: 0.02 #main.GCwindow, Xtime$ '
116: 0.91 #GRBL, "?"; '' Keep semicolen so ok-ok won't display approx 100 ms interval not sure how semicolen does this
20: 0.16 lastsent=time$("ms") '
10: 0.08 #main.Dly1, int((AvgTime/25)+.5) '
6: 0.05 comlof=lof(#GRBL) ' lof >1 data is in buffer
10: 0.08 if comlof>= 1 then GRBLin$ = GRBLin$ + input$(#GRBL,comlof) ' save comm data to GRCLin$
4: 0.03 timer 0 ' stop timer until line processed *****
2: 0.02 Ze=instr(WIN$,"|",2) : winswitch = 1 ' <Idle|MPos
10: 0.08 #main.GCwindow, win$ ' print response in response window
70: 0.55 #main.WinStatus, "<";Qcnt;"> ";win$ ' print <~~~~~~~> msg in status window
4: 0.03 #GRBL, "M5" ' ensure spindle off
26: 0.20 Q=DelayMS(500) ' wait 1/2 second
2: 0.02 #GRBL, CTLx$; ' send soft reset
32: 0.25 Q=DelayMS(500) ' wait 1/2 second
2: 0.02 close #GRBL ' comm port
30: 0.24 close #main ' main window
3564: 28.01 END ' must stop main here
2: 0.02 #main.DROWCx, WCX ' update WCOx
2: 0.02 #main.DROWCy, WCY ' update WCOy
2: 0.02 #main.DROWCz, WCZ ' update WCOz
2: 0.02 #main.DROMPy, MPY ' load MPOSy
2: 0.02 #main.DROMPz, MPZ ' load MPOSz
2: 0.02 #main.DROWPx, MPX - WCX ' load WPOSx
2: 0.02 #main.DROWPy, MPY - WCY ' load WPOSy
2: 0.02 #main.DROWPz, MPZ - WCZ ' load WPOSy
918: 7.21 while time$("milliseconds") < td '
22: 0.17 wend '
10: 0.08 #main.Status, "\";data$ ' print data
70: 0.55 #main.GCwindow, "CommPort <";p;"> checked at ";time$() '
92: 0.72 open "Com";str$(p);":115200,n,8,1" for random as #com ' use this for LBB
4: 0.03 close #com '
36: 0.28 #main.CommPort, "reload" '
2: 0.02 #main.Baudrate, "!" ' clr listbox 'BaudRate$
2: 0.02 #main.CommPort, "!" ' clr listbox ';P$
8: 0.06 open P$;":";BaudRate$;",n,8,1" for random as #GRBL ' LBB
2: 0.02 #main.CommPort, "!";P$ ' combo select box
2: 0.02 #main.Comx, P$ ' testbox
2: 0.02 #main.Baud, BaudRate$ ' test box
2: 0.02 #main.GCwindow, P$;" WAS / IS OPEN " '
2: 0.02 #GRBL, CTLx$ '
6: 0.05 #GRBL, "$$" ' request params
2: 0.02 open DefaultDir$;"\GUI-INI.ini" for input as #MAC '
4: 0.03 #main.GCwindow, "GcodeDir$ = ";GcodeDir$ '
2: 0.02 #main.GCwindow, "EditPath$ = ";EditPath$ '
4: 0.03 #main.GCwindow, "GUI-1Line-[Mac";x;"] = "; Macro$(x) '
8: 0.06 #main.GCwindow, "<";x;"> ";MP1$(x) '
2: 0.02 #main.GCwindow, "<";x;"> ";MP2$(x) '
2: 0.02 #main.GCwindow, "<";x;"> ";MP3$(x) '
2: 0.02 #main.GCwindow, "<";x;"> ";MP4$(x) '

426: 3.35 (Unaccounted for)

« Last Edit: Dec 25th, 2017, 2:25pm by xtal » User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #37 on: Dec 25th, 2017, 2:31pm »

corrected slow profiler

Profiler report for C:\Users\msw10\AppData\Roaming\Liberty BASIC Pro v4.5.1\GRBL-NU5DggmZ10h-lbb-100.bas

Mon. 25 Dec 2017, 07:36:08

Figures in the first column indicate approximate
time in milliseconds spent in each program line.

Figures in the second column indicate approximate
percentage of the time spent in each program line.

Time spent profiling: 93.978 seconds.

78: 0.08 '** Liberty BASIC 4.51 pro - 3/14/2017 GCode Sender using GRBL 1.1F Program with simple Graphics
8: 0.01 Menu #main, "DROreset", "Reset MPX", [ZX], "Reset MPY", [MZY], "Reset MPZ", [MZZ], "ResetALL", [MZR]
6: 0.01 Menu #main, "HELP", "Q/A.txt", [HELPx],"LibertyBasic.chm",[HELPchm],"LB-Forum",[HELPforum]
10: 0.01 Menu #main, "DEBUG","--NA1--",[XBUG1],"--NA2--",[XBUG2],"DLY15/35",[DLY32],"DLY25/45",[DLY48],"DLY55/75",[DLY64],"DLY70/90",[DLY80],"DLY85/105",[DLY96]
2: button #main.JXFe,"--",[JXFe],UL,5,624,14,13 ' - 1
6: 0.01 texteditor #main.WinStatus, 55,125, 420, 80 ' LBB adjust ' Top left Corner - over, down
2: texteditor #main.GCwindow, 55, 210, 420, 260 ' LBB adjust ' bottom right - width, down
2: bmpbutton #main.EMRRESET, BMPdir$;"estop6.bmp",[ESTOP],UL, 188,575 ' EM STOP / CLOSE
2: button #main.rtz, "RTNZERO", [Ret2ZERO], UL, 375, 600, 60, 30 '
2: button #main.mac10, "MP_1", [macP1], UL, 445, 25, 40, 20 ' "G21G90G0Z-26X-230Y-188"
2: statictext #main.nbrfilename, "#File's",570,70,30,14 '
2: listbox #main.S2, SB$(),[Prm2],580,125,102,108 '
2: texteditor #main.PopUp, 500, 250, 475,350 '
1116: 1.19 Open "Liberty Basic GRBL GUI" for Window as #main '
6: 0.01 #main.Status "setfocus" 'MUST setfocus to graphicbox '
12: 0.01 #main "font ms_sans_serif 8" ' was 10 slightly to big
286: 0.30 #main.Status, "font arial 24"
2: #main.DROWCx, "!font arial 14" ' Digital Read Out font size 14
2: #main.DROWCy, "!font arial 14"
2: #main.DROWCz, "!font arial 14"
2: #main.DROMPx, "!font arial 14"
2: #main.DROMPy, "!font arial 14"
6: 0.01 #main.DROMPz, "!font arial 14"
2: #main.DROWPx, "!font arial 14"
2: #main.DROWPy, "!font arial 14"
2: #main.DROWPz, "!font arial 14"
2: #main.green,"!font roman 6 10" '
2: #main.yellow,"Folder" '
2: #main.green,"File" '
2: #main.selbox2, "hide" ' hide this box
2: #main.Filebox,"fill green" '
2: #main.JX, str$(JXvar) : #main.JY, str$(JYvar) : #main.JZ, str$(JZvar)
4: #main.JXF, "F";str$(JXFvar) : #main.JYF,"F";str$(JYFvar) : #main.JZF,"F";str$(JZFvar)
2: magnify=1 : #main.Mag1,1 ' show magnifer value
2: plotxy=2 : #main.PLOTa,"TL" '
2: #main.GCwindow, "TotalScreen Height = "; DisplayHeight '
2: call GetMacros ' load macros from GUI-INI.ini
2: if len(P$)>0 then #main.Comx, P$ '
2: if len(BaudRate$)>0 then #main.Baud, BaudRate$ '
6: 0.01 timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
83048: 88.37 wait '
2: #main.GCwindow, Xtime$ '
204: 0.22 #GRBL, "?"; '' Keep semicolen so ok-ok won't display approx 100 ms interval not sure how semicolen does this
8: 0.01 lastsent=time$("ms") '
20: 0.02 #main.Dly1, int((AvgTime/25)+.5) '
4: comlof=lof(#GRBL) ' lof >1 data is in buffer
58: 0.06 if comlof>= 1 then GRBLin$ = GRBLin$ + input$(#GRBL,comlof) ' save comm data to GRCLin$
2: win$=left$(GRBLin$,crlfPos+1) ' extract this line
8: 0.01 timer 0 ' stop timer until line processed *****
16: 0.02 #main.GCwindow, win$ ' print response in response window
116: 0.12 #main.WinStatus, "<";Qcnt;"> ";win$ ' print <~~~~~~~> msg in status window
4: #GRBL, "M5" ' ensure spindle off
34: 0.04 Q=DelayMS(500) ' wait 1/2 second
2: #GRBL, CTLx$; ' send soft reset
26: 0.03 Q=DelayMS(500) ' wait 1/2 second
2: close #GRBL ' comm port
34: 0.04 close #main ' main window
7028: 7.48 END ' must stop main here
2: #main.DROWCx, WCX ' update WCOx
2: #main.DROWCy, WCY ' update WCOy
2: #main.DROWCz, WCZ ' update WCOz
2: #main.DROMPx, MPX ' load MPOSx
2: #main.DROMPy, MPY ' load MPOSy
2: #main.DROWPx, MPX - WCX ' load WPOSx
2: #main.DROWPy, MPY - WCY ' load WPOSy
2: #main.DROWPz, MPZ - WCZ ' load WPOSy
926: 0.99 while time$("milliseconds") < td '
12: 0.01 wend '
2: #main.Status, "fill ";color$ ' fill yellow
8: 0.01 #main.Status, "\";data$ ' print data
46: 0.05 #main.GCwindow, "CommPort <";p;"> checked at ";time$() '
104: 0.11 open "Com";str$(p);":115200,n,8,1" for random as #com ' use this for LBB
4: close #com '
34: 0.04 #main.CommPort, "reload" '
2: #main.Baudrate, "!" ' clr listbox 'BaudRate$
2: #main.CommPort, "!" ' clr listbox ';P$
8: 0.01 open P$;":";BaudRate$;",n,8,1" for random as #GRBL ' LBB
2: #main.Baudrate, "!";BaudRate$ ' combo select box
2: #main.CommPort, "!";P$ ' combo select box
2: #main.Comx, P$ ' testbox
2: #main.Baud, BaudRate$ ' test box
4: #main.GCwindow, P$;" WAS / IS OPEN " '
2: #GRBL, CTLx$ '
4: #GRBL, "$$" ' request params
2: #main.GCwindow, "GcodeDir$ = ";GcodeDir$ '
2: #main.GCwindow, "EditPath$ = ";EditPath$ '
2: #main.GCwindow, "GUI-1Line-[Mac";x;"] = "; Macro$(x) '
6: 0.01 #main.GCwindow, "<";x;"> ";MP1$(x) '
2: #main.GCwindow, "<";x;"> ";MP2$(x) '
2: #main.GCwindow, "<";x;"> ";MP3$(x) '
2: #main.GCwindow, "<";x;"> ";MP4$(x) '
562: 0.60 (Unaccounted for)
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #38 on: Dec 25th, 2017, 11:22pm »

this is part1 of form

[WindowSetup]
'NOMAINWIN
WindowWidth = 1020 : WindowHeight = 700 '877
UpperLeftX = INT((DisplayWidth-WindowWidth)/2)
UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
Menu #main, "DROreset", "Reset MPX", [ZX], "Reset MPY", [MZY], "Reset MPZ", [MZZ], "ResetALL", [MZR]
Menu #main, "HELP", "Q/A.txt", [HELPx],"LibertyBasic.chm",[HELPchm],"LB-Forum",[HELPforum]
[ControlSetup]
statictext #main.statictext2, "MPOS", 60, 105, 40, 20
button #main.hle, "Hard Limits",[HLTOGGLE], UL, 100, 103, 60, 20
graphicbox #main.HLimit, 165, 103, 35, 20
statictext #main.statictext3, "WCO", 230, 105, 25, 20
statictext #main.statictext4, "WPOS", 350, 105, 40, 20
button #main.button5, "$RST=$",[RSTdollar], UL, 5, 0, 45, 20
button #main.button6, "$RST=#",[RSTnumber], UL, 5, 25, 45, 20
button #main.button7, "$RST=*",[RSTastric], UL, 5, 50, 45, 20
button #main.button8, "$SLP",[SLP], UL, 5, 75, 45, 20
button #main.buttonx, "$G val", [GGG], UL, 5, 100, 45, 20
button #main.buttony, "$# GC ", [NBR], UL, 5, 125, 45, 20
button #main.button9, " win$ ",[button9], UL, 5, 150, 45, 20
button #main.button10, " WIN$ ",[button10], UL, 5, 175, 45, 20
button #main.button11, " ? ", [STATUS], UL, 5, 200, 45, 20
button #main.Ncode, "$N 1st", [NCMD], UL, 5, 225, 45, 20
button #main.Ccode, "$C chk", [CCMD], UL, 5, 250, 45, 20
button #main.info, "$I Info", [INFO], UL, 5, 275, 45, 20
button #main.help, "$ Help ", [HELP], UL, 5, 300, 45, 20
button #main.ALRReset, "$X ALR", [XCMD], UL, 5, 325, 45, 20
button #main.home, "$H Hm", [HOME], UL, 5, 350, 45, 20
button #main.softReset, "Ctl-X ", [softRest], UL, 5, 375, 45, 20
button #main.params,"$$ Stat", [PARAMS], UL, 5, 400, 45, 20
button #main.Resume, "Resume", [RESUME], UL, 5, 425, 45, 20
button #main.Pause, "Pause", [PAUSE], UL, 5, 450, 45, 20
textbox #main.ManualTx, 5, 475, 470, 20
button #main.Enter,"",[Enter],UL,473,475,5,20
button #main.ManualSend, "SEND COMMANDS", [SEND], UL, 190, 500, 180, 20
button #main.JXplus, "X ++", [JogXP], UL, 5, 495, 55, 20
button #main.JYplus, "Y ++", [JogYP], UL, 65, 495, 55, 20
button #main.JZplus, "Z ++", [JogZP], UL, 125, 495, 55, 20
button #main.JXPa,"+",[JXPa],UL,5,515,12,13
button #main.JXPb,"+",[JXPb],UL,16,515,12,13
button #main.JXPc,"+",[JXPc],UL,27,515,12,13
button #main.JXPd,"+",[JXPd],UL,38,515,12,13
button #main.JXPe,"+",[JXPe],UL,49,515,12,13
stylebits #main.JX, _ES_CENTER,0,0,0
textbox #main.JX, 5, 528, 55, 20
button #main.JXMa,"--",[JXMa],UL,5,549,12,13
button #main.JXMb,"--",[JXMb],UL,16,549,12,13
button #main.JXMc,"--",[JXMc],UL,27,549,12,13
button #main.JXMd,"--",[JXMd],UL,38,549,12,13
button #main.JXMe,"--",[JXMe],UL,49,549,12,13
button #main.JYPa,"+",[JYPa],UL,65,515,12,13
button #main.JYPb,"+",[JYPb],UL,76,515,12,13
button #main.JYPc,"+",[JYPc],UL,87,515,12,13
button #main.JYPd,"+",[JYPd],UL,98,515,12,13
button #main.JYPe,"+",[JYPe],UL,109,515,12,13
stylebits #main.JY, _ES_CENTER,0,0,0
textbox #main.JY, 65, 528, 55, 20
button #main.JYMa,"--",[JYMa],UL,65,549,12,13
button #main.JYMb,"--",[JYMb],UL,76,549,12,13
button #main.JYMc,"--",[JYMc],UL,87,549,12,13
button #main.JYMd,"--",[JYMd],UL,98,549,12,13
button #main.JYMe,"--",[JYMe],UL,109,549,12,13
button #main.JZPa,"+",[JZPa],UL,125,515,12,13
button #main.JZPb,"+",[JZPb],UL,136,515,12,13
button #main.JZPc,"+",[JZPc],UL,147,515,12,13
button #main.JZPd,"+",[JZPd],UL,158,515,12,13
button #main.JZPe,"+",[JZPe],UL,169,515,12,13
stylebits #main.JZ, _ES_CENTER,0,0,0
textbox #main.JZ, 125, 528, 55, 20
button #main.JZMa,"--",[JZMa],UL,125,549,12,13
button #main.JZMb,"--",[JZMb],UL,136,549,12,13
button #main.JZMc,"--",[JZMc],UL,147,549,12,13
button #main.JZMd,"--",[JZMd],UL,158,549,12,13
button #main.JZMe,"--",[JZMe],UL,169,549,12,13
button #main.JXminus, "X ---", [JogXM], UL,5, 563, 55, 20
button #main.JYminus, "Y ---", [JogYM], UL,65, 563, 55, 20
button #main.JZminus, "Z ---", [JogZM], UL,125, 563, 55, 20
button #main.JXFa,"+",[JXFa],UL,5,585,14,13
button #main.JXFb,"+",[JXFb],UL,18,585,14,13
button #main.JXFc,"+",[JXFc],UL,31,585,14,13
button #main.JXFd,"+",[JXFd],UL,44,585,14,13
stylebits #main.JXF, _ES_CENTER,0,0,0
textbox #main.JXF, 5, 600, 55, 22
button #main.JXFe,"--",[JXFe],UL,5,624,14,13
button #main.JXFf,"--",[JXFf],UL,18,624,14,13
button #main.JXFg,"--",[JXFg],UL,31,624,14,13
button #main.JXFh,"--",[JXFh],UL,44,624,14,13
button #main.JYFa,"+",[JYFa],UL,65,585,14,13
button #main.JYFb,"+",[JYFb],UL,78,585,14,13
button #main.JYFc,"+",[JYFc],UL,91,585,14,13
button #main.JYFd,"+",[JYFd],UL,104,585,14,13
stylebits #main.JYF, _ES_CENTER,0,0,0
textbox #main.JYF, 65, 600, 55, 22
button #main.JYFe,"--",[JYFe],UL,65,624,14,13
button #main.JYFf,"--",[JYFf],UL,78,624,14,13
button #main.JYFg,"--",[JYFg],UL,91,624,14,13
button #main.JYFh,"--",[JYFh],UL,104,624,14,13 '
button #main.JZFa,"+",[JZFa],UL,125,585,14,13
button #main.JZFb,"+",[JZFb],UL,138,585,14,13
button #main.JZFc,"+",[JZFc],UL,151,585,14,13
button #main.JZFd,"+",[JZFd],UL,164,585,14,13
stylebits #main.JZF, _ES_CENTER,0,0,0
textbox #main.JZF, 125, 600, 55, 22
button #main.JZFe,"--",[JZFe],UL,125,624,14,13
button #main.JZFf,"--",[JZFf],UL,138,624,14,13
button #main.JZFg,"--",[JZFg],UL,151,624,14,13
button #main.JZFh,"--",[JZFh],UL,164,624,14,13
texteditor #main.WinStatus, 55,125, 420, 80
texteditor #main.GCwindow, 55, 210, 420, 260
bmpbutton #main.EMRRESET, BMPdir$;"estop6.bmp",[ESTOP],UL, 188,575
button #main.M5, "M3", [M3], UL, 290, 580, 30, 20
button #main.M5, "M5", [M5], UL, 290, 605, 30, 20
button #main.Connect, "CONNECT", [CONNECT], UL, 375, 500, 60, 20
button #main.Connect, "Scan", [ScanPorts], UL, 440, 500, 35, 20
combobox #main.CommPort, port$(), [portclick], 375, 525, 60, 20
combobox #main.Baudrate, baud$(), [BaudSel], 375, 550, 60, 20
button #main.Disconnect, "HANG UP", [DISCONNECT], UL, 375, 575, 60, 20
stylebits #main.Mag1, _ES_CENTER,0,0,0
textbox #main.Mag1, 435, 575, 40, 20
button #main.rtz, "RTNZERO", [Ret2ZERO], UL, 375, 600, 60, 30
button #main.magnify, "MAG",[MAGNIFY],UL,435,600,40,30
stylebits #main.PLOTa, _ES_CENTER,0,0,0
textbox #main.PLOTa, 435, 525, 40, 20
button #main.plotting, "PLOT",[PLOTXY],UL,435,550,40,20
graphicbox #main.Status, 188, 522, 180, 50
TextboxColor$ = "yellow"
textbox #main.Comx, 320,580,50,20
textbox #main.Baud, 320,605,50,20
TextboxColor$ = "white"
button #main.park, "Park", [PARK], UL, 445, 0, 40, 20
button #main.mac1, "Mac1", [mac1], UL, 485, 0, 40, 20
button #main.mac2, "Mac2", [mac2], UL, 525, 0, 40, 20
button #main.mac3, "Mac3", [mac3], UL, 565, 0, 40, 20
button #main.mac4, "Mac4", [mac4], UL, 605, 0, 40, 20
button #main.mac5, "Mac5", [mac5], UL, 645, 0, 40, 20
button #main.mac6, "Mac6", [mac6], UL, 687, 0, 40, 20
button #main.mac7, "Mac7", [mac7], UL, 728, 0, 40, 20
button #main.mac8, "Mac8", [mac8], UL, 773, 0, 40, 20
button #main.mac9, "Mac9", [mac9], UL, 818, 0, 40, 20
button #main.X1,"ScrT1",[SCRa],UL, 860,0,40,20
button #main.X2,"ScrT2",[SCRb],UL, 900,0,40,20
button #main.X3,"ScrT3",[SCRc],UL, 860,25,40,20
button #main.X4,"ScrT4",[SCRd],UL, 900,25,40,20
button #main.X5,"ScrT5",[SCRe],UL, 860,49,40,20
button #main.X6,"ScrT6",[SCRf],UL, 900,49,40,20
button #main.X7,"ScrT7",[SCRg],UL, 860,75,40,20
button #main.X8,"PLOT",[PLOTTING],UL, 900,75,40,20
graphicbox #main.PlotIndicator, 900,69,40,6
button #main.X9,"P I P",[PIP],UL, 860,104,40,20
button #main.X10,"Log",[LOG],UL, 900,104,40,20
graphicbox #main.LogIndicator, 900,97,40,6
button #main.mac10, "MP_1", [macP1], UL, 445, 25, 40, 20
button #main.mac11, "MP_2", [macP2], UL, 485, 25, 40, 20
button #main.mac12, "MP_3", [macP3], UL, 525, 25, 40, 20
button #main.mac10, "MP_4", [macP4], UL, 565, 25, 40, 20
button #main.mac10, "Level T", [macP5], UL, 605, 25, 40, 20
button #main.mac10, "Drill T",[macP6] , UL, 645, 25, 40, 20
button #main.maca, "AtoolZ", [AutoTZ], UL, 685, 25, 40, 20
button #main.macb, "SaveM", [SaveM], UL, 725, 25, 40, 20
combobox #main.ldmac, lac$(),[ldmac],765,25,50,20
combobox #main.svmac, mac$(),[svmac],817,25,42,20
button #main.LdGcode, "Opn GCode", [OpenCode], UL, 940, 0, 62, 20
button #main.RunGcode, "Run GCode", [RunCode], UL, 940, 25, 62, 20
button #main.buttonx, "Step GCode", [StepGC], UL, 940, 49, 62, 20
button #main.buttony, "Cls GCode",[CloseGC], UL, 940, 75, 62, 20
button #main.EditGcode, "Edt GCode", [EditCode], UL, 940,104, 62, 20
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #39 on: Dec 25th, 2017, 11:27pm »

This is part 2 of form + code
this code runs 3 100 counts then terminates for testing

normally the count is 1776 approx 30 seconds

The TIC value is displayed after each 100 count
Run program do nothing else program runs slow
Run program then immediately click the print window
program runs fast..........
running on w10 pro , but suspect same may happen on Wxp

I think that if a lot of buttons + other is deleted it will run ok



Code:
button      #main.path,"<Path$>",[PathClr],UL, 445,70,50,16
graphicbox  #main.PathBox, 445,48,413,20
statictext  #main.drive, "Drive",415,104,30,16
combobox    #main.drvbox, drv$(), comboClick,445,102,50,25
ComboboxColor$ = "yellow"
combobox    #main.selbox1, fdr$(),comboClick,500,104,358,2
ComboboxColor$ = "green"
combobox    #main.selbox2, fil$(),comboClick,500,104,358,2
graphicbox  #main.Fdrbox,500,87,72,17
button      #main.yellow,"Folder", comboClick,UL,513,89,45,12
graphicbox  #main.Filebox,573,87,72,17
button      #main.green,"File",comboClick,UL,586,89,45,12
statictext  #main.nbrfdrname, "#Fdr's",500,70,30,14
textbox     #main.nbrfdr, 535,69,30,17
statictext  #main.nbrfilename, "#File's",570,70,30,14
textbox     #main.nbrfile, 605,69,50,17
statictext  #main.FilLen, "#FileLen", 660,69,50,14
textbox     #main.fbox, 710,69,68,17
button      #main.MZX, "Zx", [MZX], UL, 165, 0, 30, 30
button      #main.MZY, "Zy", [MZY], UL, 165, 35, 30, 30
button      #main.MZZ, "Zz", [MZZ], UL, 165, 70, 30, 30
button      #main.MZR, "ZR", [MZR], UL, 195, 0, 25, 100
stylebits   #main.DROMPx, _ES_RIGHT,0,0,0
textbox     #main.DROMPx, 55, 0, 110, 30
stylebits   #main.DROMPy, _ES_RIGHT,0,0,0
textbox     #main.DROMPy, 55, 35, 110, 30
stylebits   #main.DROMPz, _ES_RIGHT,0,0,0
textbox     #main.DROMPz, 55, 70, 110, 30
stylebits   #main.DROWCx, _ES_RIGHT,0,0,0
textbox     #main.DROWCx, 220, 0, 110, 30
stylebits   #main.DROWCy, _ES_RIGHT,0,0,0
textbox     #main.DROWCy, 220, 35, 110, 30
stylebits   #main.DROWCz, _ES_RIGHT,0,0,0
textbox     #main.DROWCz, 220, 70, 110, 30
stylebits   #main.DROWPx, _ES_RIGHT,0,0,0
textbox     #main.DROWPx, 330, 0, 110, 30
stylebits   #main.DROWPy, _ES_RIGHT,0,0,0
textbox     #main.DROWPy, 330, 35, 110, 30
stylebits   #main.DROWPz, _ES_RIGHT,0,0,0
textbox     #main.DROWPz, 330, 70, 110, 30
listbox     #main.S1, SA$(),[Prm1],476,125,102,108
listbox     #main.S2, SB$(),[Prm2],580,125,102,108
listbox     #main.S3, SC$(),[Prm3],686,125,102,108
listbox     #main.S4, SD$(),[Prm4],792,125,102,108
listbox     #main.S5, SE$(),[Prm5],898,125,102,108
texteditor  #main.PopUp, 500, 250, 475,350
graphicbox  #main.Plot3, 476, 235, 525,405

Open "Liberty Basic GRBL GUI" for Window as #main
#main "trapclose [quit]"
oldtime=time$("ms")
etime=0 : lastsent=0
bucketdelay=15
[LoadMacros]
[Glog]
[ErrLoop1]
[LoopExit]
timer bucketdelay, [ckbuf]
wait
[ckbuf]
nowtime=time$("ms")
Qcnt=Qcnt+1
if Qcnt >99 then
x$=time$()
elapsedtime=(nowtime-oldtime)/1000
oldtime=time$("ms")
etime=etime+elapsedtime
mstime=int((etime/100)*10000)/10
Xtime$="<";x$;">  <";Qcnt;">  <";etime;"sec>  <";mstime;"msTIC";">"
#main.GCwindow, Xtime$ 
print Xtime$ 
abc=abc+1
end if
if abc=3 then [quit]
if CommOpen=0 then [LoopExit]
[getbuffer]
[getmessage]
[loopx]
[PreProcess]
[StepWait]
[PrintResponse]
goto [LoopExit]
[ESTOP]
[quit]
close #main
END


 
« Last Edit: Dec 25th, 2017, 11:39pm by xtal » User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 27
xx Re: LBB runs 7 times slower than LB on my GBRL-Sen
« Reply #40 on: Dec 25th, 2017, 11:56pm »



After deleteing different combinations of buttons etc ,, the TIC value speeds up , but I think it's just because FORM OVERHEAD is being removed.

removing all except MENU and
texteditor #main.WinStatus, 55,125, 420, 80
texteditor #main.GCwindow, 55, 210, 420, 260
Will give 15+ TIC value then
adding 7 buttons TIC is 18+
adding 7 graphicboxes TIC is 20+
adding 5 listboxes TIC 15-16
adding 7 text boxes TIC 19+
adding 7 comboboxes TIC 17-18
adding 7 statictext TIC 18+
adding 7 style bits TIC 15+

It appears to me that the more you add to the form the more you increase the TIC value unless the print window is selected...



« Last Edit: Dec 26th, 2017, 12:56am by xtal » User IP Logged

Pages: 1 2 3 4 5  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls