IOT Relay Activation

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

2 Likes

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.

Thanks

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.

2 Likes

To add, there is now a page discussion IOT relay setup in our CNC resources:

2 Likes

In the Sienci Resources it details the following -

Another option if youā€™re using CNCjs is to set up custom ā€˜Eventsā€™:

  1. Go to Settings (gears on the left) ā†’ Events, and add a new event for the both commands
  2. 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.

3 Likes

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 :grinning:

1 Like

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

1 Like

@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. :grinning:

1 Like

Wow, Thatā€™s crazy. Yes my gcode generator only produces a G command when a change of speed is requested. Thanks for the info.

Thanks for the update. Hereā€™s a 2nd revision to have a look at.
M8TEST_REVISION2.nc (68.9 KB)
The file still runs a bit freaky on NCVIEWER
Have Funā€¦