Main Content

Read Coils, Inputs, and Registers in the Modbus Explorer

You can read coils, inputs, input registers, and holding registers in the Modbus Explorer. This is the functionality of the Modbusreadfunction.

You must first configure your device before performing read operations. For information on how to configure and connect to your device, seeConfigure a Connection in the Modbus Explorer.

  1. To perform a read operation, enter the information about the coils, inputs, registers, or holding registers you want to control in theRead Registerstable. The first row of the table is already filled in with the register you configured on theConfiguretab.

  2. To set up another register, clickInsert. For each inserted row, click theAddressfield and enter the address of the coil, input, input register, or holding register you want to read values from.

  3. In theRegister Typecolumn, click the down arrow to select the target type to read. You can perform a Modbus read operation on four types of targets: coils, inputs, input registers, and holding registers.

  4. In thePrecisioncolumn, click the down arrow to select the precision. Choose the data format of the register being read from on the Modbus server.

  5. In theNamecolumn, enter a name. A default name is provided, and you can keep it or change it.

  6. Once you have entered all of the fields, clickResume Readsto start reading.

    If the read is successful, theRead Valuecolumn fills in with the read value. If you see'ERROR'in theRead Valuefield, adjust the parameters until the read is successful.

  7. To read multiple registers, add rows to the table by clickingInsert在将来发布。添加的新行the table. You can add as many rows as you need. For each row, fill in all of the fields for that read. While you are editing a row, reading is paused, as indicated by thePAUSEDstatus to the left of theResume Readsbutton.

  8. After you set up the table, clickResume Reads.

    The reads are performed and the status changes toLIVE. You can also see the read values in the live plot.

  9. If you want to alter the plot, use thePlot Toolssection. You can change the axes, show or hide the legend, and select which registers to display in the plot. The plot changes dynamically when you change any of these factors using the plot tools.

Edit the Read Registers Table

You can manipulate the register table by using the buttons in the toolstrip and the check boxes in the table.

  • Insert- Insert a blank row at the top of the table.

  • 删除- Delete selected rows. Use the check boxes in the table to select rows to delete.

  • Move Up- Move up selected rows one position in the table. Use the check boxes in the table to select rows to move.

  • 向下移动- Move down selected rows one position in the table. Use the check boxes in the table to select rows to move.

  • Sort- Sort the register table data by column value. ClickSortand chooseNameto sort in alphabetic order of name,Addressfor ascending order of address,Register Typefor alphabetical order of register type, orPrecisionfor alphabetical order of precision.

Import or Export Read Data

You can export the contents of theRead Registerstable to use again later.

To export the register table configuration, click theExport按钮the toolstrip. In the Save dialog box, choose a file name and navigate to the save location, then clickSave. The table is saved as a MAT-file.

To import the contents back into theRead Registerstable, clickImportin the toolstrip. In the Load dialog box, navigate to the saved MAT-file, select it, and clickOpen.

Related Topics