# Activation of an IoT relay using Load1 or Load2

**URL:** https://forum.onefinitycnc.com/t/activation-of-an-iot-relay-using-load1-or-load2/17513
**Category:** Original/PRO Series (Buildbotics) (Gen 1)
**Created:** [December 19, 2022, 11:32pm UTC](https://forum.onefinitycnc.com/t/activation-of-an-iot-relay-using-load1-or-load2/17513 "2022-12-19T23:32:13Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![349iq2345](https://avatars.discourse-cdn.com/v4/letter/3/bb73d2/32.png) [@349iq2345](https://forum.onefinitycnc.com/u/349iq2345)
#### Post date: [December 29, 2022, 3:16am UTC](https://forum.onefinitycnc.com/t/activation-of-an-iot-relay-using-load1-or-load2/17513/7 "2022-12-29T03:16:05Z")

</div>

Hey Dan,

the commands [M3 (start spindle clockwise)](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m3-m4-m5) in conjunction with [S (Set Spindle Speed)](https://linuxcnc.org/docs/html/gcode/other-code.html#sec:set-spindle-speed) (with speed set \> 0) and [M5 (stop spindle)](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m3-m4-m5) are provided by your [CAD/CAM program](https://forum.onefinitycnc.com/t/what-cad-cam-software-can-be-used-to-make-gcode-files-for-the-onefinity-cnc/10253) when you [export your toolpath](https://forum.onefinitycnc.com/t/what-is-a-post-processor-what-does-it-do-and-why-do-i-need-one-specificly-for-my-onefinity/8709) as [g-code](https://en.wikipedia.org/wiki/G-code).

It is up to the CNC Controller to start the milling motor appropriately when it encounters such a command.

Traditionally, the [Onefinity Controller](https://www.onefinitycnc.com/_files/ugd/1cee9f_bed246d0462e443ab8f782f2384d4ddb.pdf), which is a hardware and a software [fork](https://en.wikipedia.org/wiki/Fork_(software_development)) of the [Buildbotics Controller](https://buildbotics.com/), has two methods of controlling the **start/stop** and the **speed** of the milling motor:

- The analog way, which controls start/stop by switching the ‘tool enable’ pin 15 on [DB-25 I/O port](https://buildbotics.com/manual-v1-0/#25pinioport) on and off (and the ‘tool direction’ pin 16 according to M3 or M4 command given), and the speed by providing a [PWM signal](https://en.wikipedia.org/wiki/Pulse-width_modulation) on pin 17 [as described here](https://buildbotics.com/connecting-a-pwm-spindle-to-the-buildbotics-controller/), and

- the digital way, which is a [ModBus](https://en.wikipedia.org/wiki/Modbus) communication over a [RS-485](https://en.wikipedia.org/wiki/RS-485) [serial communication line](https://en.wikipedia.org/wiki/Serial_communication) to a device like a [VFD](https://en.wikipedia.org/wiki/Variable-frequency_drive) which is able to communicate this way.

In order to choose the first way to communicate, the analog one, traditionally the Onefinity and the Buildbotics Controllers had one entry for selecting the right ‘tool type’ in the [TOOL Configuration](https://buildbotics.com/manual-v1-0/#tooltab) tab: “PWM Spindle”. You had to choose this entry if you wanted to use

1. a PWM Spindle
2. a Laser
3. a milling motor that has no interface (like the [Makita hand trim router](https://www.makitatools.com/products/details/RT0701C)) and that you want [to be switched on and off by a relay](https://forum.onefinitycnc.com/t/tool-enable-m15-breakout-board-auto-turn-off-on-router/720).

Since having to choose “PWM spindle” when in fact you wanted to use a laser or a hand router was confusing, so with firmware 1.0.9, the Onefinity developers created two new entries for selecting ‘tool type’:

“Router (Makita, etc)”  
“Laser (J Tech, etc)”

But internally in fact it still selects “PWM Spindle”.

Welcome to the forum!

---

_[View the full topic](https://forum.onefinitycnc.com/t/activation-of-an-iot-relay-using-load1-or-load2/17513)._
