<?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[Why using function 0x16 when writing to only one register]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm facing a problem. My slave doesn't support function 0x16 so I would prefer mango to use function 0x06 instead.<br />
i've notice that Mango uses it when writing a integer value to a register but uses 0x16 to write a "BIT" value (The Data point is declared as a holding Register, but a simple bit si addressed)?</p>
<p dir="auto">Does anybody knows why ?</p>
<p dir="auto">isn't it possible to force use of function 0x06 to when writing to only one register ?</p>
<p dir="auto">Thanks, i'm not good in java and i cannot imagine put my hand in the code ... :-(</p>
<p dir="auto">nico</p>
<p dir="auto">Examples :</p>
<p dir="auto">below I try to write value 1 to bit 1 of holding register 7 into slave 3</p>
<p dir="auto"><strong>2014/04/07-18:50:42,920 O 03160007fffd0002e23a<br />
2014/04/07-18:50:42,965 I 0396512f9c</strong></p>
<p dir="auto">My slave responds with an error because it doesn't handle function 16</p>
<p dir="auto">Below when i try to write integer value 2 to same register 7 (my locator is then declared as a 2 byte integer value)</p>
<p dir="auto"><strong>2014/04/07-19:06:49,813 O 030600070002b828<br />
2014/04/07-19:06:49,848 I 030600070002b828</strong></p>
<p dir="auto">... Then it works</p>
]]></description><link>https://forum.mango-os.com/topic/1528/why-using-function-0x16-when-writing-to-only-one-register</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 00:39:42 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1528.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Apr 2014 23:23:16 GMT</pubDate><ttl>60</ttl></channel></rss>