Questions tagged [g-code]

G-code is the common name for the widely-used computer numerical control (CNC) programming language defined in EIA-274.

117 questions
0
votes
2 answers

Can i create a gcode that self destructs after one instance of printing?

Can i create a gcode that self destructs after one instance of printing? For example I send the gcode created to a printer at a remote area to print but I want them to only print it once. Can i add a self destruct code so that it deletes after…
Roo
  • 9
  • 1
0
votes
1 answer

Convert string text to GCode

I need to create an app (using Android Studio) that generates CNC code to operate a 3D printer. It takes a String as input. I've found a couple libraries in Python and Javascript that does this, but as I don't have time to translate whole libraries…
Mateus Wolkmer
  • 706
  • 4
  • 26
0
votes
0 answers

Sending GCode as String Using Java

Writing a simple program to send GCode via Java using jssc libraries. Tried the following without success serialPort.writeString("G01 X1 Y1 Z1") serialPort.writeString("%G01 X1 Y1 Z1%") serialPort.writeString("%") serialPort.writeString("G01 X1…
Jai Shah
  • 1
  • 1
0
votes
0 answers

Arduino plotting error "command not recognized" m18 (GRBL + G-CODE)

I'm new to Arduino and I am creating a project called (DIY CNC PLOTTER) for my final design project in school, the following are the list of part that I'm currently using. Hardware: 1 Arduino Uno v3 1 L923D Shield 2 DVD Stepper Motor 1 Micro Servo…
Haider Abdullah
  • 111
  • 2
  • 13
0
votes
1 answer

QtSerialPort not writing to serial port

I am trying to send Gcode commands to a 3d printer with QtSerialPort. I am able to connect and read the startup gcode the printer sends out but I haven't been able to write a Gcode to make the printer do something. I have read many people's code and…
Jason
  • 123
  • 1
  • 7
0
votes
1 answer

parsing gcode file to extract coordinates

I have a gcode file that is full of text, more specifically coordinated for a machine. I am trying to read the file, strip away the useless information so that I can then perform an operation on the coordinated before they are sent out to the…
John G
  • 19
  • 2
  • 7
0
votes
1 answer

Python inheriting at initalization

Im trying to inherit routines from different classes at initialization based on what a user requests at creation. My example is a CNCFile class for reading/manipulating/saving a g-code text file. When its created, a user inputs the type of machine…
mrfoulkes
  • 11
  • 2
0
votes
1 answer

How to isolate an integer in a QString

I have a QString of Gcode that will look like this: T Currently, I'm using myString.midRef(1,1).toInt() to get the digit I want (I don't care about the rest of the line). However, this will not work…
Memnarch1113
  • 99
  • 1
  • 8
0
votes
1 answer

Converting an AutoCAD model to a matrix of points/volumes with the mass density specified at each location

I am an experimental physicist (grad student) that is trying to take an AutoCAD model of the experiment I've built and find the gravitational potential from the whole instrument over a specified volume. Before I find the potential, I'm trying to…
0
votes
1 answer

Segmentation fault with memmem()

I am attempting to find the size in bytes of some layers in a .gcode file for 3D printers. However, there is an error that I am getting from running a function to find the distance between two instances of the string ";LAYER:*". Here is my function…
Dayt0n
  • 1
0
votes
1 answer

Carriage return CNC G code

I'm writing a plugin that exports Gcode form illustrator in javascript. Everything works, except when I load the gcode onto the CNC software, none of the text appears because it's in the wrong format. When I open it in a text editor, it all appears…
0
votes
0 answers

Updating status bar with opened file name

With amazing help of other stackoverflow users I have made this code for reading out some data out of a gcode file and doing some calculations on it. It is almost done and the last 2 things I have problem with are: 1) I would like the status bar…
Bart
  • 101
  • 4
  • 11
0
votes
1 answer

GRBL cycle start needed every spindle on/off

We've built a CNC like machine using GRBL 0.9c (https://github.com/grbl/grbl/wiki) which is programmed into our Arduino UNO microcontroller board. We have the 'Cycle Start/Resume' Uno pin connected to a pushbutton (green for us), and have set the…
Mark
  • 41
  • 3
0
votes
1 answer

Arduino Gcode reader

I made G-code reader on Arduino, but it stops reading. It has many "break;" and I have also many while loops and switches, so I'm thinking that when I break on loop/switch, it will break all. Another idea is that it goes some kind of loop, but I…
pinq-
  • 367
  • 2
  • 17
0
votes
2 answers

STL to G-Code Command Line Converter

I am currently working on my senior design CNC Mill project. Part of the project is converting STL files into G-Code. Good thing is I don't have to reinvent the wheel if something I need to integrate already exists. Is there a command line converter…
Brian Lindsey
  • 147
  • 2
  • 12