Liberty BASIC Community Forum
« Universal GCode sender »

Welcome Guest. Please Login or Register.
Sep 21st, 2017, 12:17am


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Universal GCode sender  (Read 472 times)
xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 24
xx Universal GCode sender
« Thread started on: Apr 2nd, 2017, 8:19pm »

https://sabercathost.com/hn4Y/LibertyBasic-Gcode-sender.zip

Here is a link to my GCode sender written in Liberty Basic..
I ran the level4 gcode and roadrunner gcode aok ...

The program does not have a plotter built in, I'm lacking in graphical stuff.

examine and check out ....

Downloaded ok , only used robot box, running ok from folder in my download directory,,,but is on same maching as develop...

Interfaces with GRBL 1.1F Arduino UNO & Windows 10
« Last Edit: Apr 2nd, 2017, 9:01pm by xtal » User IP Logged

robmcal
Senior Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 399
xx Re: Universal GCode sender
« Reply #1 on: Apr 2nd, 2017, 9:52pm »

Had to move the "GCode" folder to my C drive but after that it ran fine.

I don't have an Arduino to test it but it looks like a very well written program, congrats!
User IP Logged

Definition of an Upgrade: Take old bugs out, put new ones in.
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5526
xx Re: Universal GCode sender
« Reply #2 on: Apr 4th, 2017, 02:42am »

If you do a find and replace you can change the hard coded path c:\gcode\ to the relative path gcode\. Then it does not matter what drive or in what directory the user unpacks it to.
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 24
xx Re: Universal GCode sender
« Reply #3 on: Apr 4th, 2017, 07:56am »

Rod
Are you saying use DefaultDir$ huh

I've put directory entries in my GUI.ini file along with macros 1-9 and macro scripts 1-6.....

Also have made more changes.[fine tuning etc] Sure would like to add a LB plotter...
User IP Logged

Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5526
xx Re: Universal GCode sender
« Reply #4 on: Apr 4th, 2017, 10:26am »

No, DefaultDir$ just supplies you the path of the directory that the program started in. So c:\bin1 as you have it or on some folks systems c:\downloads\bin1. You have assumed everyone will unpack your .zip to c:, they may choose e: or e:\downloads or c:\safezone

It is easy to fix, just don't assume where anyone will unpack your .zip to. Either just assume the file or resource you seek is in the Default$ dir so loadbmp mygraphic.bmp or if as you have done with resources in a sub directory refer to it on a relative basis, ie you don't care what drive or directory it is in you just know it sits below DefaultDir$ so loadbmp gcode\mygraphic.bmp

You don't really need to know what DefaultDir$ is the resource is either in that directory, so refer to it directly, or it is in a sub folder, so use the relative path to the sub folder, subfolder\resource.ext

If its not clear ask again.
User IP Logged

Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5526
xx Re: Universal GCode sender
« Reply #5 on: Apr 4th, 2017, 10:31am »

A gcode plotter would be very possible but if you want help with that you would need to fully define the gcode commands in scope, the plotting size and such. It would be 3D I assume.

A cutter?, router? or plastic depositor?, too many possibilities to just say a plotter would be good. You need to define some limits to the task.
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 24
xx Re: Universal GCode sender
« Reply #6 on: Jun 2nd, 2017, 07:18am »

I'e decided that plotter Sw will wait....

I,ve been cleaning up the code and some rewriting...
I discovered a potential problem in my latest code
I was using a gosub then issue a script Gcode IO and expect ok1 then ok2 then return
But if an error occured there was no return because , no ok2 was recieved.
Stack growed by 1 return.....

Can the return value be popped off the return stack huh
Can stack size be monitored huh
User IP Logged

Chris Iverson
Administrator
ImageImageImageImageImage


member is offline

Avatar

20% Cooler


Homepage PM

Gender: Male
Posts: 2278
xx Re: Universal GCode sender
« Reply #7 on: Jun 2nd, 2017, 11:25am »

No, there is no way to monitor LB's GOSUB stack, nor to manually pop anything off.

The only thing that can pop from the GOSUB stack is LB executing a RETURN command.

If you need to exit from a GOSUB due to an error, I recommend setting a flag and doing a RETURN, so that the code returned to knows an error occurred and can potentially take a different execution path.
User IP Logged

"Do you believe in destiny?" - Pyrrha Nikos, RWBY
"With what wish will your Soul Gem shine?" - Kyubey, Puella Magi Madoka Magica
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5526
xx Re: Universal GCode sender
« Reply #8 on: Jun 2nd, 2017, 12:29pm »

If you get an error you need to return with an error and handle that.
User IP Logged

xtal
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 24
xx Re: Universal GCode sender
« Reply #9 on: Jun 20th, 2017, 09:23am »

https://sabercathost.com/98hJ/LBgc.zip

Latest code of my Liberty Basic G-Code sender
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls