I Just added an IOT Relay to the Long Mill to turn on the router when I activate a job. Is there a code or command I need to put into the UGS Software to get the relay to activate when I start a print job? I have the IOT relay plugged into the Coolant and ground on the controller.
I believe M7/M8 at the start to turn on the coolant and M9 at the end to turn it off. You can always test it using the UGS command line. Just key in M7 and hit enter to see if it turns on the router. If it works don’t forget to test turn off with m9 (or the power switch).
@clark77494 I believe that Heyward is right, Kent. I looked into doing this, but never got around to it. Would you please post a link to the relay that you are using? Please post your results, too.
I believe that there is a function in UGS that will have it add the M7 and M8 commands to every toolpath you send it, but I can’t seem to find it this morning.
Hooked up my IoT Power Bar and edited my header and footer in the GRBL mm post processor in VCarve desktop and it actually works. Using the two normally off outlets, I now have my shop vac and Makita router connected to them. Initially tried M7 but that didn’t work so used M8 to turn on and M9 to turn off.
Connected the Power bar to the coolant port on the Longboard controller, and used this IoT power bar https://www.amazon.ca/Iot-Relay-Enclosed-High-power-Raspberry/dp/B00WV7GMA2/ref=sr_1_1?crid=1OKUW9V9VMN3V&dchild=1&keywords=iot+relay+power+bar&qid=1610507837&sprefix=iot+%2Caps%2C261&sr=8-1
Good to hear. I just ordered the same. I was a little concerned it wouldn’t be able to handle both the router and Vac.
Single Phase Solid State Relay.
This is the unit I just installed for powering the router. 25 amp relay and DC 3-32V control. Connected to the coolant contact and activated/deactivated with the M8/M9 commands. Works great.
To add, there is now a page discussion IOT relay setup in our CNC resources:
In the Sienci Resources it details the following -
Another option if you’re using CNCjs is to set up custom ‘Events’:
- Go to Settings (gears on the left) → Events, and add a new event for the both commands
- Use events “G-code: Start” for the M8 command and “G-code: Stop” for M9
This will now ‘inject’ the M8 command at the start of any gcode file and an M9 at the end. It applies to every file you run unless you disable them.
My question, is this feature currently available in gSender and I haven’t found it, or, Will this ability be made available for gSender to have Headers and Footers in new revisions.
Great catch Wayne! Yes this is a new feature that we’re actually working to have ready for the upcoming release of gSender, so you should be able to try it out then
Has anyone run into issues using gsender with this? I manually add M8 as first line and m9 as last line. When I go to run the job in gsender my router and dust collection power on but the program doesn’t run. If I remove the m8 and m9 codes the program runs as expected. Any thoughts?
@Chrisjsmitty Welcome to the group, Chris. I’m sure that you will find it an excellent place to get answers to your questions.
My answer may not help, but here goes. I don’t have the relay set up, so I just added an M8 command to the beginning of two gcode files. Both ran fine. I can’t see that actually having the relay would matter, but maybe someone here with the relay can chime in.
Have you tried this on more than one file? Can you post the file that is not working? I’ll run it and see if I get the same results.
Thanks @gwilki ! So The relay is turning everything on.
I try multiple files. What is happening in gsender. Vac and router power on, in gsender the job is running in the visualizer. . The machine is not moving however. I delete the commands and runs perfectI have uploaded the file, thanks for the assist!
M8TEST.nc (68.8 KB)
@Chrisjsmitty Weird, Chris. As I said, I don’t have the relay, so my ability to test is very limited. I ran your file and it ran perfectly. Might I suggest a further test on your part? Unplug the relay and just run the file in air with the router dead. This would sort of make your Mill setup like mine. If the file runs, at least we can be sure that the problem has something to do with the way the relay is handling power. I assume that the Mill controller is not plugged into the relay. Correct?
That’s really interesting. I tried your test and it works fine with the iot physically unplugged from the control unit but with the m8 code in the gcode
Try this revised program.
Should work for you.
M8TEST.nc (68.9 KB)
There’s a lot of freaky code here… What’s with all the G1’s ?
What did you create this gcode on ?
@Chrisjsmitty Chris: I don’t have an answer for you on why the presence of the relay is causing this problem, but I am working on it.
@Megistus With respect, Wayne, I would not advise Chris to use the file you attached. It has an M0 command at its start, which will stop the run and not allow it to continue. Further, it has an M05 command that, unless Chris is running a spindle, will do nothing. It turns off a spindle.
I’m curious about your comment on all the G1 commands. I generate my gcode from VCarvePro, using grbl inch as my post processor. It generates a G1 command for every line in the file that is a cutting move, and a G0 command for fast moves outside the material. Does your program do it differently?
@Megistus that particular file was created in easel.
@gwilki my only other thought I am going to try is upgrading the gauge of the wire and decreasing the distance between the iot and the controller to see if maybe it’s a initial power demand issue. I really appreciate everyone’s help. Other than this so far the long mill is running beautifully since I assembled it last Thursday
@Chrisjsmitty Chris: Is the Mill controller plugged into the IOT? I ask because, if you are using the IOT recommended by Sienci, its specs say the following:
Note that the IOT relay is built to handle 0-8A with 18AWG power cords and 0-12A with 16AWG cord.
The Makita router draws 6.5 amps and the Long Mill controller draws 8.8 max. So, if the Mill controller is plugged into the IOT, you are way over spec. If it’s not, never mind.
Wow, That’s crazy. Yes my gcode generator only produces a G command when a change of speed is requested. Thanks for the info.