{"id":1325,"date":"2014-01-23T15:27:37","date_gmt":"2014-01-23T15:27:37","guid":{"rendered":"https:\/\/ibex.tech\/resources\/?p=1325"},"modified":"2022-02-18T15:05:16","modified_gmt":"2022-02-18T15:05:16","slug":"function-06-write-single-register","status":"publish","type":"post","link":"https:\/\/ibex.tech\/resources\/geek-area\/communications\/modbus\/function-06-write-single-register","title":{"rendered":"Function 06 Write Single Register"},"content":{"rendered":"<h4>\nModbus RTU Function 06 &#39;Preset Single Register&#39;<br \/>\n<\/h4>\n<p>\nTo write a word (16 bits) to a register you send the following:\n<\/p>\n<p style=\"margin-left: 40px;\">\nByte 0 Modbus Device Address (1 to 247)<br \/>\nByte 1 Function Code \/ Message Type (0x06)<br \/>\nByte 2 Register Number (high byte)<br \/>\nByte 3 Register Number (low byte)<br \/>\nByte 4 Data0<br \/>\nByte 5 Data1<br \/>\nByte 6 CRC of bytes 1 to 6 (high byte)<br \/>\nByte 7 CRC of bytes 1 to 6 (low byte)\n<\/p>\n<p>\nThe response is a copy of what was sent\n<\/p>\n<p style=\"margin-left: 40px;\">\nByte 0 Modbus Device Address<br \/>\nByte 1 Function Code \/ Message Type (0x06)<br \/>\nByte 2 Register Number (high byte)<br \/>\nByte 3 Register Number (low byte)<br \/>\nByte 4 Data0<br \/>\nByte 5 Data1<br \/>\nByte 6 CRC of bytes 1 to 6 (high byte)<br \/>\nByte 7 CRC of bytes 1 to 6 (low byte)\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Modbus RTU Function 06 &#39;Preset Single Register&#39; To write a word (16 bits) to a register you send the following: Byte 0 Modbus Device Address (1 to 247) Byte 1 Function Code \/ Message Type (0x06) Byte 2 Register Number (high byte) Byte 3 Register Number (low byte) Byte 4 Data0 Byte 5 Data1 Byte [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[],"class_list":["post-1325","post","type-post","status-publish","format-standard","hentry","category-modbus"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/posts\/1325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/comments?post=1325"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/posts\/1325\/revisions"}],"predecessor-version":[{"id":1329,"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/posts\/1325\/revisions\/1329"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/media?parent=1325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/categories?post=1325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/resources\/wp-json\/wp\/v2\/tags?post=1325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}