Results 11 to 20 of 22
Thread: G-Code alternative.
-
04-08-2015, 03:28 AM #11
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
There are good reasons to make Gcode human readable and standard. All CNC machines use it. The makerbots use X3G which is already the binary form you are talking about and personally I hate the thing, you cannot debug the print file easily. Starting another version of the same thing using different instructions will only confuse people even more, there are already enough people that do not understand what is happening.
Small files has already been shown to be of little consequence in computing in general. Personally I am perfectly happy with the command line and using "control k" commands for print editing and formatting but that is not what made computers ubiquitous, it is the ability to see what you want rather than knowing what numbers do that has made the general public accept computers.
The Internet would real rock if everyone was happy with the information in any form, we could all have dial up and get pages instantly but it is not what people want so the Internet is full of bloat to make things easier for people to use. The same is true for Gcode and it is an excellent format for the job it does.
Maybe you can make it faster and smaller and more efficient but I and many other people read Gcode and use Gcode not only for 3d printing, I actually make simple machines for things like coil winding and linear movement for the most ridiculous one off jobs and drive them with Gcode because I know it and can write it manually like writing a letter.
By all means forge ahead and do it but it will never be accepted accepted by people in general and oyu are setting off down a road that I do not think you understand the complexity of yet.
-
04-08-2015, 04:03 AM #12
- Join Date
- Mar 2015
- Posts
- 59
I do see your points. MCU's do have limited memory, that is my problem with G-Code, that and it uses floating point where Integer would make more sense.
I am not attempting to replace G-Code by any means. Just attempting to make a simpler system for use as the native format on controllers of a limited set of devices similar to 3D printers and mainly focused on 3D printers.
The first implementation of this is actually in a 3D printer that is sent G-Code, and the G-Code is converted to this native command language in one core, the control program running in another core interprets this more efficient binary code. Though a host side program for doing the conversion would be even more efficient. I am using it to save memory in the microcontroller on-board in the 3D printer. It is an alternative for the final stage, NOT for the initial stage or debug level.
Though how hard would it be to write a program that converts between a human readable form and the binary form?
And for controlling mechanical devices how often do you need Floating Point values??? That is in the form of number of steps to move, etc? Integer values just make more sense for the application of 3D printers.
-
04-08-2015, 10:31 AM #13
- Join Date
- Jun 2014
- Location
- Burnley, UK
- Posts
- 1,662
I have just spent for ever implementing the G7 gcode for my laser cutter, that will be a real dog with binary, it was hard enough in Gcode.
-
04-08-2015, 01:05 PM #14
- Join Date
- Mar 2015
- Posts
- 59
Then I would think you an exception to the rule.
To use a line of G-Code you have to parse the text to get the useful information, convert portions of the string to binary floating point numbers you can use, then convert it to a form that makes sense for the type of device being controlled.
Compare that to simply looking at a byte, using it to branch to the correct section of control code, using the 0 one or 2 bytes as an integer value directly in a form that makes sense for the device already.
There are a lot more steps in interpreting G-Code, and a lot more room for error (and a lot more code needed).
-
04-08-2015, 02:22 PM #15
- Join Date
- Oct 2014
- Posts
- 314
So is it your intention then to run your 3d printer like a paper printer in the sense that you hit "print", the file is transferred to the printer's internal memory before it starts to print, and you can then close your printer software and/or shut down your computer? If so, then i think that's a decent reason to push forward on this (though "because I can" is also reason enough for me). In terms of simplifying the electronics and firmware in the printer i can definitely see the benefit to your idea.
-
04-08-2015, 07:12 PM #16
- Join Date
- Mar 2015
- Posts
- 59
Well thank you.
Yes it would be nice to be able to send an entire model to be printed to the printer, disconnect from the host system, and have the print finish up with out any reliance on the host system. And that is part of the goal. Doing so with only the RAM in the MCU in 99% of cases.
Then keeping the HW simple as possible reduces the build cost (and part of my goal is to make something that is affordable [less than $150] to copy).
Simplifying software, should be a goal of all programmers. For every 100 lines of code there is on average 6 bugs (in any project now days), so reducing code size reduces the number of likely bugs, and improves the ability to debug. I have been careful about coding to avoid bugs at all cost for a long time, and they still sneak up on me often.
I believe strongly in KISS when it comes to both HW design and programming. If you can do the exact same thing in half the code with the same user experience, do it. I know this is the opposite of modern programmers, who tend to do things in ten times more code with no added function or user experience.
And above all:
I like the challenge of doing something just a little better than standard. If I can shave one wasted clock cycle, I will, if I can shave one byte with out loosing anything I will, if I can save a few lines of code to do the same thing I will. I enjoy programming (not code banging like a lot of modern "Programers" do).
-
04-09-2015, 07:17 AM #17
- Join Date
- Oct 2014
- Posts
- 314
Technically you're adding lines of code, not removing them, at least for now, since you're plan is to convert from gcode to your language. I realize that the end goal is to directly produce files in your language from the slicer but until you get the slicer built, you're making things MORE complicated. Just having a little fun with you btw
-
04-12-2015, 10:29 PM #18
- Join Date
- Apr 2014
- Posts
- 88
what has happened to this world? since when has mankind ever said "what we have right now works good enough, why change it"?
DavidS you keep going, it would be nice if someone would come out with a STANDARD file for 3D printing, and if it's less work for the MCU then that means less printer crashes, fewer failed prints, and in the future faster print times.
we as a society have become obsessed with over complicating things, just look at how many different formats we have for just a basic text document, we need to standardize and simplify, how many times have you downloaded a file only to find out you don't have the right program to open it? or how many times you have downloaded a video file only to find you don't have the right codec, don't you think it would be nice to do a search on your computer and just get the files for your 3D printer without them being mixed in with files for laser cutters and CNC mills and so on?
besides, with 3D printers being sold in Staples and so on, how many new average users are going to have any idea how to debug a Gcode file in the first place? unless you want to try and tell me that my grandma can go out, buy a new computer and be able to debug her system everytime Windows crashes
-
04-13-2015, 09:30 AM #19
- Join Date
- Oct 2014
- Posts
- 314
I agree, everyone should be forced to use the same thing regardless of their application. There is no room in this world for innovation or experimentation ESPECIALLY in a field like 3d printing.
-
04-13-2015, 11:12 PM #20
- Join Date
- Apr 2014
- Posts
- 88
That's not what I mean, do you really think we need 50 different formats just to view a text document, do think it's really fair that because I can't fork out a few hundred dollars for solid works that I can't view a solid works file with the software I have, all these different formats serve only one purpose, and that is to prevent colaberation between the rich and the poor, because why would any one want to be on a level playing field (sarcasm).
Holes and pockmarks in print walls
06-04-2024, 09:14 AM in General 3D Printing Discussion