-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile for Corexy #25
Comments
Add grbl/corexy.c to this file list in CMakeLists.txt. |
Thanks terjeio, I'll give that a go. While we're talking about that same list, I had an issue with it asking for networking/strutils.c when I didn't have any networking options turned ON. Had to download the network plugin and add that file even though I'm not gonna use it. I followed the git instructions but it didn't pull this plugin. The only things I have ON are "Compile for ESPDUINO-32 Wemos D1 R32" and "Safety door enable", so is needing the network plugin to compile normal? |
Yes it should, I'll add it in the next commit.
It should pull the networking plugin so something must have failed on your side. |
Thanks for the help terjeio. So I added grbl/corexy.c after grbl/ioports.c per your first reply and got the message below. As it says to include <math.h> I added it into corexy.c at the start: #include <math.h> I tried initializing b_steps on it's own on a new line in corexy.c, but got the same message. I'm using ESP-IDF 4.4.1 if that makes any difference? through powershell. |
Just to make sure I'm not doing this the hard way for no reason...... Can I use Arduino IDE for this? I did try and there is no example folder, Am I missing something? |
No, not without changes. |
It seems you have enabled backlash compensation which is not compatible with corexy. There should be a compiler error for that - as backlash compensation may be hard to add for corexy? |
I do have backlash comp enabled, in fact that was the whole reason for doing this upgrade from my Arduino...... Bummer! Do you know why backlash comp isn't compatible with corexy? |
BTW if this is not the best place to discuss the backlash comp, then feel free to redirect me to somewhere better suited. |
After taking a look at the code again I guess so. Currently the kinematics transform is done after backlash handling - it has to be done before. So code changes are required. |
Thinking about this still..... Grbl knows when the motors have to change direction as it has to set the DIR output, could the backlash comp be incorporated with that? |
This is how it is done - and the compensation has to pass through the planner to be handled correctly (acceleration, distance to step conversion ...). |
Interesting, wouldn't the kinematic transform have to be done before you'd know when the DIR pin would be high or low? |
…o allow backlash compensation. Ref [ESP32 issue 25](grblHAL/ESP32#25). Fixed feed rate handling for corexy kinematics. Ref issue #147. Fixed tool table/tool change bugs. Ref. [ioSender issue 228](terjeio/ioSender#228).
Please report back if backlash compensation works with the lates commit. |
Cool, I'll let you know. |
Hi Terje, I tried again yesterday with the latest commit, and it pulled all the submodules this time. However even though it appeared to build and flash correctly, IOsender still won't connect. I get the same error as above. Any idea what could be wrong? Have attached a snippet from the end of the build and flash process, dunno if that's helpful or not. |
My bad - I have just uploaded another fix. Sorry for that. |
Playing some more in Arduino serial monitor, I can set $14= anything up to 7, but not 8 or higher (error:52) $I gives |
Just noticed this in the Additional settings wiki: This would match with only being able to set up to $14=7, but my compatibility is still set at 0, and I've no idea if the driver supports it or not. |
OK I'm getting somewhere, but there is some weird stuff is going on here. UGS is still throwing a heap of errors about the response from the controller, but it doesn't shut down because of it. |
An error generated by UGS?
ioSender connects but fails due to wrong response from the controller. Try connecting with Toggle RTS selected as this shoud reset the ESP32. You may also try the latest edge version of ioSender.
Yes. But it does not matter since the start button only generates start events on a pin state change.
It does not for me - could it be due to you having enabled additional elements in the real-time report with $10? |
When I said error, I should have put alarm. But this alarm is constant, not like it's only looking at a state change.
I tried the edge version with Toggle RTS and it seemed to connect with no errors. So I closed it and tried my older version, which also now worked. Then I tried to go back to edge version and now I'm getting these weird errors from both versions, and deleting the config file to start again doesn't seem to help.
These are the errors in UGS, the number climbs and drops for a while then goes to 0, then I can do something. |
This is in /grbl/config.h as cloned
Is this enabled or disabled when set like this? it kinda seems like both? |
It looks like that the red alarm box is same as the Signals box in ioSender. Perhaps UGS should have used Alert as the label instead of Alarm to avoid ambiguity with real grbl alarms.
I do not get the 52 errors when connecting. If $22 is et to enable Homing on startup required I get 3 errors, none when disabled (UGS 2.0.11). I have to check what the ESP32 is outputting to make ioSender crash - the meditating guru present in this chip can drive one crazy with all its antics... |
I have changed the latest ioSender edge version a bit, this performs a number of retries on startup if unexpected responses are encountered. What is a bit odd is that startup failed after a previous connection with UGS, perhaps due to UGS leaving the serial interface in a state where characters are left in an ouput buffer? |
Haha are they that bad? I'm beginning to think that I should have just gone with a teensy, but the espduino is a plug in fit to my router. |
It looks like my espduino is just sending back a heap of rubbish on the comms and overwhelming the sender. I tried to switch to check mode in ugs and it went up over 200 errors! |
Ok, trying this again and still no real luck. IOsender 2.0.40 will start up with no problems now but it's very finnicky about inputs. IOsender won't bring up the GRBL settings. I have to use UGS to change them, then come back to IOsender to try things. The ESpduino is also ignoring the reset/abort input (IO2) no matter if its grounded or open. This is the Estop pin, correct? |
Oh, and this is all with $10=25 |
Do you have electrical interference triggering the reset input?
No, it is the reset input (the R "LED"). It can be used as estop input by changing code but this driver does not have this option yet. If not reacting to the input then something is amiss... If you have a voltmeter then check the level at the pin on the processor board to see if it changes with switch state. |
It shouldn't be electrical interference, as it's just sitting on my computer desk, but who knows. The RST pin in the ESPduino-32 board (not the ESP chip itself) is sitting at about 4V and goes to 0V when I push the reset button on the corner of the board. This RST pin is connected to the EN input on the ESP chip. Which pin would be used as Estop on this board? |
Correct.
This should be 3.3V according to the schematics, is the regulator broken? The ESP32 is a 3.3V chip.
It should be sitting at 3.3V if
Pin 2 ("soft" reset). I have not added code (and option) to remap the pin to the internal EStop signal yet as I have done for a few other drivers. |
Ah yeah, it is a 3.3V chip, which makes the 4V reading super weird! When I jump IO2 to 3.3V I get the soft reset alarm in the sender and the blue LED on the board. So it seems like the pull up resistor is broken/not correct, or the LED circuit is pulling the pin down to 0.075V but without enough current to light the LED. Maybe I should remap this input to IO36 or something? $17=0 and $pins gives the following response over 50 times. It's like everything is just being repeated so many times, when I start it I get so many repetitions of the $$ output (GRBL settings) Other people have gotten this to work, right? Sorry this has turned into such a mission, and thank you for your help. |
Interestingly, device manager says this board has an FTDI chip not a CH340 like the schematic. |
Try removing R10?
Be aware that some of the higher numbered GPIOs do not have internal pullups available.
It works for me with a "standard" ESP32 board. AFAIKT other users are using this driver as well.
Well, the whole ESP32 ecosystem seems a bit flaky to me - I am no great fan of it. |
A fake/cloned FTDI chip? Contact the supplier of the board to get a working driver? |
I've managed to get most of the way through the build but it stops at the end saying
c:\esp\esp-idf\esp32\build/../main/grbl/grbllib.c:220: undefined reference to `corexy_init'
I've got no idea how to fix this....... help!
The text was updated successfully, but these errors were encountered: