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 modbus function.
you must first configure your device before performing read operations. for information on how to configure and connect to your device, see .
to perform a read operation, enter the information about the coils, inputs, registers, or holding registers you want to control in the read registers table. the first row of the table is already filled in with the register you configured on the configure tab.
to set up another register, click insert. for each inserted row, click the address field and enter the address of the coil, input, input register, or holding register you want to read values from.
in the register type column, 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.
in the precision column, click the down arrow to select the precision. choose the data format of the register being read from on the modbus® server.
in the name column, enter a name. a default name is provided, and you can keep it or change it.
once you have entered all of the fields, click resume reads to start reading.
if the read is successful, the read value column fills in with the read value. if you see
'error'
in the read value field, adjust the parameters until the read is successful.to read multiple registers, add rows to the table by clicking insert on the toolstrip. new rows are added to the top of 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 the
paused
status to the left of the resume reads button.after you set up the table, click resume reads.
the reads are performed and the status changes to
live
. you can also see the read values in the live plot.if you want to alter the plot, use the plot tools section. 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 - 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 - 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. click sort and choose name to sort in alphabetic order of name, address for ascending order of address, register type for alphabetical order of register type, or precision for alphabetical order of precision.
import or export read data
you can export the contents of the read registers table to use again later.
to export the register table configuration, click the export button in the toolstrip. in the save dialog box, choose a file name and navigate to the save location, then click save. the table is saved as a mat-file.
to import the contents back into the read registers table, click import in the toolstrip. in the load dialog box, navigate to the saved mat-file, select it, and click open.