The pin settings for the plotter are all wrong for the V2.0 Plotter code. There are various fork with different sets of fixes and I was wondering if anyone has any idea which is the best one?
Which is the best GitHub for for GCodeParser?
Hi Charlieb,
did you already found a good one?
currently im using
int X_STEP_PIN = 10;
int X_DIR_PIN = 11;
int X_ENABLE_PIN = -1;
int X_MIN_PIN = A3; //X Limit Switches Port 6
int X_MAX_PIN = A2;
int Y_STEP_PIN = 9;
int Y_DIR_PIN = 3;
int Y_ENABLE_PIN = -1;
int Y_MIN_PIN = 13;
int Y_MAX_PIN = 12;
int Z_STEP_PIN = A1;
int Z_DIR_PIN = -1;
int Z_ENABLE_PIN = -1;
int Z_MIN_PIN = -1;
int Z_MAX_PIN = -1;
int Z_ENABLE_SERVO = 1;
but i cant get the motors to work in gremote
Hey, so I plugged everything in and, due to all the contradictory instructions, just altered the code so the pin settings are correct. It’s probably not standard but gcode x-y moves sent over the arduino serial link work as expected.
Gremote doesn’t work at all and I’m happy to ignore it because it looks pretty awful and alternative gcode senders are easy to find.
My main problem at this point is that the gcode for a circle just draws the circle wherever the pen is. It’s supposed to move to a given location and draw the circle there but it doesn’t even try to do that.
My circles are also a bit spirally but I’m not sure if that’s another software problem or a hardware issue.
From what I’ve looked at in the other archives there aren’t any changes to the circle code.
There’s also this one: http://forum.makeblock.cc/t/upgraded-xy-plotter-6w-laser/3787 but it apparently doesn’t support pens anymore, just laser switching.
Hey charlieb
Would you mind Sharing your Pin Layout ?
Would help me alot also what gcode Sender are you using?
Thanks in advance
Sure but let me warn you that the pin layout depends on the hardware connections. I found it most useful to look at the board and see which things were plugged in where and then to test everything. Try to move in X, see a move in X, see that the X move is stopped by the right endstop switches etc.
int X_STEP_PIN = 10;
int X_DIR_PIN = 11;
int X_ENABLE_PIN = 4;
int X_MIN_PIN = 12;
int X_MAX_PIN = 13;
int Y_STEP_PIN = 3;
int Y_DIR_PIN = 9;
int Y_ENABLE_PIN = 4;
int Y_MIN_PIN = A3;
int Y_MAX_PIN = A2;
int Z_STEP_PIN = A1;
int Z_DIR_PIN = A7;
int Z_ENABLE_PIN = 4;
int Z_MIN_PIN = -1;
int Z_MAX_PIN = -1;
int Z_ENABLE_SERVO = 1;
I’d also take a look at this post:
That’s what I used to validate that I was at least somewhat in the right ballpark.
And as for a gcode sender I’m not using one at all yet because I’m still debugging the individual commands. I’m manually sending commands one at a time using the arduino UI serial monitor.
So I tried the universal gcode sender and it didn’t work either. It didn’t work in the same way that gremote also didn’t work. It seems like neither tool is getting the expected return from the board. The first command maybe gets executed but subsequent commands never get an ok back and the tool doesn’t move at all. I’m starting to suspect that this is also a firmware issue.
I’m not sure if the makeblock folks have any appetite for fixing this firmware but it seems to me that it has some pretty significant deficiencies.
Yeah i tried the universal gcode sender aswell and found out that you need to set the firmware to TinyG now i can send from this gcode sender…
Let me know if this works for you aswell
i didnt draw a fish since i dont have the data of it but i made a simple file with some commands and the plotter actually moved
GCode Parser Problem?
okay seems like i celebrated a bit too early…
strange that some commands like: G1 X-100.5 Y90.4 Z1 move the plotter (command that i have written on my own)
this is what i see from my POV the plotter isnt moving at all
here is a screenshot
Can you try to reset the board, close and reopen the serial connection in the app and then try to send a single command with the command line at the bottom. I’m partial to G01 Z34 X400 Y400.+
If that doesn’t work I’d suggest that you fall back to the arduino serial monitor. That’s the only one that’s worked reliably for me probably because it doesn’t care about getting the right kind of response.
Sure.
Just tried it and it worked the Plotter moved.
Could you maybe describe me the command im still not getting GCode 100%.
Since you started with Z being 34.
Also i just tested to make a simple cnc file with this command and 2 others and it worked fine.
But i think we defnetly need help from Makeblock here. I read something about that there is vacation in china this week so i hope to get an answer next week and maybe they can help us with our problem.
Thank you.
Can you then try to get it to move to 200, 200 with G01 X200 Y200.
I’m no gcode expert but G01 is a simple linear move. Then the coords are self explanatory. I think the firmware executes Z moves immediately rather than doing a linear interpolation with the other axes so it doesn’t really matter if it’s first or last.
The more important thing is whether the system is in relative move or absolute move mode. I think it starts in absolute mode so a move to a -ve coordinate wouldn’t make sense since the origin is in the corner of the drawing area.
You can use G90 and G91 to switch back and forth between linear and absolute modes. I found it useful to look at the fish code so you can see what the machine is supposed to support and then cross reference with the wikipedia page below for the definitions.
Yes i will try but i cant right now i just got home.
The Plotter is at my company so ill try it tomorrow and give feedback!
Thanks so far !
Oh yeah, OK. No rush at all. I’m just trying to see if your experience is exactly the same as mine or a little different. If it’s a little different then maybe one or other of us can make progress.
My plotter is at home so I can’t look at it until much later. I’m guessing you’re in the GMT+1, I’m in EST (GMT-5) so it’ll be like 3am before I can do anything myself.
If you have anything Else that i can Test tomorrow just list it up here and I will give Feedback
So it turns out that I had the Y pins backwards. Now I have:
int Y_STEP_PIN = 9;
int Y_DIR_PIN = 3;
int Y_ENABLE_PIN = 4;
int Y_MIN_PIN = A2;
int Y_MAX_PIN = A3;
This has resolved the spirally circle issue. So please make sure all your pins are set correctly. Even though everything was backwards (DIR and STEP reversed!) it seemed to work well enough.
What I’m seeing as the main problem now is that the various gcode sender programs never seem to think that the arduino has actually completed its command. They seem to never see the “ok\n” that you can clearly see in the serial monitor. I’m not sure why this is but it I think it might be the reason we’re having such trouble.
Having said that the answers to the question below would suggest that it might be more complicated than just “ok\n”. I guess I’m going to have to read the code for the gremote program too