{"id":85344,"date":"2023-02-15T17:01:11","date_gmt":"2023-02-15T09:01:11","guid":{"rendered":"https:\/\/www.tm-robot.com\/?post_type=docs&#038;p=85344"},"modified":"2023-03-02T17:44:43","modified_gmt":"2023-03-02T09:44:43","slug":"how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip","status":"publish","type":"docs","link":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/","title":{"rendered":"How to Add IO Channels with External IO Device via MODBUS TCP\/IP"},"content":{"rendered":"<p>Examples are valid for:<\/p>\n<p>TMflow Software version: 1.76 or later.<\/p>\n<p>TM Robot Hardware version: HW 1.x\/2.x\/3.x<\/p>\n<p>Other specific requirements: Refer to\u00a0<strong>Preparation<\/strong>\u00a0section below.<\/p>\n<p>Note that older or newer software versions may have different results.<\/p>\n<p>&nbsp;<\/p>\n<h2>Goal<\/h2>\n<p>We could leverage 3rd-party module to extend the channels if additional analog ouptuts are needed.<\/p>\n<p>For example, you can control the power of a welding power source from 0~100% by 0~10V.<\/p>\n<p>In this article, we will demo how to set an analog output via Modbus TCP\/IP in TMflow.<\/p>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png\"><img loading=\"lazy\" class=\"size-full wp-image-85391 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png\" alt=\"\" width=\"1302\" height=\"407\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png 1302w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4-300x94.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4-1024x320.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4-768x240.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4-360x113.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4-1000x313.png 1000w\" sizes=\"(max-width: 1302px) 100vw, 1302px\" \/><\/a><\/p>\n<h2>Preparation<\/h2>\n<ul>\n<li>TM Robot HW3.2, SW1.86<\/li>\n<li>3rd-party IO Module &#8211; O DEAR\u00a0 DSNDA4Y8L-MW (4 analog output)<\/li>\n<li>Ethernet cable<\/li>\n<li>IO cables<\/li>\n<li>Load(voltage meter)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Wiring<\/h2>\n<p>There is the schematic of wiring for your reference. Please refer to the website of the 3rd-party product for more information.<\/p>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2.png\"><img loading=\"lazy\" class=\"size-full wp-image-85358 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2.png\" alt=\"\" width=\"1095\" height=\"502\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2.png 1095w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2-300x138.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2-1024x469.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2-768x352.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2-360x165.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled2-1000x458.png 1000w\" sizes=\"(max-width: 1095px) 100vw, 1095px\" \/><\/a><\/p>\n<pre><\/pre>\n<h2>Setting on IO Module<\/h2>\n<ul>\n<li>IP &#8211; By default, it&#8217;s <span style=\"color: #ff0000;\">192.168.1.100<\/span>. Please read the manual of this product if you want to modify IP address.<\/li>\n<li>Set to 0-10V mode (red switch to #6, then yellow switch to #2)<\/li>\n<li>Do power cycle<\/li>\n<li>Set to Modbus TCP mode (red switch -&gt; #4)<\/li>\n<li>Do power cycle<\/li>\n<\/ul>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled3.png\"><img loading=\"lazy\" class=\"size-full wp-image-85365 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled3.png\" alt=\"\" width=\"437\" height=\"361\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled3.png 437w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled3-300x248.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled3-360x297.png 360w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<h2>Setting on TMflow<\/h2>\n<ul>\n<li>IP &#8211; System &gt; Network &gt; IP, IP set to <span style=\"color: #ff0000;\">192.168.1.10<\/span>, Mask <span style=\"color: #ff0000;\">255, 255, 255, 0<\/span><\/li>\n<li>Robot switch to manual mode<\/li>\n<li>Create an empty TMflow project, click Modbus Device on the panel at right hand side.<\/li>\n<li>Create an IO device with parameters such as <span style=\"color: #ff0000;\">preset_RegisterOutput<\/span><\/li>\n<li>Since the unit on IO module are in 16 bits per signal, so select <span style=\"color: #ff0000;\">Signal Type : Register Output<\/span> and <span style=\"color: #ff0000;\">int16\u00a0<\/span><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1.png\"><img loading=\"lazy\" class=\"size-full wp-image-85371 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1.png\" alt=\"\" width=\"1342\" height=\"477\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1.png 1342w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1-300x107.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1-1024x364.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1-768x273.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1-360x128.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/5-1-1000x355.png 1000w\" sizes=\"(max-width: 1342px) 100vw, 1342px\" \/><\/a><\/li>\n<li>\n<blockquote><p>Why the address is <span style=\"color: #ff0000;\">0<\/span> on the previous step?<\/p><\/blockquote>\n<\/li>\n<\/ul>\n<blockquote><p>By the manual of IO module, address <span style=\"color: #ff0000;\">4<span style=\"color: #000000;\">0<\/span><\/span>001 means <span style=\"color: #ff0000;\">Register Output<\/span> (FC06 in the definition of Modbus).<\/p><\/blockquote>\n<blockquote><p><span style=\"color: #000000;\">Address 4<span style=\"color: #ff0000;\">0<\/span><\/span><span style=\"color: #ff0000;\">001<\/span> means <span style=\"color: #ff0000;\">0 <span style=\"color: #000000;\">of the address at TMflow side.<\/span><\/span><\/p><\/blockquote>\n<blockquote><p><span style=\"color: #000000;\">Address 4<span style=\"color: #ff0000;\">0<\/span><\/span><span style=\"color: #ff0000;\">002<\/span> means <span style=\"color: #ff0000;\">1 <span style=\"color: #000000;\">of the address at TMflow side.<\/span><\/span><\/p><\/blockquote>\n<table width=\"850\">\n<tbody>\n<tr>\n<td width=\"279\">\n<p style=\"text-align: center;\"><b>Modbus<\/b><b> Address on IO Device<\/b><\/p>\n<\/td>\n<td style=\"text-align: center;\" width=\"268\"><b>Address Setting<\/b><b> on <\/b><b>TMflow<\/b><\/td>\n<td style=\"text-align: center;\" width=\"304\"><b>Physical<\/b><b> Channel on IO Device<\/b><\/td>\n<\/tr>\n<tr>\n<td width=\"279\">\n<p style=\"text-align: center;\">40001<\/p>\n<\/td>\n<td width=\"268\">\n<p style=\"text-align: center;\">0<\/p>\n<\/td>\n<td width=\"304\">\n<p style=\"text-align: center;\">Analog output1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"279\">\n<p style=\"text-align: center;\">40002<\/p>\n<\/td>\n<td width=\"268\">\n<p style=\"text-align: center;\">1<\/p>\n<\/td>\n<td width=\"304\">\n<p style=\"text-align: center;\">Analog output2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"279\">\n<p style=\"text-align: center;\">40003<\/p>\n<\/td>\n<td width=\"268\">\n<p style=\"text-align: center;\">2<\/p>\n<\/td>\n<td width=\"304\">\n<p style=\"text-align: center;\">Analog output3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"279\">40004<\/td>\n<td style=\"text-align: center;\" width=\"268\">3<\/td>\n<td width=\"304\">\n<p style=\"text-align: center;\">Analog output4<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<ul>\n<li>Create a variable : int <span style=\"color: #ff0000;\">var_RO_Result.<\/span><\/li>\n<li>Create a SET node and write the Modbus address <span style=\"color: #ff0000;\">preset_RegisterOutput<\/span> with <span style=\"color: #ff0000;\">var_RO_Result<\/span>.<\/li>\n<li>If you want to set the phycial analog output to <span style=\"color: #ff0000;\">9V<\/span>, then the value of\u00a0<span style=\"color: #ff0000;\">preset_RegisterOutput <\/span>should be : <span style=\"color: #ff0000;\">9V<\/span>\/10V*65536 = <span style=\"color: #ff0000;\">58982<\/span><\/li>\n<li>If\u00a0it is <span style=\"color: #ff0000;\">5V<\/span>, then <span style=\"color: #ff0000;\">preset_RegisterOutput <\/span>should be : <span style=\"color: #ff0000;\">5V<\/span>\/10V*65536 = <span style=\"color: #ff0000;\">32768<\/span><\/li>\n<\/ul>\n<table width=\"546\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"279\"><b>Value on Address<\/b><\/td>\n<td style=\"text-align: center;\" width=\"268\"><b>Physical<\/b><b> Value<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"279\">0~65535 (16bits)<\/td>\n<td style=\"text-align: center;\" width=\"268\">0~10V<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2.png\"><img loading=\"lazy\" class=\"size-full wp-image-85379 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2.png\" alt=\"\" width=\"1316\" height=\"506\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2.png 1316w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2-300x115.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2-1024x394.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2-768x295.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2-360x138.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-2-1000x384.png 1000w\" sizes=\"(max-width: 1316px) 100vw, 1316px\" \/><\/a><\/p>\n<pre><\/pre>\n<h2>Output Result of Analog Module<\/h2>\n<ul>\n<li>Run the TMflow project, the physical analog output could be measured, 9V.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-3.png\"><img loading=\"lazy\" class=\"size-full wp-image-85385 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-3.png\" alt=\"\" width=\"968\" height=\"399\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-3.png 968w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-3-300x124.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-3-768x317.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-3-360x148.png 360w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/a><\/p>\n<h2>How to Do Linear Transformation(Input and Output Mapping)?<\/h2>\n<p>From example above, we could assign a value [0~65535] to the output [0~10V].<\/p>\n<table width=\"546\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"279\"><b>Value on Address<\/b><\/td>\n<td style=\"text-align: center;\" width=\"268\"><b>Physical<\/b><b> Value<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"279\">0~65535 (16bits)<\/td>\n<td style=\"text-align: center;\" width=\"268\">0~10V<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>But for a real welder, there will be a linear transformation between <span style=\"color: #ff0000;\">TMflow value<\/span> and <span style=\"color: #ff0000;\">Welder Physical Output<span style=\"color: #000000;\">. <\/span><\/span><\/p>\n<p><span style=\"color: #ff0000;\"><span style=\"color: #000000;\">And we want those values <span style=\"color: #ff0000;\">are the same<\/span>, so that it will be <span style=\"color: #ff0000;\">intuitive<\/span> for user to use.<\/span><\/span><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36.png\"><img loading=\"lazy\" class=\"size-full wp-image-86802 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36.png\" alt=\"\" width=\"1085\" height=\"565\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36.png 1085w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36-300x156.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36-1024x533.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36-768x400.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36-360x187.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-36-1000x521.png 1000w\" sizes=\"(max-width: 1085px) 100vw, 1085px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Linear transformation could be easily done in <strong><em>TMflow : Expression Editor<\/em><\/strong>, there are the steps:<\/p>\n<ol>\n<li>Create a TMflow project and assign a value(<span style=\"color: #ff0000;\">100A<\/span> for example) to a float variable <span style=\"color: #ff0000;\">var_Current_Command<\/span><\/li>\n<li>Use the formula in <strong><em>Expression Editor<\/em><\/strong>:<\/li>\n<\/ol>\n<p>(var_Current_Command-<span style=\"color: #0000ff;\">LowerLimit_Welder<\/span>) \/ (<span style=\"color: #339966;\">HigherLimit_Welder<\/span>&#8211;<span style=\"color: #0000ff;\">LowerLimit_Welder<\/span>) * (<span style=\"color: #ff00ff;\">HigherLimit_TMflow_Before<\/span>&#8211;<span style=\"color: #ffcc00;\">LowerLimit_TMflow_Before<\/span>+1)<\/p>\n<p>= (var_Current_Command-<span style=\"color: #0000ff;\">22<\/span>) \/ (<span style=\"color: #339966;\">350<\/span>&#8211;<span style=\"color: #0000ff;\">22<\/span>) * (<span style=\"color: #ff00ff;\">65535<\/span>&#8211;<span style=\"color: #ff9900;\">0<\/span>+1)<\/p>\n<p>3. Show the result<\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-86808 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37.png\" alt=\"\" width=\"1529\" height=\"791\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37.png 1529w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37-300x155.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37-1024x530.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37-768x397.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37-360x186.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-37-1000x517.png 1000w\" sizes=\"(max-width: 1529px) 100vw, 1529px\" \/><\/p>\n<p>After the linear trasnformation, if the command is <span style=\"color: #ff0000;\">100A<\/span>, then the value on the Modbus address will be <span style=\"color: #ff0000;\">15584<\/span>, and the physical output of welder will be:<\/p>\n<p>15584\/65536*(350-22)+22 = <span style=\"color: #ff0000;\">100(A)<span style=\"color: #000000;\">, which is the same with the command.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>So we had done the linear transformation!<\/p>\n<table width=\"546\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"279\"><b>TMflow Command(A)<\/b><\/td>\n<td style=\"text-align: center;\" width=\"268\"><b>Physical<\/b><b> Output of Welder(A)<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"279\">22<\/td>\n<td style=\"text-align: center;\" width=\"268\">22<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"279\">100<\/td>\n<td style=\"text-align: center;\" width=\"268\">100<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"279\">350<\/td>\n<td style=\"text-align: center;\" width=\"268\">350<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38.png\"><img loading=\"lazy\" class=\"size-full wp-image-86814 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38.png\" alt=\"\" width=\"1218\" height=\"657\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38.png 1218w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38-300x162.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38-1024x552.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38-768x414.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38-360x194.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-38-1000x539.png 1000w\" sizes=\"(max-width: 1218px) 100vw, 1218px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Output Result of Digital Module<\/h2>\n<ul>\n<li>With another IO module <span style=\"color: #ff0000;\">DSNX16Y16L-MW<\/span>, TM robot could control digital input and output also.<\/li>\n<li>Create some variables in TMflow project.<\/li>\n<li>Combine the single bit value to the register <span style=\"color: #ff0000;\">preset_RegisterOutput<\/span> with following expression.<\/li>\n<\/ul>\n<p><span style=\"color: #ff0000;\">preset_RegisterOutput<\/span> = DO1*(2^0) + DO2*(2^1) + DO3*(2^2) + &#8230; + DO15*(2^15)<\/p>\n<p>For example, if you want to set DO1 = 1(on), DO2 = 0(off), DO3 = 1(on), then <span style=\"color: #ff0000;\">preset_RegisterOutput<\/span> = DO1*(2^0)+DO2*(2^1)+DO3*(2^2) = 1*1+0*2+1*4 = 6<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1.png\"><img loading=\"lazy\" class=\"wp-image-85419 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1.png\" alt=\"\" width=\"1316\" height=\"410\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1.png 1583w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1-300x93.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1-1024x319.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1-768x239.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1-360x112.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1-1536x478.png 1536w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-1-1000x311.png 1000w\" sizes=\"(max-width: 1316px) 100vw, 1316px\" \/><\/a><\/p>\n<ul>\n<li>Add a Display node with following expression.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-2.png\"><img loading=\"lazy\" class=\"size-full wp-image-85425 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-2.png\" alt=\"\" width=\"787\" height=\"738\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-2.png 787w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-2-300x281.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-2-768x720.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-2-360x338.png 360w\" sizes=\"(max-width: 787px) 100vw, 787px\" \/><\/a><\/p>\n<ul>\n<li>Run the project, the status will be updated periodically.<br \/>\n<a href=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3.png\"><img loading=\"lazy\" class=\"size-full wp-image-85431 aligncenter\" src=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3.png\" alt=\"\" width=\"1355\" height=\"551\" srcset=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3.png 1355w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3-300x122.png 300w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3-1024x416.png 1024w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3-768x312.png 768w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3-360x146.png 360w, https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/3-3-1000x407.png 1000w\" sizes=\"(max-width: 1355px) 100vw, 1355px\" \/><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Examples are valid for: TMflow Software version: 1.76 o [&hellip;]<\/p>\n","protected":false},"author":2583,"featured_media":0,"parent":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"doc_category":[4144],"doc_tag":[2505,2499],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add IO Channels with External IO Device via MODBUS TCP\/IP | \u8fbe\u660e\u673a\u5668\u4eba<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add IO Channels with External IO Device via MODBUS TCP\/IP | \u8fbe\u660e\u673a\u5668\u4eba\" \/>\n<meta property=\"og:description\" content=\"Examples are valid for: TMflow Software version: 1.76 o [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/\" \/>\n<meta property=\"og:site_name\" content=\"\u8fbe\u660e\u673a\u5668\u4eba\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-02T09:44:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#organization\",\"name\":\"Techman Robot\",\"url\":\"https:\/\/www.tm-robot.com.cn\/de\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#logo\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png\",\"contentUrl\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png\",\"width\":221,\"height\":196,\"caption\":\"Techman Robot\"},\"image\":{\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#website\",\"url\":\"https:\/\/www.tm-robot.com.cn\/de\/\",\"name\":\"\\u8fbe\\u660e\\u673a\\u5668\\u4eba\",\"description\":\"\\u539f\\u751fAI\\u5f15\\u64ce + \\u673a\\u5668\\u624b\\u81c2 + \\u89c6\\u89c9\\u7cfb\\u7edf\",\"publisher\":{\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.tm-robot.com.cn\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#primaryimage\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png\",\"contentUrl\":\"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#webpage\",\"url\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/\",\"name\":\"How to Add IO Channels with External IO Device via MODBUS TCP\/IP | \\u8fbe\\u660e\\u673a\\u5668\\u4eba\",\"isPartOf\":{\"@id\":\"https:\/\/www.tm-robot.com.cn\/de\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#primaryimage\"},\"datePublished\":\"2023-02-15T09:01:11+00:00\",\"dateModified\":\"2023-03-02T09:44:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.tm-robot.com\/zh-hans\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docs\",\"item\":\"https:\/\/www.tm-robot.com\/zh-hans\/docs\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Add IO Channels with External IO Device via MODBUS TCP\/IP\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add IO Channels with External IO Device via MODBUS TCP\/IP | \u8fbe\u660e\u673a\u5668\u4eba","robots":{"index":"noindex","follow":"follow"},"og_locale":"zh_CN","og_type":"article","og_title":"How to Add IO Channels with External IO Device via MODBUS TCP\/IP | \u8fbe\u660e\u673a\u5668\u4eba","og_description":"Examples are valid for: TMflow Software version: 1.76 o [&hellip;]","og_url":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/","og_site_name":"\u8fbe\u660e\u673a\u5668\u4eba","article_modified_time":"2023-03-02T09:44:43+00:00","og_image":[{"url":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.tm-robot.com.cn\/de\/#organization","name":"Techman Robot","url":"https:\/\/www.tm-robot.com.cn\/de\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/www.tm-robot.com.cn\/de\/#logo","inLanguage":"zh-CN","url":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png","contentUrl":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2018\/09\/logo.png","width":221,"height":196,"caption":"Techman Robot"},"image":{"@id":"https:\/\/www.tm-robot.com.cn\/de\/#logo"}},{"@type":"WebSite","@id":"https:\/\/www.tm-robot.com.cn\/de\/#website","url":"https:\/\/www.tm-robot.com.cn\/de\/","name":"\u8fbe\u660e\u673a\u5668\u4eba","description":"\u539f\u751fAI\u5f15\u64ce + \u673a\u5668\u624b\u81c2 + \u89c6\u89c9\u7cfb\u7edf","publisher":{"@id":"https:\/\/www.tm-robot.com.cn\/de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tm-robot.com.cn\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"ImageObject","@id":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#primaryimage","inLanguage":"zh-CN","url":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png","contentUrl":"https:\/\/tm-robot.oss-cn-hongkong.aliyuncs.com\/wp-content\/uploads\/2023\/02\/Untitled-4.png"},{"@type":"WebPage","@id":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#webpage","url":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/","name":"How to Add IO Channels with External IO Device via MODBUS TCP\/IP | \u8fbe\u660e\u673a\u5668\u4eba","isPartOf":{"@id":"https:\/\/www.tm-robot.com.cn\/de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#primaryimage"},"datePublished":"2023-02-15T09:01:11+00:00","dateModified":"2023-03-02T09:44:43+00:00","breadcrumb":{"@id":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/how-to-add-input-output-channels-with-external-io-device-via-modbus-tcp-ip\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.tm-robot.com\/zh-hans\/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https:\/\/www.tm-robot.com\/zh-hans\/docs\/"},{"@type":"ListItem","position":3,"name":"How to Add IO Channels with External IO Device via MODBUS TCP\/IP"}]}]}},"_links":{"self":[{"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/docs\/85344"}],"collection":[{"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/users\/2583"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=85344"}],"version-history":[{"count":0,"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/docs\/85344\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=85344"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/doc_category?post=85344"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.tm-robot.com\/zh-hans\/wp-json\/wp\/v2\/doc_tag?post=85344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}