{"id":57051,"date":"2023-01-13T09:43:23","date_gmt":"2023-01-13T04:13:23","guid":{"rendered":"https:\/\/ye1o34zhk8.onrocket.site\/?p=57051"},"modified":"2023-01-13T09:43:27","modified_gmt":"2023-01-13T04:13:27","slug":"modbus-function-command-formats","status":"publish","type":"post","link":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/","title":{"rendered":"Modbus Function Command Formats"},"content":{"rendered":"\n<p>In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register, etc.<\/p>\n\n\n\n<p>Every Modbus data frame, whether ASCII or RTU mode, has a \ufb01eld designated for \u201cdata.\u201d For each Modbus function, the content of this \u201cdata\u201d \ufb01eld follows a speci\ufb01c format. It is the purpose of this subsection to document the data formats required for common Modbus functions, both the \u201cQuery\u201d message transmitted by the Modbus master device to a slave device and the corresponding \u201cResponse\u201d message transmitted back to the master device by the queried slave device.<\/p>\n\n\n\n<p>Since each Modbus data frame is packaged in multiples of 8 bits (<a href=\"https:\/\/instrumentationtools.com\/dcs-plc-rtu\/\" target=\"_blank\" rel=\"noreferrer noopener\">RTU<\/a>), they are usually represented in text as individual bytes (two hexadecimal characters).<\/p>\n\n\n\n<p>For example, a 16-bit \u201cword\u201d of Modbus data such as 1100100101011011 would typically be documented as C9 5B with a deliberate space separating the \u201cHi\u201d (C9) and \u201cLo\u201d (5B) bytes.<\/p>\n\n\n\n<p>The fact that all Modbus words appear in this order means that Modbus follows the \u201cbig-endian\u201d standard.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-modbus-function-code-01-read-coil\">Modbus Function Code 01 &#8211; Read Coil<\/h2>\n\n\n\n<p>This Modbus function reads the statuses of slave device discrete outputs (\u201ccoils\u201d) within the slave device, returning those statuses in blocks of eight (even if the \u201cnumber of coils\u201d speci\ufb01ed in the query is not a multiple of eight!).<\/p>\n\n\n\n<p>Relevant Modbus addresses for this function range from 00001 to 09999 (decimal) but the starting address is a hexadecimal number representing the (n -1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 00100 would be speci\ufb01ed as hexadecimal 0x0063, as a high-order byte 00 immediately followed by a low-order byte 63).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2022\/11\/Modbus-function-reads-status-of-slave-device.png\" alt=\"Modbus function reads status of slave device\" class=\"wp-image-57052\"\/><\/figure>\n\n\n\n<p>Note that the second and third bytes representing coil status are shown in grey, because their existence assumes more than one byte worth of coils has been requested in the query.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 02 &#8211; Read Contact<\/h2>\n\n\n\n<p>This Modbus function reads the statuses of slave device discrete inputs (\u201ccontacts\u201d) within the slave device, returning those statuses in blocks of eight (even if the \u201cnumber of contacts\u201d speci\ufb01ed in the query is not a multiple of eight!).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts.png\" alt=\"Modbus Function code 02 \u2013 Read Contact(s)\" class=\"wp-image-57476\"\/><\/figure>\n\n\n\n<p>Relevant Modbus addresses for this function range from 10001 to 19999 (decimal), but the starting address is a hexadecimal number representing the (n &#8211; 1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 10256 would be speci\ufb01ed as hexadecimal 0x00FF: the \u201cHi\u201d byte being 00 and the \u201cLo\u201d byte being FF).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 03 &#8211; Read Holding Register<\/h2>\n\n\n\n<p>This Modbus function reads the statuses of \u201cholding\u201d registers within the slave device, with the size of each register assumed to be two bytes (16 bits).<\/p>\n\n\n\n<p>Relevant Modbus addresses for this function range from 40001 to 49999 (decimal), but the starting address is a hexadecimal number representing the (n -1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 40980 would be speci\ufb01ed as hexadecimal 0x03D3, \u201cHi\u201d byte 03 and \u201cLo\u201d byte D3.).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-03-\u2013-Read-Holding-Register.png\" alt=\"Modbus Function code 03 \u2013 Read Holding Register\" class=\"wp-image-57477\"\/><\/figure>\n\n\n\n<p>Note that since the query message speci\ufb01es the number of registers (each register being two bytes in size), and the response message replies with the number of bytes, the response message\u2019s \u201cnumber of bytes\u201d \ufb01eld will have a value twice that of the query message\u2019s \u201cnumber of registers\u201d \ufb01eld.<\/p>\n\n\n\n<p>Note also that the maximum number of registers which may be requested in the query message (65536) with \u201cHi\u201d and \u201cLo\u201d byte values grossly exceeds the number of bytes the response message can report (255) with its single byte value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 04 &#8211; Read Analog Input Register<\/h2>\n\n\n\n<p>This Modbus function is virtually identical to 03 (Read Holding Registers) except that it reads \u201cinput\u201d registers instead: addresses 30001 through 39999 (decimal).<\/p>\n\n\n\n<p>As with all the Modbus relative addresses, the starting address speci\ufb01ed in both messages is a hexadecimal number representing the (n &#8211; 1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 32893 would be speci\ufb01ed as hexadecimal 0x0B4C, \u201cHi\u201d byte 0B followed by \u201cLo\u201d byte 4C).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-04-Read-Analog-Input-Register.png\" alt=\"Modbus Function code 04 - Read Analog Input Register\" class=\"wp-image-57478\"\/><\/figure>\n\n\n\n<p>Note that since the query message speci\ufb01es the number of registers (each register being two bytes in size), and the response message replies with the number of bytes, the response message\u2019s \u201cnumber of bytes\u201d \ufb01eld will have a value twice that of the query message\u2019s \u201cnumber of registers\u201d \ufb01eld.<\/p>\n\n\n\n<p>Note also that the maximum number of registers which may be requested in the query message (65536) with \u201cHi\u201d and \u201cLo\u201d byte values grossly exceeds the number of bytes the response message can report (255) with its single byte value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 05 &#8211; Write (Force) Single Coil<\/h2>\n\n\n\n<p>This Modbus function writes a single bit of data to a discrete output (\u201ccoil\u201d) within the slave device.<\/p>\n\n\n\n<p>Relevant Modbus addresses for this function range from 00001 to 09999 (decimal) but the starting address is a hexadecimal number representing the (n -1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 07200 would be speci\ufb01ed as hexadecimal 0x1C1F, the \u201cHi\u201d byte being 1C and the \u201cLo\u201d byte being 1F).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"2488\" height=\"830\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-05-\u2013-Single-Coil.png\" alt=\"Modbus Function code 05 \u2013 Single Coil\" class=\"wp-image-57479\"\/><\/figure>\n\n\n\n<p>The \u201cforce data\u201d for a single coil consists of either 00 00 (force coil o\ufb00) or FF 00 (force coil on). No other data values will su\ufb03ce \u2013 anything other than 00 00 or FF 00 will be ignored by the slave device.<\/p>\n\n\n\n<p>A normal response message will be a simple echo (verbatim repeat) of the query message.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 06 &#8211; Write (Preset) Single Holding Register<\/h2>\n\n\n\n<p>This Modbus function writes data to a single \u201cholding\u201d register within the slave device. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"2460\" height=\"821\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-06-Single-Holding-Register.png\" alt=\"Modbus Function code 06 - Single Holding Register\" class=\"wp-image-57480\"\/><\/figure>\n\n\n\n<p>Relevant Modbus addresses for this function range from 40001 to 49999 (decimal) but the starting address is a hexadecimal number representing the (n -1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 40034 would be speci\ufb01ed as hexadecimal 0x0021, \u201cHi\u201d byte 00 followed by \u201cLo\u201d byte 21).<\/p>\n\n\n\n<p>A normal response message will be a simple echo (verbatim repeat) of the query message.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 15 &#8211; Write (Force) Multiple Coils<\/h2>\n\n\n\n<p>This Modbus function writes multiple bits of data to a set of discrete outputs (\u201ccoils\u201d) within the slave device.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-15-Multiple-Coils.png\" alt=\"Modbus Function code 15 - Multiple Coils\" class=\"wp-image-57481\"\/><\/figure>\n\n\n\n<p>Relevant Modbus addresses for this function range from 00001 to 09999 (decimal) but the starting address is a hexadecimal number representing the (n -1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 03207 would be speci\ufb01ed as hexadecimal 0x0C86, as a \u201cHi\u201d byte 0C and a \u201cLo\u201d byte 86).<\/p>\n\n\n\n<p>Note that the query message speci\ufb01es both the number of coils (bits) and the number of bytes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modbus Function Code 16 \u2013 Write (Preset) Multiple Holding Register<\/h2>\n\n\n\n<p>This Modbus function writes multiple words of data to a set of \u201cholding\u201d registers within the slave device.<\/p>\n\n\n\n<p>Relevant Modbus addresses for this function range from 40001 to 49999 (decimal) but the starting address is a hexadecimal number representing the (n -1)<sup>th<\/sup> register from the beginning of this range (e.g. absolute decimal address 47441 would be speci\ufb01ed as hexadecimal 0x1D10, a \u201cHi\u201d byte of 1D followed by a \u201cLo\u201d byte of 10).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-16-Multiple-Holding-Register.png\" alt=\"Modbus Function code 16 - Multiple Holding Register\" class=\"wp-image-57482\"\/><\/figure>\n\n\n\n<p>Note that the query message speci\ufb01es both the number of registers (16-bit words) and the number of bytes, which is redundant (the number of bytes must always be twice the number of registers, given that each register is two bytes (Point 1) in size).<\/p>\n\n\n\n<p>Note also that the maximum number of registers which may be requested in the query message (65536) with \u201cHi\u201d and \u201cLo\u201d byte values grossly exceeds the number of bytes the response message can report (255) with its single byte value.<\/p>\n\n\n\n<p>Point 1: Even for devices where the register size is less than two bytes (e.g. Modicon M84 and 484 model controllers have 10 bits within each register), data is still addressed as two bytes\u2019 worth per register, with the leading bits simply set to zero to act as placeholders.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u00a9 2019-2021 by Tony R. Kuphaldt \u2013 under the terms and conditions of the Creative Commons Attribution 4.0 International Public License<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.<\/p>\n","protected":false},"author":1,"featured_media":57476,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":"","footnotes":""},"categories":[12],"tags":[3040,3058,3041,5758,3076,23045,3075,5757,5750,5748,3068,3038,3048,3036],"class_list":{"0":"post-57051","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-control-systems","8":"tag-modbus","9":"tag-modbus-address","10":"tag-modbus-communication","11":"tag-modbus-communication-guide","12":"tag-modbus-communication-network","13":"tag-modbus-communication-protocol","14":"tag-modbus-communication-settings","15":"tag-modbus-communication-theory","16":"tag-modbus-function-codes","17":"tag-modbus-message","18":"tag-modbus-network","19":"tag-modbus-protocol","20":"tag-modbus-structure","21":"tag-what-is-modbus"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Modbus Function Command Formats<\/title>\n<meta name=\"description\" content=\"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Modbus Function Command Formats\" \/>\n<meta property=\"og:description\" content=\"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/\" \/>\n<meta property=\"og:site_name\" content=\"Inst Tools\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/instrumentationtoolss\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/instrumentationtoolss\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-13T04:13:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-13T04:13:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1437\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Editorial Staff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Modbus Function Command Formats\" \/>\n<meta name=\"twitter:description\" content=\"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.\" \/>\n<meta name=\"twitter:creator\" content=\"@insttools\" \/>\n<meta name=\"twitter:site\" content=\"@insttools\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editorial Staff\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/\"},\"author\":{\"name\":\"Editorial Staff\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#\\\/schema\\\/person\\\/41ad3dac301c219e8d41b1ace61655b2\"},\"headline\":\"Modbus Function Command Formats\",\"datePublished\":\"2023-01-13T04:13:23+00:00\",\"dateModified\":\"2023-01-13T04:13:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/\"},\"wordCount\":1270,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/instrumentationtools.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png\",\"keywords\":[\"Modbus\",\"Modbus Address\",\"Modbus Communication\",\"Modbus Communication Guide\",\"Modbus Communication Network\",\"modbus communication protocol\",\"Modbus Communication Settings\",\"Modbus Communication Theory\",\"Modbus function codes\",\"Modbus message\",\"Modbus Network\",\"Modbus Protocol\",\"Modbus Structure\",\"What is Modbus?\"],\"articleSection\":[\"Control Systems\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/\",\"url\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/\",\"name\":\"Modbus Function Command Formats\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/instrumentationtools.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png\",\"datePublished\":\"2023-01-13T04:13:23+00:00\",\"dateModified\":\"2023-01-13T04:13:27+00:00\",\"description\":\"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#primaryimage\",\"url\":\"https:\\\/\\\/instrumentationtools.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png\",\"contentUrl\":\"https:\\\/\\\/instrumentationtools.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png\",\"width\":2560,\"height\":1437,\"caption\":\"Modbus Function code 02 \u2013 Read Contact(s)\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/modbus-function-command-formats\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/instrumentationtools.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Modbus Function Command Formats\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#website\",\"url\":\"https:\\\/\\\/instrumentationtools.com\\\/\",\"name\":\"Instrumentation Tools\",\"description\":\"Instrumentation, Electrical, PLC, Tutorials\",\"publisher\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#organization\"},\"alternateName\":\"Inst Tools\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/instrumentationtools.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#organization\",\"name\":\"Instrumentation Tools\",\"alternateName\":\"Inst Tools\",\"url\":\"https:\\\/\\\/instrumentationtools.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/instrumentationtools.com\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Instrumentation-Tools-Logo.png\",\"contentUrl\":\"https:\\\/\\\/instrumentationtools.com\\\/wp-content\\\/uploads\\\/2018\\\/10\\\/Instrumentation-Tools-Logo.png\",\"width\":1024,\"height\":1024,\"caption\":\"Instrumentation Tools\"},\"image\":{\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/instrumentationtoolss\\\/\",\"https:\\\/\\\/x.com\\\/insttools\",\"https:\\\/\\\/mastodon.social\\\/@InstrumentationTools\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/instrumentationtools\\\/\",\"https:\\\/\\\/whatsapp.com\\\/channel\\\/0029VaAbUecLNSa4rDPOV31o\",\"https:\\\/\\\/t.me\\\/+u3qORX5FKec1NjA1\",\"https:\\\/\\\/www.instagram.com\\\/instrumentationtools\\\/\",\"https:\\\/\\\/youtube.com\\\/instrumentationtools\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/instrumentationtools.com\\\/#\\\/schema\\\/person\\\/41ad3dac301c219e8d41b1ace61655b2\",\"name\":\"Editorial Staff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7d7b78a0bf6b95aebc68e7790f9094403ae40b3fcb9c436cb6956873b90826de?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7d7b78a0bf6b95aebc68e7790f9094403ae40b3fcb9c436cb6956873b90826de?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7d7b78a0bf6b95aebc68e7790f9094403ae40b3fcb9c436cb6956873b90826de?s=96&d=mm&r=g\",\"caption\":\"Editorial Staff\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/instrumentationtoolss\",\"https:\\\/\\\/x.com\\\/insttools\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/InstrumentationTools\\\/\"],\"url\":\"https:\\\/\\\/instrumentationtools.com\\\/author\\\/editorial\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Modbus Function Command Formats","description":"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/","og_locale":"en_US","og_type":"article","og_title":"Modbus Function Command Formats","og_description":"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.","og_url":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/","og_site_name":"Inst Tools","article_publisher":"https:\/\/www.facebook.com\/instrumentationtoolss\/","article_author":"https:\/\/www.facebook.com\/instrumentationtoolss","article_published_time":"2023-01-13T04:13:23+00:00","article_modified_time":"2023-01-13T04:13:27+00:00","og_image":[{"width":2560,"height":1437,"url":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png","type":"image\/png"}],"author":"Editorial Staff","twitter_card":"summary_large_image","twitter_title":"Modbus Function Command Formats","twitter_description":"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.","twitter_creator":"@insttools","twitter_site":"@insttools","twitter_misc":{"Written by":"Editorial Staff","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#article","isPartOf":{"@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/"},"author":{"name":"Editorial Staff","@id":"https:\/\/instrumentationtools.com\/#\/schema\/person\/41ad3dac301c219e8d41b1ace61655b2"},"headline":"Modbus Function Command Formats","datePublished":"2023-01-13T04:13:23+00:00","dateModified":"2023-01-13T04:13:27+00:00","mainEntityOfPage":{"@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/"},"wordCount":1270,"commentCount":0,"publisher":{"@id":"https:\/\/instrumentationtools.com\/#organization"},"image":{"@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#primaryimage"},"thumbnailUrl":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png","keywords":["Modbus","Modbus Address","Modbus Communication","Modbus Communication Guide","Modbus Communication Network","modbus communication protocol","Modbus Communication Settings","Modbus Communication Theory","Modbus function codes","Modbus message","Modbus Network","Modbus Protocol","Modbus Structure","What is Modbus?"],"articleSection":["Control Systems"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/","url":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/","name":"Modbus Function Command Formats","isPartOf":{"@id":"https:\/\/instrumentationtools.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#primaryimage"},"image":{"@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#primaryimage"},"thumbnailUrl":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png","datePublished":"2023-01-13T04:13:23+00:00","dateModified":"2023-01-13T04:13:27+00:00","description":"In this article, you will learn the Modbus Function Codes like Read and write of coil, contact, holding register, and analog input register.","breadcrumb":{"@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/instrumentationtools.com\/modbus-function-command-formats\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#primaryimage","url":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png","contentUrl":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2023\/01\/Modbus-Function-code-02-\u2013-Read-Contacts-scaled.png","width":2560,"height":1437,"caption":"Modbus Function code 02 \u2013 Read Contact(s)"},{"@type":"BreadcrumbList","@id":"https:\/\/instrumentationtools.com\/modbus-function-command-formats\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/instrumentationtools.com\/"},{"@type":"ListItem","position":2,"name":"Modbus Function Command Formats"}]},{"@type":"WebSite","@id":"https:\/\/instrumentationtools.com\/#website","url":"https:\/\/instrumentationtools.com\/","name":"Instrumentation Tools","description":"Instrumentation, Electrical, PLC, Tutorials","publisher":{"@id":"https:\/\/instrumentationtools.com\/#organization"},"alternateName":"Inst Tools","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/instrumentationtools.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/instrumentationtools.com\/#organization","name":"Instrumentation Tools","alternateName":"Inst Tools","url":"https:\/\/instrumentationtools.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/instrumentationtools.com\/#\/schema\/logo\/image\/","url":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2018\/10\/Instrumentation-Tools-Logo.png","contentUrl":"https:\/\/instrumentationtools.com\/wp-content\/uploads\/2018\/10\/Instrumentation-Tools-Logo.png","width":1024,"height":1024,"caption":"Instrumentation Tools"},"image":{"@id":"https:\/\/instrumentationtools.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/instrumentationtoolss\/","https:\/\/x.com\/insttools","https:\/\/mastodon.social\/@InstrumentationTools","https:\/\/www.linkedin.com\/company\/instrumentationtools\/","https:\/\/whatsapp.com\/channel\/0029VaAbUecLNSa4rDPOV31o","https:\/\/t.me\/+u3qORX5FKec1NjA1","https:\/\/www.instagram.com\/instrumentationtools\/","https:\/\/youtube.com\/instrumentationtools"]},{"@type":"Person","@id":"https:\/\/instrumentationtools.com\/#\/schema\/person\/41ad3dac301c219e8d41b1ace61655b2","name":"Editorial Staff","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7d7b78a0bf6b95aebc68e7790f9094403ae40b3fcb9c436cb6956873b90826de?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7d7b78a0bf6b95aebc68e7790f9094403ae40b3fcb9c436cb6956873b90826de?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7d7b78a0bf6b95aebc68e7790f9094403ae40b3fcb9c436cb6956873b90826de?s=96&d=mm&r=g","caption":"Editorial Staff"},"sameAs":["https:\/\/www.facebook.com\/instrumentationtoolss","https:\/\/x.com\/insttools","https:\/\/www.youtube.com\/c\/InstrumentationTools\/"],"url":"https:\/\/instrumentationtools.com\/author\/editorial\/"}]}},"_links":{"self":[{"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/posts\/57051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/comments?post=57051"}],"version-history":[{"count":0,"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/posts\/57051\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/media\/57476"}],"wp:attachment":[{"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/media?parent=57051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/categories?post=57051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/instrumentationtools.com\/wp-json\/wp\/v2\/tags?post=57051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}