Skip to content
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

Add support for FluidNC #143

Open
ModuloFS opened this issue Aug 19, 2022 · 14 comments
Open

Add support for FluidNC #143

ModuloFS opened this issue Aug 19, 2022 · 14 comments
Labels
feature New feature or request

Comments

@ModuloFS
Copy link

ModuloFS commented Aug 19, 2022

Hello,

i am using FluidNC as GRBL controller because of the better hardware performance compared to an Atmega. I have some problems to use gsender together with FluidNC. For example if i hit my E-Stop button, it leads to a "Door Open" detection inside my GRBL controller. To get out of this state i have to be able to reset the GRBL controller. At CNCjs for example there is a "RESET" button. I think it sends ctrl + X to the controller. This button is missing at gsender and it would be needed to sync Gsender (because after sending ctrl + X FluidNC prints "Grbl xxxx") and FluidNC and to come back from a door open event.
Because of that i am asking you, would it be possible to support FluidNC (https://github.com/bdring/FluidNC) official by your software?
It would be great because your software looks pretty cool and has some nice features like the Jogging for example!

@boboxx
Copy link

boboxx commented Aug 23, 2022

In would also like to see this added :)

@SienciLabs SienciLabs added the feature New feature or request label Aug 23, 2022
@cotepat
Copy link
Contributor

cotepat commented Aug 24, 2022

Reset shortcut is mapped to Shift-5 (by default I think)... It's even faster than a UI button!

Also I have a workaround for (almost full) FluidNC compatibility (homing, soft limits, laser...). In fact, I tried to modify gSender but I gave up... In the end it was much easier to change FluidNC because the $ settings syntax is not supported by FluidNC and gSender is using that a lot! I created my own version of FluidNC where I added every $ settings used by gSender. These settings are fake settings that (do nothing other than being settable and queryable), but they mimic Grbl correctly. All you have to do is to configure all the $ settings once (they are not linked to real FluidNC values) and they are persistent afterwards.

It took very few changes to FluidNC... It was worth it because now gsender works perfectly.

@ModuloFS
Copy link
Author

Thank you very much for your soft reset hint, i have to try it as soon as possible! Up to now the normal gcode sending functionality with probing and the macros would be ok for me.

@matthewfallshaw
Copy link

I created my own version of FluidNC where I added every $ settings used by gSender…

@cotepat, can you share?
(I checked your FluidNC fork, but it looks like you didn't push your changes.)

@ModuloFS
Copy link
Author

Now i have tried gSender together with original FluidNC and everything works perfectly if you sync both with the soft reset under the shortcut Schift+5! I do not need the firmware settings changed by gSender because i can change them realy easy with the FluidNC config file.

@cotepat
Copy link
Contributor

cotepat commented Sep 12, 2022

@matthewfallshaw here it is (source only). : https://github.com/cotepat/FluidNC/tree/v3.6.0-fake-grbl-config

Remember you have to force those "fake" settings to mimic FluidNC settings. They will be read by gsender (required for homing and soft limits).

@ModuloFS
Copy link
Author

@cotepat do you still use FluidNC as grbl controller? Since the FluidNC version 3.6.3 / 3.6.4-pre1 togehter with gSender 1.1.4 i get motion interruptions during jogging with speeds over approximatelly 3000 mm/min (bdring/FluidNC#678). Do you have the same problems?

@cotepat
Copy link
Contributor

cotepat commented Oct 21, 2022

Yes! Unfortunately...

@boboxx
Copy link

boboxx commented Oct 22, 2022

I think there are a few issues with FluidNC pin configuration in the few latest build. I saw a few issues being discussed in the discord forums.

@ModuloFS
Copy link
Author

ModuloFS commented Oct 22, 2022

The problem with motion interruptions have clearly to do with gSender. If i disconnect gSender i can jog the machine with the webUI or with FluidTerm without any issues...
@cotepat do you have any workaround for the problem or any guess what could be the problem? Maybe you could comment to the issue at FluidNC (bdring/FluidNC#678) too, so that everybody can see that several people have this problem.

@ModuloFS
Copy link
Author

Problem seems to be solved with FluidNC V3.6.4-pre3.

@ModuloFS
Copy link
Author

If anybody has connection problems between gSender and FluidNC i can recommend the modification in gSender told by Mitch in this post: bdring/FluidNC#678 (comment)

With this modification you can connect and disconnect to FluidNC without any issues. The soft reset, made by the shortcut Shift + 5, is also not needed anymore! I tested it at a linux machine and it works there as well, you just have to substitute the programm path "C:\Programm Files" with "opt"

Here is the copied comment from Mitch:

The reset behavior of gSender has problems. In my setup, it would not connect to FluidNC at all because the JavaScript serialport module that gSender uses opens the port in a mode that results in the ESP32 restarting into bootloader mode, where it is expecting to upload new firmware. I solved that by modifying gSender to explicitly issue the proper hard-reset-into-run-mode sequence. I will tell the gSender folks about this. Meanwhile, if you want to patch it yourself, here is an easy way to do it without having to do a full recompile of gSender:

Edit the file C:\Program Files\gSender\resources\app\server\index.js - to do so you may need to edit as Administrator, or change the permissions on the file so an ordinary user can modify it.

Round about line 10242 you should see the line:

    _this2.emit('serialport:open', {

Just before that line, add this:

    _this2.connection.port.set({ dtr: false, rts: true });
    setTimeout(function() {
        _this2.connection.port.set({ dtr: false, rts: false });
    }, 300);

Save the file and restart gSender, and it should connect to FluidNC properly. At least that worked for me (and Bart too).

@SnowBeaver
Copy link

Greetings.

Are you considering adding these modifications to the code?

@ModuloFS
Copy link
Author

Unfortunately i am not a software developer and i am not so deeply involved in this project. I changed the way to connect with fluidNC now. I removed the transistors which are responsible for the reset function from the esp32 board. Now I synchronize fluidNC with gSender by pressing the buttons ALTGR + Q (@), i think this is the shortcut for stop job. This works perfectly for me now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants