<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Modbus Master crashes and missing documentation]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I am trying to create a modbus master application in micropython. I cannot figure out how to use the write_single_coil register as I get a ValueError: Illegal coil value when using following line:<br />
modbus.write_single_coil(1,0, 1, timeout=500)</p>
<p dir="auto">Also, the documentation on Modbus is really flaky - can you point to some examples or maybe the source code of the implementation so I can look it up?</p>
]]></description><link>https://community.m5stack.com/topic/5401/modbus-master-crashes-and-missing-documentation</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 23:52:33 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5401.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jun 2023 22:17:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Modbus Master crashes and missing documentation on Thu, 06 Jul 2023 07:45:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/insanelx" aria-label="Profile: insaneLX">@<bdi>insaneLX</bdi></a> <img src="/assets/uploads/files/1688369012974-5545b634-1765-460d-a5c1-c3d1ae46fd74-image.png" alt="0_1688369025206_5545b634-1765-460d-a5c1-c3d1ae46fd74-image.png" class=" img-fluid img-markdown" /><br />
0xff00(ON or 1) and 0x00(OFF or 0)</p>
]]></description><link>https://community.m5stack.com/post/21464</link><guid isPermaLink="true">https://community.m5stack.com/post/21464</guid><dc:creator><![CDATA[pandian.nano]]></dc:creator><pubDate>Thu, 06 Jul 2023 07:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to Modbus Master crashes and missing documentation on Thu, 29 Jun 2023 22:20:04 GMT]]></title><description><![CDATA[<p dir="auto">A list it is!</p>
<p dir="auto">try:<br />
ret = modbus.write_multiple_coils(comms.DEVICE_ADDRESS, 0,(<br />
sig.smoke_flap,<br />
sig.transport,<br />
sig.ignition,<br />
sig.smoke_fan,<br />
sig.extinguish,<br />
sig.flood,<br />
sig.ember_air,<br />
sig.alarm<br />
), timeout=200)</p>
<p dir="auto">works nicely.</p>
]]></description><link>https://community.m5stack.com/post/21400</link><guid isPermaLink="true">https://community.m5stack.com/post/21400</guid><dc:creator><![CDATA[insaneLX]]></dc:creator><pubDate>Thu, 29 Jun 2023 22:20:04 GMT</pubDate></item><item><title><![CDATA[Reply to Modbus Master crashes and missing documentation on Thu, 22 Jun 2023 21:33:30 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/insanelx" aria-label="Profile: insaneLX">@<bdi>insaneLX</bdi></a></p>
<p dir="auto">I think the multiple coils function takes a list, but it didn't work for me either.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/21274</link><guid isPermaLink="true">https://community.m5stack.com/post/21274</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 22 Jun 2023 21:33:30 GMT</pubDate></item><item><title><![CDATA[Reply to Modbus Master crashes and missing documentation on Wed, 21 Jun 2023 16:43:57 GMT]]></title><description><![CDATA[<p dir="auto">Felix, thanks for the reply.<br />
I was trying to use the write_single_coil as workaround. I wanted to use the write multiple coils function. But it does not have a parameter to set the number of coils to be written and the documentation is less than complete. Any ideas? How does the system know what to write?</p>
]]></description><link>https://community.m5stack.com/post/21258</link><guid isPermaLink="true">https://community.m5stack.com/post/21258</guid><dc:creator><![CDATA[insaneLX]]></dc:creator><pubDate>Wed, 21 Jun 2023 16:43:57 GMT</pubDate></item><item><title><![CDATA[Reply to Modbus Master crashes and missing documentation on Wed, 21 Jun 2023 06:42:27 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/insanelx" aria-label="Profile: insaneLX">@<bdi>insaneLX</bdi></a></p>
<p dir="auto">from earlier posts I assume you're trying with an M5Tough, correct?</p>
<p dir="auto">Well, I can confirm that <code>write_single_coil</code> fails with <code>Value Error</code> as soon as the value is different from 0.</p>
<p dir="auto">So, yes, I'd say it is broken. <a class="plugin-mentions-user plugin-mentions-a" href="/user/m5stack" aria-label="Profile: m5stack">@<bdi>m5stack</bdi></a> could you please look into that. Thanks.</p>
<p dir="auto">BTW: other Modbus blocks like <code>write_single_register</code> work for me.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/21246</link><guid isPermaLink="true">https://community.m5stack.com/post/21246</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 21 Jun 2023 06:42:27 GMT</pubDate></item></channel></rss>