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 1565 times)
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 #19 on: Dec 23rd, 2017, 2:00pm »

smiley No, I was thinking 16ms is a massive delay if you have a lot to do.
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 #20 on: Dec 23rd, 2017, 5:30pm »

on Dec 23rd, 2017, 2:00pm, Rod wrote:
smiley No, I was thinking 16ms is a massive delay if you have a lot to do.

As far as I can see the OP is using the timer appropriately. As I understand it he is using it to process incoming serial data, so the important thing is that the serial input buffer cannot overflow between one timer 'tick' and the next. 16ms is not a "massive" amount of time from this perspective: even at 115,200 baud the maximum amount of data that can be received in 16ms is fewer than 200 bytes, which is much smaller than the size of the input buffer.

Richard.
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 #21 on: Dec 23rd, 2017, 9:21pm »

on Dec 23rd, 2017, 1:20pm, xtal wrote:
invalidtag tag [ckbuf] is intermittantly displayed

LB 4 has a bug which means that you cannot (safely) use the timer with a SUB handler but only with a branch label. This means that, as you found, it is possible for a timer event to fire when the target label is out-of-scope (e.g. when your program's execution is inside a sub or function), causing an error to be reported.

You can work around this by ensuring that your program never executes a SCAN or WAIT statement when inside a function or sub, that way the timer handler will only be called when its target is in scope. But that's a serious limitation; for example it prevents you encapsulating a GUI window and all its control handlers inside a SUB, which is often desirable from a structured programming viewpoint.

Fortunately LBB does not have that bug. You can safely use a SUB handler for your timer events, and since SUBs are always in scope you can use SCAN or WAIT statements anywhere you like within your program without any risk of an error. Of course you will probably want to make all your other event handlers SUBs as well, but that's good practice anyway (and works in LB).

Richard.
« Last Edit: Dec 23rd, 2017, 9:23pm 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 #22 on: Dec 24th, 2017, 3:18pm »

modified my complete program Many buttons etc...

LB = RUN LBB = RUN Program
''display TIC value - stop timer - set timer
[LoopExit] ' Display tic amount = 15 that I'm setting
#main.GCwindow, "Set TIC=";bucketdelay
timer 0
timer bucketdelay, [ckbuf] ' every 15 ms ckbuf
wait
' Set cnt to 99 instead of 1775
if Qcnt >99 then
'' COMPUTE TIC Time in millisec
mstime=int((etime/100)*10000)/10

LB = Run
Opened Dec 24, 2017 - 10:15:27
<10:15:28> <100> <1.659sec> <16.5msTIC>
<10:15:30> <100> <1.732sec> <17.3msTIC>
<10:15:32> <100> <1.697sec> <16.9msTIC>
<10:15:34> <100> <1.627sec> <16.2msTIC>
Closed Dec 24, 2017 - 10:15:34

Task mgr chrome 0.1-.3% lbpro 1-6%
notepad 0.1% taskmgr .3-1.1%


LBB = Run Program
Opened Dec 24, 2017 - 10:30:22
<10:34:52> <100> <314.259sec> <3142.5msTIC>
<10:40:03> <100> <311.731sec> <3117.3msTIC>
<10:45:16> <100> <312.729sec> <3127.2msTIC>
<10:50:27> <100> <310.503sec> <3105msTIC>
<10:55:37> <100> <310.218sec> <3102.1msTIC>
<11:00:49> <100> <311.957sec> <3119.5msTIC>
Closed Dec 24, 2017 - 11:05:06
--wow 3 second TIC time SB 15+ ms
Task mgr chrome 0.1-.3% LB Booster .1-1.3%
notepad 0.1% taskmgr .3-1.1%



Earlier I saw BBCwrun6 in task mgr apps @ 30% I have no Idea what that was , but now its gone ...
Again this is W10 pro
Tried compatility run whit same results
« Last Edit: Dec 24th, 2017, 3:22pm 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 #23 on: Dec 24th, 2017, 4:10pm »

Please show us the profiler report (you can edit out all the lines that show zero time, to reduce the size).

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 #24 on: Dec 24th, 2017, 6:11pm »

[copy]
Start Copy
Profiler report for C:\Users\msw10\AppData\Roaming\Liberty BASIC Pro v4.5.1\GRBL-NU5DggmZ10h-lbb.bas

Sun. 24 Dec 2017, 12:48:14

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: 350.024 seconds.

82: 0.02 '** Liberty BASIC 4.51 pro - 3/14/2017 GCode Sender using GRBL 1.1F Program with simple Graphics
2: dim info$(BrowseLen,BrowseLen) ' folder and file
8: Menu #main, "DROreset", "Reset MPX", [ZX], "Reset MPY", [MZY], "Reset MPZ", [MZZ], "ResetALL", [MZR]
6: Menu #main, "HELP", "Q/A.txt", [HELPx],"LibertyBasic.chm",[HELPchm],"LB-Forum",[HELPforum]
8: 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.params,"$$ Stat", [PARAMS], UL, 5, 400, 45, 20
2: button #main.JZMa,"--",[JZMa],UL,125,549,12,13 '
2: button #main.JZFg,"--",[JZFg],UL,151,624,14,13 '
4: 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
4: bmpbutton #main.EMRRESET, BMPdir$;"estop6.bmp",[ESTOP],UL, 188,575 ' EM STOP / CLOSE
2: button #main.mac6, "Mac6", [mac6], UL, 687, 0, 40, 20
2: button #main.RunGcode, "Run GCode", [RunCode], UL, 940, 25, 62, 20
2: button #main.MZR, "ZR", [MZR], UL, 195, 0, 25, 100 '
4: texteditor #main.PopUp, 500, 250, 475,350 '
1124: 0.32 Open "Liberty Basic GRBL GUI" for Window as #main '
4: #main.Status "setfocus" 'MUST setfocus to graphicbox '
2: #main.PopUp, "!hide" '
2: #main.selbox2, "hide" ' hide this box
2: #main.Filebox,"backcolor green" '
4: #main.yellow,"!font roman 6 10" '
4: #main.green,"!font roman 6 10" '
2: #main.yellow,"Folder" '
2: #main.green,"File" '
6: #main.JX, str$(JXvar) : #main.JY, str$(JYvar) : #main.JZ, str$(JZvar)
6: #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: if len(P$)>0 then #main.Comx, P$ '
2: if len(BaudRate$)>0 then #main.Baud, BaudRate$ '
26: 0.01 #main.GCwindow, "Set TIC=";bucketdelay
32504: 9.29 wait '
2: #main.GCwindow, Xtime$ '
74: 0.02 #GRBL, "?"; '' Keep semicolen so ok-ok won't display ' approx 100 ms interval '' not sure how semicolen does this
8: #main.Dly1, int((AvgTime/25)+.5) '
2: comlof=lof(#GRBL) ' lof >1 data is in buffer
12: if comlof>= 1 then GRBLin$ = GRBLin$ + input$(#GRBL,comlof) ' save comm data to GRCLin$
4: timer 0 ' stop timer until line processed *****
2: Ze=instr(WIN$,"|",2) : winswitch = 1 ' <Idle|MPos
2: Ze$=mid$(WIN$,2,Ze-2) ' isolate Status
2: call DROWCOUPDATE ' [WCO_Update][MPOS_Update] [WPOS_Update]
2: else ' " <~~~~~~~~~~~~~~~~~~~~~~~> "
62: 0.02 #main.WinStatus, "<";Qcnt;"> ";win$ ' print <~~~~~~~> msg in status window
4: #GRBL, "M5" ' ensure spindle off
34: 0.01 Q=DelayMS(500) ' wait 1/2 second
34: 0.01 Q=DelayMS(500) ' wait 1/2 second
2: close #GRBL ' comm port
36: 0.01 close #main ' main window
31032: 8.87 #main.DROWCx, "!font arial 14" '
30944: 8.84 #main.DROWCy, "!font arial 14" '
164: 0.05 #main.DROWCy, WCY ' update WCOy
172: 0.05 #main.DROWCz, WCZ ' update WCOz
31016: 8.86 #main.DROMPx, "!font arial 14" '
166: 0.05 #main.DROMPx, MPX ' load MPOSx
31102: 8.89 #main.DROMPy, "!font arial 14" '
166: 0.05 #main.DROMPy, MPY ' load MPOSy
156: 0.04 #main.DROMPz, MPZ ' load MPOSz
31018: 8.86 #main.DROWPx, "!font arial 14" '
166: 0.05 #main.DROWPx, MPX - WCX ' load WPOSx
31072: 8.88 #main.DROWPy, "!font arial 14" '
31014: 8.86 #main.DROWPz, "!font arial 14" '
912: 0.26 while time$("milliseconds") < td '
18: 0.01 wend '
31834: 9.09 #main.Status, "font Courier_New ";fontsize$ '
126: 0.04 #main.Status, "cls" ' clr graphics box
94: 0.03 #main.Status, "fill ";color$ ' fill yellow
16: #main.Status, "backcolor ";color$ ' text background
4: #main.Status, "place "laughl$;" "laughd$ ' from top left over->grinown
346: 0.10 #main.Status, "\"grinata$ ' print data
54: 0.02 #main.GCwindow, "CommPort <"laugh;"> checked at ";time$() '
94: 0.03 open "Com";str$(p);":115200,n,8,1" for random as #com ' use this for LBB
4: close #com '
2: [trap] '
2: #main.Baudrate, "!" ' clr listbox 'BaudRate$
8: open P$;":";BaudRate$;",n,8,1" for random as #GRBL ' LBB
2: #main.Baudrate, "!";BaudRate$ ' combo select box
2: #main.Comx, P$ ' testbox
2: #main.Baud, BaudRate$ ' test box
2: #main.GCwindow, P$;" WAS / IS OPEN " '
4: #GRBL, CTLx$ '
4: #GRBL, "$$" ' request params
276: 0.08 wait '
2: #main.GCwindow, "GcodeDir$ = ";GcodeDir$ '
4: #main.GCwindow, "BMPdir$ = ";BMPdir$ '
2: #main.GCwindow, "EditPath$ = ";EditPath$ '
2: #main.GCwindow, "GUI-1Line-[Mac";x;"] = "; Macro$(x) '
8: #main.GCwindow, "<";x;"> ";MP1$(x) '
2: #main.GCwindow, "<";x;"> ";MP2$(x) '
4: #main.GCwindow, "<";x;"> ";MP3$(x) '
2: #main.GCwindow, "<";x;"> ";MP4$(x) '
2: StatusDly=55 : wait ' approx 64
392: 0.11 Calldll #user32, "ScreenToClient",_
758: 0.22 (Unaccounted for)
Finish Copy

[/code]
« Last Edit: Dec 24th, 2017, 6:15pm 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 #25 on: Dec 24th, 2017, 6:17pm »

Ran LBB on older laptop with WinXP and it also has the big delays
User IP Logged

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

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