[InitColors]
'Please use default colors when possible.
'ForegroundColor$ = "Black"
'BackgroundColor$ = "Buttonface"
True = 1 : False = 0
'------------
[WindowSetup]
NOMAINWIN ' allow no print window
WindowWidth = 1020 : WindowHeight = 700 '877
UpperLeftX = INT((DisplayWidth-WindowWidth)/2) ' UpperLeftX = DisplayWidth-WindowWidth
UpperLeftY = INT((DisplayHeight-WindowHeight)/2) ' UpperLeftY = DisplayHeight-WindowHeight
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]
bucketdelay=3
'--------------
[ControlSetup]
'--------------
statictext #main.statictext2, "MPOS", 60, 105, 40, 20
statictext #main.statictext3, "WCO", 230, 105, 25, 20
statictext #main.statictext4, "WPOS", 350, 105, 40, 20
textbox #main.ManualTx, 5, 475, 470, 20 ' over-down-width-height
stylebits #main.Enter, _BS_DEFPUSHBUTTON,0,0,0 ' Enable ENTER Key
button #main.Enter,"",[Enter],UL,473,475,5,20 ' hidden button sort of !
button #main.ManualSend, "SEND COMMANDS", [SEND], UL, 190, 500, 180, 20
'===========
texteditor #main.WinStatus, 55,125, 420, 80 ' LBB adjust ' Top left Corner - over, down
texteditor #main.GCwindow, 55, 210, 420, 260 ' LBB adjust ' bottom right - width, down
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 ' **************
'---------
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 ' Right Justify & TextboxColor$ = "White"
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 '480 '
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 ' home is 0,405
' START UP VALUES
Thirty=time$("seconds") ' seconds since midnight '
Open "Liberty Basic GRBL GUI" for Window as #main '
#main "trapclose [quit]" '
'------------
#main.GCwindow, "TotalScreen Width = "; DisplayWidth '
#main.GCwindow, "TotalScreen Height = "; DisplayHeight '
x$=time$() ' setup 1st time msg
TmvalNu=val(mid$(x$,4,2))*60 ' setup 1st time msg
TsvalNu=val(right$(x$,2))+TmvalNu ' setup 1st time msg
'=============
[LoadMacros] '' code removed '
[Glog] '' code removed '
[ErrLoop1] '' code removed '
[LoopExit] '' code removed ' wait for user input
timer bucketdelay, [ckbuf] ' every 3 ms ckbuf
wait '
'--------------------------------------------------------------------------------------------------------
[ckbuf] '
Qcnt=Qcnt+1 '
'' print Qcnt;"-"; '' added speeds up when move window
#main.WinStatus, Qcnt '' trying this
'--------------------------------------------------------------------------------------------------------
if Qcnt >1775 then ' approx 30+ sec elapsed
x$=time$() '
TsvalOld=TsvalNu ' last total seconds -> old
TmvalOld=TmvalNu ' last m*60 seconds -> old
TmvalNu=val(mid$(x$,4,2))*60 ' get nu m *60 seconds 9*60=540 0*60=0 ==600
TsvalNu=val(right$(x$,2))+TmvalNu ' compute new total seconds
xx = abs(TsvalNu-TsvalOld) ' compute new-old
#main.GCwindow, "<";Qcnt;"> <";xx;"> ";x$ ' 1st display & every hour = funny number
Qcnt=0 '
end if '
if CommOpen=0 then [LoopExit] ' can't get input if comm closed
'------------[getbuffer] '' code removed '
[getmessage] '' code removed '
[loopx] '' code removed '
[PreProcess] '
'' timer 0 ' stop timer until line processed *****
'' code removed
[StepWait]
'' code removed
[PrintResponse] ' 3 ms 28a
'' code removed
goto [LoopExit] ' **************************
[ESTOP]
[quit] '
'' code removed
close #main ' main window
END ' must stop main
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
[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
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,105,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,445,87,72,17
button #main.yellow,"Folder", comboClick,UL,455,89,45,12
graphicbox #main.Filebox,525,87,72,17
button #main.green,"File",comboClick,UL,535,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
'------- added for test ?Delay and TicMs
graphicbox #main.BMPB, 188, 575, 100, 65
button #main.CLO, "CLOSE", [quit], UL, 198, 584, 80, 25
button #main.STP, "E-STOP", [ESTOP], UL, 198, 606, 80, 25
statictext #main.Dly0,"?Delay", 600,87,35,17
textbox #main.Dly1, 640,87,25,17
statictext #main.Tic0,"TicMS", 670,87,35,17
textbox #main.Tic1, 710,87,45,17
Open "Liberty Basic GRBL GUI" for Window as #main
#main "trapclose [quit]"
#main.Filebox, "fill green"
#main.Fdrbox, "fill yellow"
#main.Filebox, "fill green"
#main.BMPB, "fill red"
#main.yellow,"!font roman 6 10"
#main.green,"!font roman 6 10"
td = time$("milliseconds") +5000
while time$("milliseconds") < td
wend
etime=0 : lastsent=0
bucketdelay=15
oldtime=time$("ms")
[LoadMacros]
[Glog]
[ErrLoop1]
[LoopExit]
timer bucketdelay, [ckbuf]
wait
[ckbuf]
Qcnt=Qcnt+1
nowtime=time$("ms")
x$=time$()
elmstime=nowtime-oldtime
elapsedtime=(elmstime)/1000
oldtime=nowtime
etime=etime+elapsedtime
ztime=int((etime/Qcnt)*10000)/10
#main.Dly1, int(ztime)
#main.Tic1, ztime
#main.ManualTx,int(ztime);" - ";ztime
if Qcnt >99 then
mstime=int((etime/100)*10000)/10
Xtime$="<";x$;"> <";Qcnt;"> <";etime;"sec> <";mstime;"msTIC";">"
#main.GCwindow, Xtime$
print Xtime$
Qcnt=0 : etime=0
abc=abc+1
end if
if abc=15 then [quit]
if CommOpen=0 then [LoopExit]
[getbuffer]
[getmessage]
[loopx]
[PreProcess]
[StepWait]
[PrintResponse]
goto [LoopExit]
[ESTOP]
[quit]
close #main
END