Hello!
I’m trying to send the plotter some GCode commands without the use of your GUI. I send it a command, wait for it to send back “ok”, and then send the next command.
Here’s the problem: it will randomly become unresponsive. I will sometimes send it a line of GCode, and it will not move and therefore not send back “ok”. Every command I send (after it messes up like this) is also ignored, until I unplug the plotter and plug it back in.
In your experience creating the GUI, has it ever become unresponsive like this? Does the GUI simply wait to receive “ok” before sending the next line, or is there some other event involved?
Any help would be greatly appreciated.
XY Plotter - GCode without GUI
hi,sammccants. I have already found the situation. Sometimes, the gui app only receive “o” or “k”. And i add a timer program for checking response timeout.
Thank you for your response!
I don’t think that explains the issue I’m having. Let me clarify: I am not using the gui app. And the plotter becomes unresponsive, not the gui app. I also have a sort of timer, and I get the entire “ok” message. The problem is when it sends a line of gcode, and the plotter does not acknowledge it or perform the movement the line tells it to perform. Do you know what might cause this?
Have a try this test code for the communication?if no problem for your app,maybe the gcode interpreter has some wrong place.
void setup(){
Serial.begin(9600);
}
void loop(){
if(Serial.available()){
Serial.print(Serial.read());
}
}
Serial communication is working. After every few lines of code I send, though, it becomes unresponsive. It receives and responds to most of them just fine though.
Did you use the bluetooth module for serial communication? you could try to change the serial’s baud rate.