en-us_products:mp_studio:modbus_device_table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en-us_products:mp_studio:modbus_device_table [2026/11/05 12:39] – created - external edit 127.0.0.1en-us_products:mp_studio:modbus_device_table [2026/11/12 20:37] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== MP STUDIO 2 · Modbus Device Table ====== ====== MP STUDIO 2 · Modbus Device Table ======
  
-The device table sets out, in a table for each device, the values that the device reads and writes as a Modbus RTU master on other devices (slaves) such as inverters, temperature controllers and other PLCs (V1.1.0 and later). Consecutive addresses on the same device are read together in one transaction, and writes are sent only when a value changes. You can also have lines sent only at the moment you choose with the ''MBTRIG'' function in the ladder (V1.2.0 and later).+The device table organizes the values that the PLC, as a Modbus RTU master, reads from and writes to other devices (slaves), such as inverters, temperature controllers and other PLCs, into a table for each device (V1.1.0 and later). Consecutive addresses on the same device are read together in one transaction, and writes are sent only when a value changes. You can also have lines sent only at the moment you choose with the ''MBTRIG'' function in the ladder (V1.2.0 and later).
  
 {{ :en-us_products:mp_studio:mb-table.png?1000 |Figure 1. The Modbus Device Table window (the bundled Modbus example moved into a table) }} {{ :en-us_products:mp_studio:mb-table.png?1000 |Figure 1. The Modbus Device Table window (the bundled Modbus example moved into a table) }}
Line 7: Line 7:
 ===== Opening the Device Table ===== ===== Opening the Device Table =====
  
-Select **Setting → Modbus RTU Master** to open it. For a new project, or a project that already has a device table, the **Modbus Device Table** window opens. For a project that has only a list made in the previous MP STUDIO (such as the bundled Modbus example), the [[:en-us_products:mp_studio:menus_settings#modbus_rtu_master|MODBUS MASTER SETTING window]] opens, and you can change the list into a device table with **Move to table** in that window ([[#moving_an_old_list_into_a_table|see below]]).+Select **Settings → Modbus RTU Master** to open it. For a new project, or a project that already has a device table, the **Modbus Device Table** window opens. For a project that has only a list made in the previous MP STUDIO (such as the bundled Modbus example), the [[:en-us_products:mp_studio:menus_settings#modbus_rtu_master|Modbus Master List window]] opens, and you can change the list into a device table with **Move to table** in that window ([[#moving_an_old_list_into_a_table|see below]]).
  
-If a port is set to **Modbus RTU Master** in the **Communication Setting** window, you can also open the device table with the **Open Modbus device table** button in that window.+If a port is set to **Modbus RTU Master** in the **Communication Port** window, you can also open the device table with the **Open Modbus device table** button in that window.
  
 ===== Window Layout ===== ===== Window Layout =====
Line 17: Line 17:
 ^ Item ^ Description ^ ^ Item ^ Description ^
 | Port | Chooses the communication port (Comm Port 1 to Comm Port 3) used for the device table. The number of devices registered on each port is shown with it. | | Port | Chooses the communication port (Comm Port 1 to Comm Port 3) used for the device table. The number of devices registered on each port is shown with it. |
-| Baud | The communication settings of that port. Click it to open the **Communication Setting** window. |+| Baud rate | The communication settings of that port. Click it to open the **Communication Port** window. |
 | Cycle | The estimated time to go once through the polled reads and writes. | | Cycle | The estimated time to go once through the polled reads and writes. |
-| RAM · Flash | The memory the device table uses on the device. "(old method about N KB)" is the size the same content would take with the old list method. |+| RAM · Flash | The memory the device table uses on the PLC. "(old method about N KB)" is the size the same content would take with the old list method. |
  
 When you click OK, the selected port changes to **Modbus RTU Master** and download on that port is turned off. If you choose a port that is not a master yet, this notice is shown at the top of the window. When you click OK, the selected port changes to **Modbus RTU Master** and download on that port is turned off. If you choose a port that is not a master yet, this notice is shown at the top of the window.
Line 30: Line 30:
 | Name | Device N | A name for display. | | Name | Device N | A name for display. |
 | Slave ID | An unused number | 0 to 247. It must not be the same as another device on the same port. 0 is broadcast (write only). | | Slave ID | An unused number | 0 to 247. It must not be the same as another device on the same port. 0 is broadcast (write only). |
-| Reply wait (ms) | 100 | 20 to 60000. How long to wait for a reply. |+| Response timeout (ms) | 100 | 20 to 60000. How long to wait for a reply. |
 | Retries | 2 | 0 to 10. How many times to send again when there is no reply. | | Retries | 2 | 0 to 10. How many times to send again when there is no reply. |
 | Recheck interval (s) | 5 | 1 to 3600. A device that still does not reply after the retries is skipped and checked again at this interval. | | Recheck interval (s) | 5 | 1 to 3600. A device that still does not reply after the retries is skipped and checked again at this interval. |
 | Word order | Low word first (CDAB) | The word and byte order of 2-word (32-bit) values. | | Word order | Low word first (CDAB) | The word and byte order of 2-word (32-bit) values. |
-| Max read at once | Auto | The largest number of values read in one transaction. Leave it empty to have it set to suit the model. |+| Max read size | Auto | The largest number of values read in one transaction. Leave it empty to have it set to suit the model. |
 | Extra wait (ms) | 0 | 0 to 10000. Additional time to wait between transactions. | | Extra wait (ms) | 0 | 0 to 10000. Additional time to wait between transactions. |
 | Status word | Empty (not used) | The word address that receives the device status. Click **Auto** to pick a free D word. | | Status word | Empty (not used) | The word address that receives the device status. Click **Auto** to pick a free D word. |
Line 49: Line 49:
 | Device address | The address on the other device (0 to 65535). | | Device address | The address on the other device (0 to 65535). |
 | Count | 1 means a single value; 2 or more means a range starting at the PLC address. | | Count | 1 means a single value; 2 or more means a range starting at the PLC address. |
-| PLC address | The device memory that exchanges the value (for example ''D10''). | +| PLC address | The PLC memory that exchanges the value (for example ''D10''). | 
-| Type | The data type, set by the PLC address. |+| Data type | The data type, set by the PLC address. |
 | Description | A note. | | Description | A note. |
 | Trigger | Leave it empty to poll. Enter 1 to 255 to send the line only when ''MBTRIG'' in the ladder calls it ([[#triggered_sending_mbtrig|see below]]). | | Trigger | Leave it empty to poll. Enter 1 to 255 to send the line only when ''MBTRIG'' in the ladder calls it ([[#triggered_sending_mbtrig|see below]]). |
Line 57: Line 57:
 Click **+ Add line** to add a line. To enter several lines at once, copy them from Excel in the order "function · device address · count · PLC address · description · (trigger)" and click **Paste lines (Excel)**, or press ''Ctrl+V'' in the table. ''Enter'' moves to the next line, and ''Ctrl+Delete'' deletes the line. Click **+ Add line** to add a line. To enter several lines at once, copy them from Excel in the order "function · device address · count · PLC address · description · (trigger)" and click **Paste lines (Excel)**, or press ''Ctrl+V'' in the table. ''Enter'' moves to the next line, and ''Ctrl+Delete'' deletes the line.
  
-**Frames actually sent** at the bottom of the window lists, in order, the transactions the device actually sends. The very bottom shows the number of transactions compared with the old list method, such as "N values: old method N round trips → table M". Click **OK** to apply the changes. Save the project to keep them in the file.+**Frames actually sent** at the bottom of the window lists, in order, the transactions the PLC actually sends. The very bottom shows the number of transactions compared with the old list method, such as "N values: old method N round trips → table M". Click **OK** to apply the changes. Save the project to keep them in the file.
  
 ===== Reading and Writing ===== ===== Reading and Writing =====
  
-  * **Reading:** consecutive device addresses with the same device and the same function are read together in one transaction. In Figure 1, #1 reads addresses 5 and 6 at once. The PLC addresses do not have to be consecutive. Unused addresses in between are not read to fill the gap, and a read larger than the maximum read at once is split. +  * **Reading:** consecutive device addresses with the same device and the same function are read together in one transaction. In Figure 1, #1 reads addresses 5 and 6 at once. The PLC addresses do not have to be consecutive. Unused addresses in between are not read to fill the gap, and a read larger than the maximum read size is split. 
-  * **Order:** the devices are communicated with one at a time, in turn.+  * **Order:** the PLC communicates with one device at a time, in turn.
   * **Writing:** at start-up, all write values are sent once; after that, a value is sent only when it changes. For a device that has only writes, the values are sent again about every 5 seconds.   * **Writing:** at start-up, all write values are sent once; after that, a value is sent only when it changes. For a device that has only writes, the values are sent again about every 5 seconds.
-  * **When there is no reply:** the request is sent again as many times as the retries, and if there is still no reply, that device is skipped and checked again at every recheck interval.+  * **When there is no reply:** the request is sent again as many times as the Retries setting, and if there is still no reply, that device is skipped and checked again at every recheck interval.
  
 ===== Triggered Sending (MBTRIG) ===== ===== Triggered Sending (MBTRIG) =====
Line 73: Line 73:
   - If you want the ladder to know when sending has finished, enter a bit address (for example ''M100'') in **Done bit** in the trigger table.   - If you want the ladder to know when sending has finished, enter a bit address (for example ''M100'') in **Done bit** in the trigger table.
   - Click **OK**.   - Click **OK**.
-  - Add an ''MBTRIG'' function to the ladder and enter the same number. Choose **MBTRIG: Send Modbus Trigger** in the **Serialport** category of the Functions panel, or type ''MBTRIG 1'' in the Insert Function window (''Ctrl+E'').+  - Add an ''MBTRIG'' function to the ladder and enter the same number. Choose **MBTRIG: Send Modbus Trigger** in the **Serial Port** category of the Functions panel, or type ''MBTRIG 1'' in the Insert Function window (''Ctrl+E'').
  
 {{ :en-us_products:mp_studio:mb-trigger.png?1000 |Figure 2. Trigger 1 and done bit M100 set on the line that writes the run command }} {{ :en-us_products:mp_studio:mb-trigger.png?1000 |Figure 2. Trigger 1 and done bit M100 set on the line that writes the run command }}
Line 105: Line 105:
 | ✕ Not connected | The device is not connected. | | ✕ Not connected | The device is not connected. |
  
-A gray ○ means the status shown cannot be trusted, for example because the program on the device differs from this project or the PLC is not responding, and the reason is shown with it. ― marks a device without a status word.+A gray ○ means the status shown cannot be trusted, for example because the program on the PLC differs from this project or the PLC is not responding, and the reason is shown with it. ― marks a device without a status word.
  
 ===== Simulation ===== ===== Simulation =====
Line 120: Line 120:
  
   * A port used by the device table must be set to **Modbus RTU Master** with **Use this channel for download** turned off. Clicking OK in the device table sets the port this way.   * A port used by the device table must be set to **Modbus RTU Master** with **Use this channel for download** turned off. Clicking OK in the device table sets the port this way.
-  * If the device does not have enough RAM, the program cannot be compiled. Reduce the number of devices or lines, or reduce the memory area sizes. +  * If the PLC does not have enough RAM, the program cannot be compiled. Reduce the number of devices or lines, or reduce the memory area sizes. 
-  * If receiving cells overlap the [[:en-us_products:mp_studio:device_clock|device clock (RTC)]] block, a warning is shown that the received values are overwritten with the time.+  * If the receiving cells overlap the [[:en-us_products:mp_studio:device_clock|PLC clock (RTC)]] block, a warning is shown that the received values are overwritten with the time.
   * The device table is saved in the project file (''.mpx''). A file that uses triggers cannot be opened in V1.1.0.   * The device table is saved in the project file (''.mpx''). A file that uses triggers cannot be opened in V1.1.0.
  
en-us_products/mp_studio/modbus_device_table.1793849997.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki