{"id":10192,"date":"2020-09-03T16:29:59","date_gmt":"2020-09-03T16:29:59","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/?page_id=10192"},"modified":"2025-11-10T13:48:41","modified_gmt":"2025-11-10T18:48:41","slug":"modbus_srvr_serial","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/14-i-o-systems\/modbus_srvr_serial\/","title":{"rendered":"modbus_srvr_serial"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<p style=\"padding-left: 40px;\">Initialize and run a Modbus server for serial communication with slave devices, managing configuration, shared memory allocation, and spawning streaming tasks.<\/p>\n<\/div>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>modbus_srvr_serial<\/strong> &lt;priority&gt; [device_parameters] [ais] [dis] [dos] [de] [aid] [aod] [did] [dod] [noerr]<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<p>&nbsp;<\/p>\n<dl>\n<dd>\n<table style=\"width: 92.22%; height: 751px;\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr style=\"height: 56px;\">\n<td style=\"width: 9.68188%; height: 56px;\">\n<p>priority<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 56px;\">\n<p>Specify the priority level of the task.\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"width: 9.68188%; height: 80px;\">\n<p>device_parameters<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 80px;\">\n<p>Optional. Specify one or more strings containing serial device information, such as device path, baud rate, data bits, stop bits, parity, and endianness (e.g., \/dev\/tty0:9600:8:1:0:l).<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 104px;\">\n<td style=\"width: 9.68188%; height: 104px;\">\n<p>ais<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 104px;\">\n<p>Optional. Specify this option to read all of the input and holding registers one at a time. See Notes for additional details.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"width: 9.68188%; height: 80px;\">\n<p>dis<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 80px;\">\n<p>Optional. Specify this option to read all of the coil and discrete registers one at a time. See Notes for additional details.\u00a0\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 62px;\">\n<td style=\"width: 9.68188%; height: 62px;\">dos<\/p>\n<p>&nbsp;<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 62px;\">\n<p>Optional. Specify this option to write all of the coil registers one at a time. See Notes for additional details.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"width: 9.68188%; height: 80px;\">\n<p>de<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 80px;\">\n<p>Optional. Specify this option to produce general debug information.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 55px;\">\n<td style=\"width: 9.68188%; height: 55px;\">\n<p>aid<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 55px;\">\n<p>Optional. Specify this option to produce AI debug information.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 58px;\">\n<td style=\"width: 9.68188%; height: 58px;\">\n<p>aod<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 58px;\">\n<p>Optional. Specify this option to produce AO debug information.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 51px;\">\n<td style=\"width: 9.68188%; height: 51px;\">\n<p>did<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 51px;\">\n<p>Optional. Specify this option to produce DI debug information.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 62px;\">\n<td style=\"width: 9.68188%; height: 62px;\">\n<p>dod<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 62px;\">\n<p>Optional. Specify this option to produce DO debug information.\u00a0<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 63px;\">\n<td style=\"width: 9.68188%; height: 63px;\">\n<p>noerr<\/p>\n<\/td>\n<td style=\"width: 90.0415%; height: 63px;\">\n<p>Optional. Specify this option to <span style=\"font-family: inherit; font-size: inherit;\">prevent certain errors rom triggering restarts.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p><strong>modbus_srvr_serial<\/strong> 24 \/dev\/tty0:9600:8:1:0:l &amp;<\/p>\n<p>The preceding communicates with the \/dev\/tty0 device, with a 9600 Baudrate, 8 databits, 1 stop bit, no parity, and is little endian.<\/p>\n<p><strong>modbus_srvr_serial<\/strong> 24 \/dev\/tty0:9600:8:1:0:l \/dev\/ttyS1:19200:7:1:1:b &amp;<\/p>\n<p>The preceding communicates with 2 interfaces. The first interface is \/dev\/tty0 device, with a 9600 Baudrate, 8 databits, 1 stop bit, no parity, and is little endian. The second interface is \/dev\/tty0 device, with a 19200 Baudrate, 7 databits, 1 stop bit, parity, and is big endian.<\/p>\n<\/dd>\n<\/dl>\n<dl>\n<dd>\n<p><strong>modbus_srvr_serial<\/strong> 24 \/dev\/tty0:9600:8:1:0:l \/dev\/ttyS1:19200:7:1:1:b dis ais &amp;<\/p>\n<p>The preceding communicates with 2 interfaces. The first interface is \/dev\/tty0 device, with a 9600 Baudrate, 8 databits, 1 stop bit, no parity, and is little endian. The second interface is \/dev\/tty0 device, with a 19200 Baudrate, 7 databits, 1 stop bit, parity, and is big endian. The task will read all registers one at a time.\u00a0<\/p>\n<\/dd>\n<\/dl>\n<dl>\n<dd>\n<p><strong>modbus_srvr_serial<\/strong> 24 \/dev\/tty0:9600:8:1:0:l \/dev\/ttyS1:19200:7:1:1:b noerr &amp;<\/p>\n<p>The preceding communicates with 2 interfaces. The first interface is \/dev\/tty0 device, with a 9600 Baudrate, 8 databits, 1 stop bit, no parity, and is little endian. The second interface is \/dev\/tty0 device, with a 19200 Baudrate, 7 databits, 1 stop bit, parity, and is big endian.\u00a0 This will also not have some errors cause the task to re-connect.\u00a0<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>The \u2018ais\u2019, \u2018dis\u2019, &#8216;dos&#8217; options will make the task slower because it is unable to batch the registers. So, these options should not be used unless necessary.\u00a0<\/p>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<p style=\"padding-left: 40px;\"><a href=\"https:\/\/cyflex.com\/index.php\/usage-help-manual\/14-i-o-systems\/gmodbus\/\">gmodbus<\/a>, <a href=\"\/wp-content\/uploads\/GModBus-Device-Driver-Setup.pdf\">GModBus Setup<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Initialize and run a Modbus server for serial communication with slave devices, managing configuration, shared memory allocation, and spawning streaming tasks. Enter: modbus_srvr_serial &lt;priority&gt; [device_parameters] [ais] [dis] [dos] [de] [aid] [aod] [did] [dod] [noerr] Where: &nbsp; priority Specify the priority level of the task.\u00a0 device_parameters Optional. Specify one or more strings containing serial device [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"parent":1964,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-10192","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/10192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=10192"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/10192\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1964"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=10192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}