"# Modbus Slave\u82f1\u6587\u7248\u7528\u6237\u624b\u518c\n\n> 2023-10-13 | 2026-06-30\n> https:\/\/www.modbus.cn\/en\/25401.html\n\n**\u8c03\u8bd5\u8f6f\u4ef6\u4e0e\u5de5\u5177\u6559\u7a0b**\n\n---\n\nWitte Software\u00ae&nbsp;[https:\/\/www.modbustools.com](https:\/\/www.modbustools.com\/)\n\n2023-08-11\n\n## 1. Modbus Slave\n\nModbus Slave is for simulating up to 100 slave devices in 100 windows!. Speed up your PLC programming with this simulating tools. Start programming and test before you receive your slave device from supplier. Data contained with any open document is accessible to the master application. Same user interface as Modbus Poll.\n\nMonitoring of serial traffic. OLE Automation for interfacing with Visual Basic, Excel etc. To interpret and show the Modbus data according to your specific requirements. E.g. edit your slave data in Excel. Try the Excel example.xls included with the program.\n\nEach window opened within Modbus Slave may be configured to represent data from the same or different slave nodes.\n\n### 1.1. System requirements for Modbus Slave\n\nHardware requirements\n\nProcessor; 1 GHz or faster recommended\n1 GB RAM\n5 MB of available hard drive space\n1024 x 768 display resolutionOS requirements\n\nAll Windows versions from Windows 7 to Windows 11 are supported.\nModbus Slave version 8 runs on Windows XP.\n\n#### 1.1.1. Silent install\n\nSilent install require no user intervention and have no user interface. The user doesn\u2019t see any dialog and isn\u2019t asked any questions.\nUse the command line \/S switch.\n\n### 1.2. End User License Agreement\n\nYou should carefully read the following terms and conditions before using Modbus Slave. Unless you have a different license agreement signed by Witte Software, your use of this software indicates your acceptance of this license agreement and warranty. If you do not accept these terms you must cease using this software immediately.\n\n**Copyright.**\nModbus Slave (\"The Software\") is copyright 2002-2023 by Witte Software, all rights reserved.\n\n**Evaluation and Registration.**\nThis is not free software. You are hereby licensed to use the Software for evaluation purposes without charge for a period of 30 days.\n\nIf you use the Software after the 30 day evaluation period a registration fee is required.\n\nUnregistered use of the Software after the 30-day evaluation period is in violation of U.S. and international copyright laws.\n\nOne registered copy of the Software may either be used by a single person who uses the software personally on one or more computers, or installed on a single computer used by multiple people, but not both.\n\nFor information on order and pricing, please visit&nbsp;[https:\/\/www.modbustools.com\/order.html](https:\/\/www.modbustools.com\/order.html)\n\nModbus Slave licenses are perpetual. Once you buy a license to a specific major version, and as long as you abide by the license agreement, you can use that version forever with no additional cost.\n\n**Distribution.**\nProvided that you do not include your License Key you are hereby licensed to make copies of the Software; give exact copies of the original to anyone; and distribute the Software in its unmodified form via electronic means. You are specifically prohibited from charging for any such copies.\n\n**LIMITED WARRANTY.**\nTHE SOFTWARE IS PROVIDED AS IS AND WITTE SOFTWARE DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\n**LIMITATION ON DAMAGES.**\nNEITHER WITTE SOFTWARE NOR ANYONE INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE SUCH SOFTWARE EVEN IF WITTE SOFTWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO EVENT SHALL WITTE SOFTWARE\u2019S LIABILITY FOR ANY DAMAGES EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE SOFTWARE, REGARDLESS OF THE FORM OF CLAIM. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE.\n\n## 2. Modbus Slave Features\n\n### 2.1. Connections\n\nModbus Slave read\/write data from devices using:\n\n- Modbus RTU or ASCII on RS232 or RS485 networks. (USB\/RS232\/485 Converter)\n\n- Modbus TCP\/IP\n\n- Modbus Over TCP\/IP. (Modbus RTU encapsulated in a TCP packet)\n\n- Modbus UDP\/IP\n\n- Modbus Over UDP\/IP. (Modbus RTU encapsulated in a UDP packet)\n\n### 2.2. Supported Modbus Functions\n\n- 01 (0x01) Read Coils\n\n- 02 (0x02) Read Discrete Inputs\n\n- 03 (0x03) Read Holding Registers\n\n- 04 (0x04) Read Input Registers\n\n- 05 (0x05) Write Single Coil\n\n- 06 (0x06) Write Single Register\n\n- 08 (0x08) Diagnostics (Serial Line only)\n\n- 11 (0x0B) Get Comm Event Counter (Serial Line only)\n\n- 15 (0x0F) Write Multiple Coils\n\n- 16 (0x10) Write Multiple Registers\n\n- 17 (0x11) Report Server ID (Serial Line only)\n\n- 22 (0x16) Mask Write Register\n\n- 23 (0x17) Read\/Write Multiple Registers\n\n- 43 \/ 14 (0x2B \/ 0x0E) Read Device Identification\n\n### 2.3. Display formats\n\nEach cell can be individual formatted.\n\n- Signed 16-bit register\n\n- Unsigned 16-bit register\n\n- Hex\n\n- Binary\n\n- 32-bit signed integer with any word\/byte order\n\n- 32-bit unsigned integer with any word\/byte order\n\n- 64-bit signed integer with any word\/byte order\n\n- 64-bit unsigned integer with any word\/byte order\n\n- 32-bit float with any word\/byte order\n\n- 64-bit double float with any word\/byte order\n\n### 2.4. Miscellaneous features\n\n- OLE\/Automation for interfacing with Excel VBA, Python etc.\n\n- Monitoring of data traffic\n\n- Print and print preview\n\n- Font selection\n\n- Conditional colors\n\n- Scaling\n\n- Real time charting\n\n- Save\/Open workspace\n\n## 3. Overview\n\nModbus Slave uses a multiple document interface. That means several windows can be opened. Each one with different data contents for simulation of different slave devices at the same time.\n\n![Modbus Slave Master simulator](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172048812.png)\n\nThis picture shows two open windows. One simulating 10 Holding registers from address 0 (40001) slave id 1 and another simulating 10 Holding registers from address 0 (40001) slave id 2.\n\n### 3.1. Help from anywhere\n\n**Press F1**&nbsp;and get context sensitive help on a topic associated with the current selected item.\n\n**SHIFT + F1**&nbsp;invokes a special \"help mode\" in which the cursor turns into a help cursor (arrow + question mark). The user can then select a visible object in the user interface, such as a menu item, toolbar button, or window. This opens help on a topic that describes the selected item.\n\n### 3.2. Name cells\n\nHere you can type any text for designation of the value cells. You can also copy\/paste text from Excel cells.\n\n### 3.3. Value cells\n\nShow the data values of the Modbus registers. If you double click a value cell a dialog box lets you enter a new value to the value cell. Typing a number in a value cell shows the input dialog as well.\n\n![Write single register](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172050377.png)\n\n### 3.4. Change font\n\nTo change the font you have 2 options\n\n- Select the cells to be changed and then right click.\n\n- Select the cells to be changed and then Menu\u2192Display\u2192Font.\n\n![Font selection](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172054990.png)\n\n### 3.5. Conditional colors\n\nConditional colors help you visually show values in specific ranges.3 color options\n\n- Default color: This color is used if none of the conditional colors evaluates to true.\n\n- Rule 1: This color selection is used if the expression evaluates to true. Rule 1 has precedence over rule 2.\n\n- Rule 2: This color selection is used if the expression evaluates to true.\n\n7 Comparison operators\n\n- not used\n\n- equal to\n\n- greater than\n\n- less than\n\n- greater than or equal to\n\n- less than or equal to\n\n- and\n\nThe \"and\" operator cannot be used when the data type is of float or 32 bit long type. The condition value is entered as a hex number if \"and\" is selected. It evaluates to true if any of the bits in both the cell and the condition value is 1.\n\n#### 3.5.1. Color example\n\nGreen color if the cell value is between 398 and 402\n\n![Cell colors](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172056569.png)\n\n### 3.6. Scaling\n\nScaling helps you scale raw values to human readable values. Scaling works only for signed and unsigned 16\/32 bit integers.\n\n![Scaling](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172058416.png)\n\n(X1,Y1) and (X2,Y2)\n\nA line passing through the two points (X1,Y1) and (X2,Y2)\n\nSlope=m=Y2\u2212Y1X2\u2212X1\ufffd\ufffd\ufffd\ufffd\ufffd=\ufffd=\ufffd2-\ufffd1\ufffd2-\ufffd1Line equation\n\nY=m\u22c5(X\u2212X1)+Y1\ufffd=\ufffd\u22c5(\ufffd-\ufffd1)+\ufffd1Precision\n\nNumber of digits after the decimal point.Enable\n\nMust be enabled to scale the value from the Modbus server\/slave. Scaling is automatically disabled if other than a 16\/32 bit integer display format is selected.\n\n### 3.7. Real time charting\n\nThe chart can plot 12 series in real time with up to 100000 points in each series.\n\n### 3.8. Open a new window\n\nTo open another window you have 3 options:\n\n- Press CTRL+N\n\n- Select new in the file menu\n\n- Press&nbsp;![New window](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172100425.png)&nbsp;on the tool bar\n\n## 4. Connection dialog\n\nTo open the connection dialog you have 2 options:\n\n- Press F3\n\n- Select connect from the connection menu\n\n![Connection setup](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172103456.png)\n\n### 4.1. Connection\n\nThere are 5 different connection types:\n\n- **Serial:**\nModbus over serial line. RS232 or RS485. A USB serial converter can be used.\n\n- **Modbus TCP\/IP:**\nSelect TCP\/IP if you want to communicate with a MODBUS TCP\/IP network. In this case, slave ID is the same as the Unit ID used in MODBUS TCP\/IP.\nThe port number is default 502.\n\n- **Modbus UDP\/IP:**\nSelect UDP\/IP if you want to communicate with a MODBUS UDP\/IP network. This is the same as Modbus TCP\/IP but the connection less UDP protocol is used instead.\n\n- **Modbus RTU Over TCP\/IP:**\nThis is a RTU message sent over a TCP\/IP network instead of serial lines.\n\n- **Modbus RTU Over UDP\/IP:**\nThis is a RTU message sent over a UDP\/IP network instead of serial lines.\n\nConnection type 3-5 is not standard Modbus as specified by&nbsp;[www.modbus.org](https:\/\/modbus.org\/)&nbsp;but they are added for convenience.\n\nDepending on your selection some other settings will be grayed.\n\n### 4.2. Serial Settings\n\nUse these parameters to set serial port settings. They are only available if the connection type is \"**Serial Port**\".Mode\n\nUse this option to select&nbsp;**RTU**&nbsp;or&nbsp;**ASCII**&nbsp;mode. Default RTU.DSR\n\nSpecifies whether the DSR (data-set-ready) signal is monitored for output flow control. If this member is TRUE and DSR is turned off, output is suspended until DSR is sent again.CTS\n\nSpecifies whether the CTS (clear-to-send) signal is monitored for output flow control. If this checkbox is enabled and CTS is turned off, output is suspended until CTS is sent again.RTS Toggle\n\nSpecifies that the RTS line will be high if bytes are available for transmission. After all buffered bytes have been sent, the RTS line will be low.\nYou can use this to switch direction if you have a 232\/485 converter without automatic direction switch.\n\nThe use of RTS controlled RS232\/RS485 converters should be avoided if possible. It is difficult to determine the exact time when to switch off the transmitter with non real-time operating systems like Windows and Linux. If it is switched off too early characters might still sit in the FIFO or the transmit register of the UART and these characters will be lost. Hence the slave will not recognize the message. On the other hand if it is switched off too late then the slave\u2019s message is corrupted and the master will not recognize the message.\n\n### 4.3. TCP\/IP Server\n\nTCP\/IP server settings are only available when using an Ethernet connection.IP Address\n\nSpecify which IP address to listen to. This is useful if you have several network connections on your PC. Each instance of Modbus Slave can listen to a specific network. Default is local host 127.0.0.1Any Address\n\nCheck this on if you want Modbus Slave to listen on all networks.IgnoreUnit ID\n\nMany PLC devices will ignore this field, and most clients default value to zero. However gateways or specialized programs can use the unit number to indicate what type of processing is desired.Port\n\nServer port number. Default 502\n\n## 5. Slave definition\n\nUse this command to define the data array to be defined for the active window.\n\nTo open the Slave Definition dialog you have 3 options:\n\n- Press F8\n\n- Select \"Slave Definition\" from the Setup menu\n\n- Press&nbsp;![Definition button](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172105750.png)&nbsp;on the tool bar\n\n![Slave definition](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172113503.png)\n\n### 5.1. Slave ID\n\nRange 1 to 255. (MODBUS protocol specifications say 247). The value 0 is also accepted to communicate directly to a MODBUS\/TCP or MODBUS\/UDP&nbsp;device.\n\n### 5.2. Function code\n\nYou can select 1 of 4 function codes.\n\n- 01: Read coils (0x). Accepts write functions 05 and 15\n\n- 02: Read discrete inputs (1x)\n\n- 03: Read holding registers (4x). Accepts write functions 06, 16, 22 and 23\n\n- 04: Read input registers (3x)\n\n### 5.3. Address\n\nAddresses in the Modbus protocol are confusing! Some protocol specifications use the protocol\/message address and others use device addressing.\n\n#### 5.3.1. Protocol\/message address\n\nSome protocol specifications use the protocol\/message address counting from 0 to 65535 along with a function code. This is also what the new Modbus specifications use. This is the address inside the message sent on the wire.\n\nModbus Slave use protocol\/message address counting from 0 to 65535.\n\n#### 5.3.2. Device address\n\nSome protocol specifications use device address\/registers. Registers counts from 1. The first digit describes the function to be used. That means the device address 40101 is identified by address 100. The \"4\" means Holding registers and 4x registers counts from 1. And even more confusing: 4x means function code 03 and 3x means function code 04!\n\n#### 5.3.3. 5 digits vs. 6 digits addressing\n\nThe address format 4x counts from 40001 to 49999. The next address is&nbsp;**not**&nbsp;50000. In the old days 9999 addresses was enough. There are cases where 9999 is not enough. Then a zero is added. 40101 becomes 400101 and so on. This is called 6 digits addressing or extended addressing.\n\nThis is not a problem with Modbus Slave. 410001 become 10000. The \"4\" is thrown away and the rest 10001 is decremented by 1 as we count from 0 instead of 1.\n\n#### 5.3.4. Address examples\n\nThese examples show how to set up Modbus Slave if a specification uses device addresses.\n\nDefine Holding Registers\n\nYou want to define 20 registers from device address 40011 from slave ID 2. From the \"4\" we know this is function 03 \"Read Holding Registers\".\n\n- Slave ID = 2\n\n- Function = \"03 Read Holding Registers (4x)\"\n\n- Address = 10 (11 minus 1)\n\n- Quantity = 20\n\nDefine Discrete Inputs\n\nYou want to Define 1000 coils from address 110201 from slave ID 5. From the \"1\" we know this is function 02 \"Read Discrete Inputs\"\n\n- Slave ID = 5\n\n- Function = \"02 Read Discrete Inputs (1x)\"\n\n- Address = 10200 (10201 - 1)\n\n- Quantity = 1000\n\n### 5.4. Hide name columns\n\nHide all name columns. This is convenient to make more space if they are not used.\n\n### 5.5. Address in cell\n\nIf enabled, the address is also shown in the value cell like: 2000 = 00000\n\n![Address in cell](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172116677.png)\n\n### 5.6. PLC Addresses (Base 1)\n\nThis option will show the addresses as device addresses.\n\n![PLC address](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172119277.png)\n\n### 5.7. Rows\n\nSpecify the number of rows in the grid you prefer.\n\n## 6. Real time Charting\n\nUse this command to plot up to 12 data series in a chart in real time.\nThe real time chart is high speed and capable of drawing a new line as fast as new data is received.\n\nAll chart settings are saved in the workspace file.&nbsp;[Save\/Open Workspace](https:\/\/www.modbustools.com\/mbslave-user-manual.html#_saveopen_workspace)\n\nTo open the Real time charting dialog you have 2 options:\n\n- Press Alt + R\n\n- Select \"Real time Charting\" from the Display menu\n\n![Real time charting](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20250901222033246.png)\n\nThe X-Axis displays the number of seconds since the chart was started.\n\nWhen the points reach the end of the chart there are 3 options:\n\n- **Stop at end:**&nbsp;The charting stops.\n\n- **Restart at end:**&nbsp;The charting starts all over again.\n\n- **Continue:**&nbsp;It continues until it reaches the max number of points or stop is pressed.\n\n### 6.1. Settings\n\nBy default all 12 series are linked to the left Y-Axis. Check the \"Right Y-Axis\" check box if you want to link a series to the right Y-Axis.Specify\n\n- Colors\n\n- Right Y-Axis\n\n- Title. If title is empty it is initialized with the name from the reading window\n\n- Offset\n\nShow\n\n- File name\n\n- Address\n\nThe offset is useful to align data points on the same Y-Axis. For example, data points that are either 0 or 1 can be offset so they are not drawn on top of each other.\n\n![Series settings](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20250901222038846.png)\n\n### 6.2. Zoom function\n\nZooming in on the chart can be useful if you want to see more details. The zoom is controlled with the left mouse button. To zoom a specific part of the chart, simply left-click on the chart (this will be the upper-left corner of the zoomed rectangle) and drag to the bottom-right. A rectangle will appear. As soon as you release the mouse button, the axes will automatically adjust themselves to the region you have selected.\n\nIf you left-click on the chart (like for starting a zoom) but if you move to the top-left corner instead, all the modifications done with the zoom and pan features will be canceled (the chart will be in the state it was before the manipulations with the pan and zoom).\n\n### 6.3. Pan function\n\nTo pan the control, right-click somewhere on the control and move the mouse. The point under the mouse will follow the movement of the mouse.\n\n### 6.4. Link data to the chart series\n\nThe chart doesn\u2019t know what data to use unless you link a Modbus data cell to one of the 12 series. To do this, select a value cell and choose \"Link to chart\" from Menu\u2192Display.\n\n![Link to chart](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20250901222043155.png)\n\n### 6.5. Export series\n\nSave series data to disk or copy to clipboard. Paste the data direct in Excel for further processing.\nThe file is given a .csv extension despite the use of a non-comma field separator.\n\n**Delimiters:**&nbsp;Select the character that separates values in your text file. Use tab delimiter when copy\/paste to Excel.Furthermore some additional information is given.\n\n- Number of points\n\n- Max point value\n\n- Min point value\n\n- Average point value\n\n![save\/copy series](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20250901222046493.png)\n\n## 7. Display formats\n\nMark the cells to be formatted. Select one of the 28 display formats from the display menu.\n\n### 7.1. Native Modbus registers\n\nThe 16-bit Modbus registers can be displayed in 4 different modes.\n\n- Signed\n\n- Unsigned\n\n- Hex\n\n- ASCII - Hex\n\n- Binary\n\n### 7.2. 32-bit signed integer\n\nThis combines 2 16-bit Modbus registers. It can be displayed in 4 different word\/byte orders.\n\n- Signed integer Big-endian\n\n- Signed integer Little-endian\n\n- Signed integer Big-endian byte swap\n\n- Signed integer Little-endian byte swapExampleByte Order:&nbsp;**AB CD (Big-endian)**\nThe decimal number 123456789 or in hexadecimal&nbsp;**07 5B CD 15**\nOrder as they come over the wire in a Modbus message:&nbsp;**07 5B CD 15**\n\n### 7.3. 32-bit unsigned integer\n\nThis combines 2 16-bit Modbus registers. It can be displayed in 4 different word\/byte orders.\n\n- Unsigned integer Big-endian\n\n- Unsigned integer Little-endian\n\n- Unsigned integer Big-endian byte swap\n\n- Unsigned integer Little-endian byte swapExampleByte Order:&nbsp;**AB CD (Big-endian)**\nThe decimal number 123456789 or in hexadecimal&nbsp;**07 5B CD 15**\nOrder as they come over the wire in a Modbus message:&nbsp;**07 5B CD 15**\n\n### 7.4. 64-bit signed integer\n\nThis combines 4 16-bit Modbus registers. It can be displayed in 4 different word\/byte orders.\n\n- Signed integer Big-endian\n\n- Signed integer Little-endian\n\n- Signed integer Big-endian byte swap\n\n- Signed integer Little-endian byte swapExampleByte Order:&nbsp;**AB CD EF GH (Big-endian)**\nThe decimal number -1,234,567,890,123,456,789 or in hexadecimal&nbsp;**EE DD EF 0B 82 16 7E EB**\nOrder as they come over the wire in a Modbus message:&nbsp;**EE DD EF 0B 82 16 7E EB**\n\n### 7.5. 64-bit unsigned integer\n\nThis combines 4 16-bit Modbus registers. It can be displayed in 4 different word\/byte orders.\n\n- Unsigned integer Big-endian\n\n- Unsigned integer Little-endian\n\n- Unsigned integer Big-endian byte swap\n\n- Unsigned integer Little-endian byte swapExampleByte Order:&nbsp;**AB CD EF GH (Big-endian)**\nThe decimal number 1,234,567,890,123,456,789 or in hexadecimal&nbsp;**11 22 10 F4 7D E9 81 15**\nOrder as they come over the wire in a Modbus message:&nbsp;**11 22 10 F4 7D E9 81 15**\n\n### 7.6. 32-bit floating\n\nThis combines 2 16-bit Modbus registers. It can be displayed in 4 different word\/byte orders.\n\n- Float Big-endian\n\n- Float Little-endian\n\n- Float Big-endian byte swap\n\n- Float Little-endian byte swapExampleByte Order:&nbsp;**AB CD (Big-endian)**\nThe floating point number 123456.00 or in hexadecimal&nbsp;**47 F1 20 00**\nOrder as they come over the wire in a Modbus message:&nbsp;**47 F1 20 00**\n\n### 7.7. 64-bit double\n\nThis combines 4 16-bit Modbus registers. It can be displayed in 4 different word\/byte orders.\n\n- Double Big-endian\n\n- Double Little-endian\n\n- Double Big-endian byte swap\n\n- Double Little-endian byte swapExampleByte Order:&nbsp;**AB CD EF GH (Big-endian)**\nThe floating point number 123456789.00 or in hexadecimal&nbsp;**41 9D 6F 34 54 00 00 00**\nOrder as they come over the wire in a Modbus message:&nbsp;**41 9D 6F 34 54 00 00 00**\n\n## 8. Save\/Open Workspace\n\nIf you open many related Modbus windows it is convenient to save a snapshot of the current layout of all open and arranged Modbus Windows in one workspace.\n\nA workspace (*msw) is a file that contains display information and file names of all open windows. Not the actual contents. To do this, go to File\u2192Save Workspace.\n\nThe Connection and Chart settings are stored in the Workspace file.\n\nWhen you open a workspace file, Modbus Slave opens all Modbus Windows and displays them in the layout that you saved.\n\n## 9. Communication traffic\n\nSelect the menu Display\u2192Communication to show the traffic on the serial line or Ethernet cable. Use the stop button to temporary stop the update for inspection.\n\nUse the copy button to copy the selected line to the clipboard.\n\nThis window shows only data sent and received by Modbus Slave. You can\u2019t use it as a data sniffer.\n\nLeave this window open while doing other commands.\n\n## 10. OLE\/Automation\n\nAutomation (formerly known as OLE Automation) makes it possible for one application to manipulate objects implemented in another application.\n\nAn Automation client is an application that can manipulate exposed objects belonging to another application. This is also called an Automation controller.\n\nAn Automation server is an application that exposes programmable objects to other applications.&nbsp;**Modbus Slave**&nbsp;is an automation server.\n\nThat means you can use any program that supports VBA (Visual Basic for Applications) such as Visual Basic, Excel etc. to interpret and show the modbus data according to your specific requirements.\n\n### 10.1. Excel example\n\nYou should display the Developer tab or run in developer mode when you want to write macros.\n\n#### 10.1.1. Excel 2007\n\n![Excel developer tab](https:\/\/image.modbus.cn\/wp-content\/uploads\/2023\/10\/20231013172127662.png)\n\n- Click the Microsoft office button and then click Excel options.\n\n- Click popular and then select the show Developers tab in the ribbon check box.\nNote the ribbon is part of the Microsoft fluent user interface.\n\n#### 10.1.2. Excel 2010, 2016\n\n- Click on the file tab.\n\n- Click options. Excel Options window will open.\n\n- On the left pane click Customize Ribbon.\n\n- On the right pane, under Main Tabs, check the Developer check box.\n\n- Click OK. The Developer tab should now show in the ribbon (right most tab).\n\n#### 10.1.3. Excel sample code\n\nThis example opens a window simulating Holding registers.\nModbus Slave is hidden but you can show it by uncomment the \"ShowWindow\" line. This will show one of the windows.\n\nAn example is also included with the Modbus Slave installation.\nStart \u2192 All Programs \u2192 Modbus Slave \u2192 Excel Example\n\nExcel VBA Example\n\n```\nPublic doc As Object\nPublic app As Object\nDim status As Integer\nDim n As Integer\n\nPrivate Sub StartSlave_Click()\n   ' Create an application object. You can only create 1 application object\n   Set app = CreateObject(&quot;Mbslave.Application&quot;)\n\n   ' Create a new Modbus Slave document (Data Window)\n   ' This is the same as open a new data window in Modbus Slave\n   ' You can create up to 50 Modbus Slave documents (Data Window)\n   Set doc = CreateObject(&quot;Mbslave.Document&quot;)\n\n   ' Show Modbus Slave\n   ' res = doc.ShowWindow()\n\n   ' Create doc2 if needed.\n   ' Set doc2 = CreateObject(&quot;Mbslave.Document&quot;)\n\n   ' Set one of 5 connection types.\n   app.Connection = 1 ' Modbus TCP\/IP\n\n   ' TCP\/IP settings.\n   ' No need to set IP address. We listen to any address. (Default).\n   app.ServerPort = 502\n   app.IPVersion = 4\n\n   ' Open the connection.\n   res = app.OpenConnection()\n   Range(&quot;D5&quot;).Value = res\n\n   res = doc.SetupHoldingRegisters(1, 100, 8)\n   doc.SRegisters(0) = 1     ' Modbus address 100\n   doc.SRegisters(1) = -10   ' Note that the Index used counts from 0\n   doc.URegisters(2) = 50000 ' no matter the Modbus address used.\n   doc.URegisters(3) = 60000\n   doc.Longs(4) = 10000      ' A long takes 2 registers\n   doc.Floats(6) = 123.45    ' A float takes 2 registers\n   ' Now a master can read 8 Holding registers with a mix of 3 data types\n\nEnd Sub\n```\n\n### 10.2. Python example\n\nThis Python example opens a window and set all possible data formats.\n\nPython Example\n\n```\nimport win32com.client as win32\n\nSIGNED = 0\nUNSIGNED = 1\nHEX = 2\nBINARY = 3\nFLOAT_LE_BS = 4\nFLOAT_BE = 5\nDOUBLE_LE_BS = 6\nDOUBLE_BE = 7\nS32_LE_BS = 8\nS32_BE = 9\nFLOAT_LE = 10\nFLOAT_BE_BS = 11\nDOUBLE_LE = 12\nDOUBLE_BE_BS = 13\nS32_LE = 14\nS32_BE_BS = 15\n\nU32_BE = 17\nU32_LE_BS = 18\nU32_BE_BS = 19\nU32_LE = 20\n\nS64_BE = 21\nS64_LE_BS = 22\nS64_BE_BS = 23\nS64_LE = 24\n\nU64_BE = 25\nU64_LE_BS = 26\nU64_BE_BS = 27\nU64_LE = 28\n\n#Endianness\nBE = 0\nLE = 3\nBE_BS = 2\nLE_BS = 1\n\nApp = win32.Dispatch('Mbslave.Application')\n\nApp.Connection = 1\nApp.IPAddress = &quot;127.0.0.1&quot;\n\nApp.ServerPort = 502\nApp.OpenConnection\n\n#Create a Modbus display window called Win1\nWin1 = win32.Dispatch(&quot;Mbslave.Document&quot;)\n\n# Setup 100 holding registers with slave ID 1, address 0 (40001)\nWin1.SetupHoldingRegisters(1, 0, 100)\n# Show the Modbus window\nWin1.ShowWindow()\n# Show 20 rows\nWin1.Rows(1)\n\n# Disable refresh for speed\nWin1.EnableRefresh = False\n\n# Set all different formats\n# This sets how the value is displayed\n# Use ByteOrder to set the actual endianness\nWin1.SetFormat(0, SIGNED)\nWin1.SetFormat(1, UNSIGNED)\nWin1.SetFormat(2, HEX)\nWin1.SetFormat(3, BINARY)\n\nWin1.SetFormat(4, S32_BE)\nWin1.SetFormat(6, S32_LE)\nWin1.SetFormat(8, S32_BE_BS)\nWin1.SetFormat(10, S32_LE_BS)\n\nWin1.SetFormat(12, U32_BE)\nWin1.SetFormat(14, U32_LE)\nWin1.SetFormat(16, U32_BE_BS)\nWin1.SetFormat(18, U32_LE_BS)\n\nWin1.SetFormat(20, S64_BE)\nWin1.SetFormat(24, S64_LE)\nWin1.SetFormat(28, S64_BE_BS)\nWin1.SetFormat(32, S64_LE_BS)\n\nWin1.SetFormat(40, U64_BE)\nWin1.SetFormat(44, U64_LE)\nWin1.SetFormat(48, U64_BE_BS)\nWin1.SetFormat(52, U64_LE_BS)\n\nWin1.SetFormat(60, FLOAT_BE)\nWin1.SetFormat(62, FLOAT_LE)\nWin1.SetFormat(64, FLOAT_BE_BS)\nWin1.SetFormat(66, FLOAT_LE_BS)\n\nWin1.SetFormat(80, DOUBLE_BE)\nWin1.SetFormat(84, DOUBLE_LE)\nWin1.SetFormat(88, DOUBLE_BE_BS)\nWin1.SetFormat(92, DOUBLE_LE_BS)\n\n# Set all Names to used format\nWin1.SetName(0, &quot;SIGNED&quot;)\nWin1.SetName(1, &quot;UNSIGNED&quot;)\nWin1.SetName(2, &quot;HEX&quot;)\nWin1.SetName(3, &quot;BINARY&quot;)\n\nWin1.SetName(4, &quot;S32_BE&quot;)\nWin1.SetName(6, &quot;S32_LE&quot;)\nWin1.SetName(8, &quot;S32_BE_BS&quot;)\nWin1.SetName(10, &quot;S32_LE_BS&quot;)\n\nWin1.SetName(12, &quot;U32_BE&quot;)\nWin1.SetName(14, &quot;U32_LE&quot;)\nWin1.SetName(16, &quot;U32_BE_BS&quot;)\nWin1.SetName(18, &quot;U32_LE_BS&quot;)\n\nWin1.SetName(20, &quot;S64_BE&quot;)\nWin1.SetName(24, &quot;S64_LE&quot;)\nWin1.SetName(28, &quot;S64_BE_BS&quot;)\nWin1.SetName(32, &quot;S64_LE_BS&quot;)\n\nWin1.SetName(40, &quot;U64_BE&quot;)\nWin1.SetName(44, &quot;U64_LE&quot;)\nWin1.SetName(48, &quot;U64_BE_BS&quot;)\nWin1.SetName(52, &quot;U64_LE_BS&quot;)\n\nWin1.SetName(60, &quot;FLOAT_BE&quot;)\nWin1.SetName(62, &quot;FLOAT_LE&quot;)\nWin1.SetName(64, &quot;FLOAT_BE_BS&quot;)\nWin1.SetName(66, &quot;FLOAT_LE_BS&quot;)\n\nWin1.SetName(80, &quot;DOUBLE_BE&quot;)\nWin1.SetName(84, &quot;DOUBLE_LE&quot;)\nWin1.SetName(88, &quot;DOUBLE_BE_BS&quot;)\nWin1.SetName(92, &quot;DOUBLE_LE_BS&quot;)\n\n# Set different values\nWin1.SRegisters(0, -100)\nWin1.SRegisters(1, 100)\nWin1.URegisters(2, 43690)\nWin1.URegisters(3, 65535)\n\nWin1.ByteOrder = BE\nWin1.Ints_32(4, -123456)\nWin1.ByteOrder = LE\nWin1.Ints_32(6, -123456)\nWin1.ByteOrder = BE_BS\nWin1.Ints_32(8, -123456)\nWin1.ByteOrder = LE_BS\nWin1.Ints_32(10, -123456)\n\nWin1.ByteOrder = BE\nWin1.UInts_32(12, 123456)\nWin1.ByteOrder = LE\nWin1.UInts_32(14, 123456)\nWin1.ByteOrder = BE_BS\nWin1.UInts_32(16, 123456)\nWin1.ByteOrder = LE_BS\nWin1.UInts_32(18, 123456)\n\nWin1.ByteOrder = BE\nWin1.Ints_64(20, -123456)\nWin1.ByteOrder = LE\nWin1.Ints_64(24, -123456)\nWin1.ByteOrder = BE_BS\nWin1.Ints_64(28, -123456)\nWin1.ByteOrder = LE_BS\nWin1.Ints_64(32, -123456)\n\nWin1.ByteOrder = BE\nWin1.UInts_64(40, 123456)\nWin1.ByteOrder = LE\nWin1.UInts_64(44, 123456)\nWin1.ByteOrder = BE_BS\nWin1.UInts_64(48, 123456)\nWin1.ByteOrder = LE_BS\nWin1.UInts_64(52, 123456)\n\nWin1.ByteOrder = BE\nWin1.Floats (60, 123.456)\nWin1.ByteOrder = LE\nWin1.Floats (62, 123.456)\nWin1.ByteOrder = BE_BS\nWin1.Floats(64, 123.456)\nWin1.ByteOrder = LE_BS\nWin1.Floats(66, 123.456)\n\nWin1.ByteOrder = BE\nWin1.Doubles(80, 123.456)\nWin1.ByteOrder = LE\nWin1.Doubles(84, 123.456)\nWin1.ByteOrder = BE_BS\nWin1.Doubles(88, 123.456)\nWin1.ByteOrder = LE_BS\nWin1.Doubles(92, 123.456)\n\n# Refresh\nWin1.EnableRefresh = True\n\nWin1.ResizeAllColumns ()\nWin1.ResizeWindow()\n\nprint (Win1.GetName(1))\n\n_ = input(&quot;Press ENTER to quit:&quot;)\n```\n\n### 10.3. Connection Functions\/Properties\n\nThe following properties and functions do the same as you setup in the connection dialog (F3).\n\n#### 10.3.1. Connection\n\nConnection selects the desired connection. A serial port or one of the Ethernet connections can be selected.\n\nProperty&nbsp;**Connection**&nbsp;as IntegerValid values\n\n0 = Serial port\n1 = Modbus TCP\/IP\n2 = Modbus UDP\/IP\n3 = Modbus RTU over TCP\/IP\n4 = Modbus RTU over UDP\/IP\n\nExample\n\n```\nConnection = 0\n```\n\n#### 10.3.2. BaudRate\n\nApplicable only for Connection = 0\n\nProperty&nbsp;**BaudRate**&nbsp;as LongValid values\n\n300\n600\n1200\n2400\n4800\n9600 (Default)\n14400\n19200\n38400\n56000\n57600\n115200\n128000\n153600\n230400\n256000\n460800\n921600\n\nExample\n\n```\nBaudRate = 9600\n```\n\n#### 10.3.3. DataBits\n\nApplicable only for Connection = 0\n\nProperty&nbsp;**DataBits**&nbsp;as IntegerValid values\n\n7\n8 (Default)\n\nExample\n\n```\nDataBits = 8\n```\n\n#### 10.3.4. Parity\n\nApplicable only for Connection = 0\n\nProperty&nbsp;**Parity**&nbsp;as IntegerValid values\n\n0 = None\n1 = Odd\n2 = Even (Default)\n\nExample\n\n```\nParity = 2\n```\n\n#### 10.3.5. StopBits\n\nApplicable only for Connection = 0\n\nProperty&nbsp;**StopBits**&nbsp;as IntegerValid values\n\n1 (Default)\n2\n\nExample\n\n```\nStopBits = 1\n```\n\n#### 10.3.6. SerialPort\n\nApplicable only for Connection = 0\n\nProperty&nbsp;**SerialPort**&nbsp;as IntegerValid values\n\n1\u2026255\n\nDefault value = 1\n\nExample\n\n```\nSerialPort = 1\n```\n\n#### 10.3.7. ServerPort\n\nApplicable only for Connection = 1\u20264\n\nProperty&nbsp;**ServerPort**&nbsp;as LongValid values\n\n0\u202665535\n\nDefault value = 502\n\nExample\n\n```\nServerPort = 502\n```\n\n#### 10.3.8. IPVersion\n\nApplicable only for Connection = 1\u20264\n\nProperty&nbsp;**IPVersion**&nbsp;as IntegerValid values\n\n4 = IP Version 4 (Default)\n6 = IP Version 6\n\nExample\n\n```\nIPVersion = 4\n```\n\n#### 10.3.9. AnyAddress\n\nApplicable only for Connection = 1\u20264\n\nProperty&nbsp;**AnyAddress**&nbsp;as IntegerValid values\n\n0 = Any address = false\n1 = Any address = true (Default)\n\nExample\n\n```\nAnyAddress = 1\n```\n\n#### 10.3.10. IgnoreUnitID\n\nApplicable only for Connection = 1\u20264\n\nProperty&nbsp;**IgnoreUnitID**&nbsp;as IntegerValid values\n\n0 = Ignore unit ID = false\n1 = Ignore unit ID = true (Default)\n\nExample\n\n```\nIgnoreUnitID = 1\n```\n\n#### 10.3.11. OpenConnection\n\nOpens the connection selected with the Connection property.\n\nFunction&nbsp;**OpenConnection**() As Integer\n\n**Return Value:**\n\nZero if success. Nonzero value if failed.\n\nExample how to open a Modbus TCP\/IP connection\n\n```\nPublic app As Object\nDim res As Integer\n' Create an object to Modbus Slave\nSet app = CreateObject(&quot;Mbslave.Application&quot;)\napp.Connection = 1 ' Select Modbus TCP\/IP\napp.IPVersion = 4\n' app.IPAddress = &quot;192.168.1.27&quot;    ' No need to setup if AnyAddress = 1. Modbus Slave listen on all.\napp.ServerPort = 502\nres = OpenConnection()\n```\n\nExample how to setup a serial connection\n\n```\nPublic app As Object\nDim status As Integer\n' Create an object to Modbus Slave\nSet app = CreateObject(&quot;Mbslave.Application&quot;)\n\napp.Connection = 0         ' Mode is serial port\napp.SerialPort = 1         ' Com port 1\napp.BaudRate = 9600        ' 9600 baud\napp.Parity = 0             ' None parity\napp.Mode = 0               ' RTU mode\nstatus = app.OpenConnection()\n```\n\n#### 10.3.12. CloseConnection\n\nFunction&nbsp;**CloseConnection**() As IntegerReturn Value\n\nZero if success. Nonzero value if failed.\n\n#### 10.3.13. ShowCommunicationTraffic\n\nFunction&nbsp;**ShowCommunicationTraffic**()\n\nShows the communication traffic window.\n\n#### 10.3.14. CloseCommunicationTraffic\n\nFunction&nbsp;**CloseCommunicationTraffic**()\n\nCloses the communication traffic window if shown.\n\n### 10.4. Automation setup Functions\n\nThe following functions do the same as you setup in the read\/write definition dialog (F8). Read functions are associated with a Modbus Slave document. (The window with data)\n.Example\n\n```\nRes = doc.SetupDiscreteInputs (1, 100, 5)\nCoils (0) = 1    ' Address 100 = 1\nCoils (1) = 0    ' Note that the index used in Coils starts from 0\nCoils (2) = 1    ' no matter the address used.\nCoils (3) = 0\nCoils (4) = 1\n' Now the Master reads 1, 0, 1, 0, 1 when read 5 discrete inputs starting from address 100\n```\n\n#### 10.4.1. SetupCoils\n\nFunction&nbsp;**SetupCoils**(SlaveID As Integer, Address As Long, Quantity As Integer) As IntegerReturn Value\n\nTrue if success. False if not successParameters\n\n**SlaveID:**&nbsp;The slave address 1 to 255\n**Address:**&nbsp;The data address (Base 0)\n**Quantity:**&nbsp;The number of data. 1 to 10000\n\n#### 10.4.2. SetupDiscreteInputs\n\nFunction&nbsp;**SetupDiscreteInputs**(SlaveID As Integer, Address As Long, Quantity As Integer) As IntegerReturn Value\n\nTrue if success. False if not successParameters\n\n**SlaveID:**&nbsp;The slave address 1 to 255\n**Address:**&nbsp;The data address (Base 0)\n**Quantity:**&nbsp;The number of data. 1 to 10000\n\n#### 10.4.3. SetupHoldingRegisters\n\nFunction&nbsp;**SetupHoldingRegisters**(SlaveID As Integer, Address As Long, Quantity As Integer) As IntegerReturn Value\n\nTrue if success. False if not successParameters\n\n**SlaveID:**&nbsp;The slave address 1 to 255\n**Address:**&nbsp;The data address (Base 0)\n**Quantity:**&nbsp;The number of data. 1 to 10000\n\n#### 10.4.4. SetupInputRegisters\n\nFunction&nbsp;**SetupInputRegisters**(SlaveID As Integer, Address As Long, Quantity As Integer) As IntegerReturn Value\n\nTrue if success. False if not successParameters\n\n**SlaveID:**&nbsp;The slave address 1 to 255\n**Address:**&nbsp;The data address (Base 0)\n**Quantity:**&nbsp;The number of data. 1 to 10000\n\n#### 10.4.5. ShowWindow\n\nFunction&nbsp;**ShowWindow**()\nAs default Modbus document windows are hidden. The ShowWindow function makes Modbus Poll visible and shows the document with data content.\n\n#### 10.4.6. GetName\n\nFunction&nbsp;**GetName**(Index As Integer) As StringDescription\n\nGets the name of a value.\nIndex 0 corresponds to the first Modbus address.\n\n#### 10.4.7. SetName\n\nFunction&nbsp;**SetName**(Index As Integer, Name As String)Description\n\nSets the name of a value.\nIndex 0 corresponds to the first Modbus address.\n\n#### 10.4.8. AutoIncrement\n\nProperty&nbsp;**AutoIncrement**(Index As Integer) As BooleanDescription\n\nSets automatic increment of a value.\nIndex 0 corresponds to the first Modbus address.\nSyntax\n\n**AutoIncrement**(Index) [=newvalue]\n\n#### 10.4.9. FormatAll\n\nFunction&nbsp;**FormatAll**(Format As Integer)\nFormat all value cells with the selected format.Parameters\n\n**Format:**&nbsp;The format of the value cell.\n\n#### 10.4.10. GetFormat\n\nFunction&nbsp;**GetFormat**(Index As Integer) As IntegerDescription\n\nGets the display format of the Modbus value.\n\n**ID****Format**0Signed1Unsigned2Hex3Binary4Float little-endian byte swap5Float big-endian6Double little-endian byte swap7Double big-endian832-bit Signed little-endian byte swap932-bit Signed big-endian10Float little-endian11Float big-endian byte swap12Double little-endian13Double big-endian byte swap1432-bit Signed little-endian1532-bit Signed big-endian byte swap1732-bit Unsigned big-endian1832-bit Unsigned little-endian byte swap1932-bit Unsigned big-endian byte swap2032-bit Unsigned little-endian2164-bit Signed big-endian2264-bit Signed little-endian byte swap2364-bit Signed big-endian byte swap2464-bit Signed little-endian2564-bit Unsigned big-endian2664-bit Unsigned little-endian byte swap2764-bit Unsigned big-endian byte swap2864-bit Unsigned little-endian\n\nThis setting is only for display. You still need to use byteOrder to get the correct endianness when using Get\/Set value functions.\n\n#### 10.4.11. SetFormat\n\nFunction&nbsp;**SetFormat**(Index As Integer, Format As Integer)Description\n\nSets the display format of the Modbus values. See Format values above.\n\n#### 10.4.12. ResizeWindow\n\nFunction&nbsp;**ResizeWindow**()\nResize an opened window to fit the grid.\n\n#### 10.4.13. Rows\n\nFunction&nbsp;**Rows**(NumberRows)\nSpecify the number of rows in the grid.Parameters\n\n**NumberRows:**&nbsp;Number of rows in the grid.\n\n**ID****Description**010 Rows (Default)120 Rows250 Rows3Fit to quantity\n\n### 10.5. Automation data properties\n\nThe below properties are used to set or get values in the internal write\/read arrays in Modbus Slave. The Index used is not a Modbus Address. The Index always counts from 0 no matter of the address used. The data properties are associated with a Modbus Slave document. (The window with data)\n\n**Example 1:**\n\n```\n' doc is assumed created first. See Excel example.\ndoc.SRegisters(0) = 1\ndoc.SRegisters(1) = 10\ndoc.SRegisters(2) = 1234\n```\n\n**Example 2 with floating point values:**\n\n```\ndoc.Floats(0) = 1.3\ndoc.Floats(2) = 10.5\ndoc.Floats(4) = 1234.12\n```\n\n#### 10.5.1. Coils\n\nProperty&nbsp;**Coils**(Index As Integer) As IntegerDescription\n\nSets a coil in the write array structure or return a coil from the read array.Syntax\n\n**Coils**(Index) [=newvalue]\n\n#### 10.5.2. SRegisters\n\nProperty&nbsp;**SRegisters**(Index As Integer) As IntegerDescription\n\nSets a register in the write array structure or return a register from the read array.Syntax\n\n**SRegisters**(Index) [=newvalue]\n\n#### 10.5.3. URegisters\n\nProperty&nbsp;**URegisters**(Index As Integer) As LongDescription\n\nSets a register in the write array structure or return a register from the read array.Syntax\n\n**URegisters**(Index) [=newvalue]\n\n#### 10.5.4. Ints_32\n\nProperty&nbsp;**Ints_32**(Index As Integer) As DoubleDescription\n\nSets a 32-bit integer in the write array structure or return an integer from the read array.Syntax\n\n**Ints_32**(Index) [=newvalue]\n\n#### 10.5.5. UInts_32\n\nProperty&nbsp;**UInts_32**(Index As Integer) As DoubleDescription\n\nSets a 32-bit unsigned integer in the write array structure or return an unsigned integer from the read array.Syntax\n\n**UInts_32**(Index) [=newvalue]\n\n#### 10.5.6. Ints_64\n\nProperty&nbsp;**Ints_64**(Index As Integer) As DoubleDescription\n\nSets a 64-bit integer in the write array structure or return an integer from the read array.Syntax\n\n**Ints_64**(Index) [=newvalue]\n\n#### 10.5.7. UInts_64\n\nProperty&nbsp;**UInts_64**(Index As Integer) As DoubleDescription\n\nSets a 64-bit unsigned integer in the write array structure or return an unsigned integer from the read array.Syntax\n\n**UInts_64**(Index) [=newvalue]\n\n#### 10.5.8. Floats\n\nProperty&nbsp;**Floats**(Index As Integer) As SingleDescription\n\nSets a float in the write array structure or returns a float from the read array.Syntax\n\n**Floats**(Index) [=newvalue]\n\n#### 10.5.9. Doubles\n\nProperty&nbsp;**Doubles**(Index As Integer) As DoubleDescription\n\nSets a double in the write array structure or return a double from the read array.Syntax\n\n**Doubles**(Index) [=newvalue]\n\n#### 10.5.10. ByteOrder\n\nProperty&nbsp;**ByteOrder**&nbsp;As IntegerDescription\n\nSets the byte order used by Ints_32, UInts_32, Ints_64, UInts_64, Floats and Doubles properties.\n\n**ID****Endianness**0Big-endian (Default)1Little-endian byte swap2Big-endian byte swap3Little-endian\n\n**Example for Ints_32:**\nByte Order: Big-endian\nThe decimal number 123456789 or in hexadecimal 07 5B CD 15\nOrder as they come over the wire in a Modbus message: 07 5B CD 15Syntax\n\n**ByteOrder**&nbsp;[=newvalue]\n\n---\n*modbus.cn*\n"