MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / modbusWriteCoil

Function modbusWriteCoil

app/rcc/api/prelude.js:130–132  ·  view source on GitHub ↗
(address, on)

Source from the content-addressed store, hash-verified

128 return String.fromCharCode((a >> 8) & 0xFF, a & 0xFF, (v >> 8) & 0xFF, v & 0xFF);
129}
130function modbusWriteCoil(address, on) {
131 return modbusWriteRegister(address, on ? 0xFF00 : 0x0000);
132}
133function modbusWriteFloat(address, value) {
134 var buf = new ArrayBuffer(4);
135 new DataView(buf).setFloat32(0, value, false);

Callers

nothing calls this directly

Calls 1

modbusWriteRegisterFunction · 0.70

Tested by

no test coverage detected