ModMaster Manual - Registers
Use the → panel (Figure 9, “Add Register panel”) to add definitions of registers. If ModMaster is "running" (i.e. the button is depressed), you will have to click the button before you can add register definitions.
This panel enables you to enter the following details:
Quantity. How many registers to add. The Address will be incremented for each register added. The other fields will have the same values in each register.
Address. The address of the first register. This is a "model address", and may be different from the address used in messages, depending on how the address mapping is configured (see Address mapping).
Name. An optional name for the register. ModMaster displays the name, but does not use it in any other way. It is purely for your benefit, to remind you of what the register is used for.
Unit. An optional unit for the register. ModMaster displays the unit, but does not use it in any other way. It is purely for your benefit, to remind you of what unit is used for the register value.
Type. The type (integer or floating-point) and size (1, 8, 16, 32 or 64 bit) of the value to be stored in the register. You would normally use Integer 16-bit for holding registers and input registers, and Coil/Discrete-input (i.e. 1-bit integer) for coils and discrete inputs.
Radix. The radix to be used to display the register value. The radix "10U" is used for unsigned decimal, and the radix "10" is used for signed decimal. The radix only affects the display of integer values; floating-point values are always displayed in signed decimal.
-
Offset and Scale. These allow you to scale the register value when displaying it in decimal (the scale and offset are not used when displaying in other radixes). The scaling uses the formula:
displayed_value = (register_value + offset) / scale
Value. The initial value to be stored in the register.
Write. When polling, ModMaster will write this register to the slave if this option is selected, otherwise it will read this register from the slave (see Polling).
When you have entered/selected values for the above fields, click the button to add the register definition(s). You may then edit the values and click the button again to add further register definitions. If you click the Reset button, all the values will be reset to their defaults.
Details of all registers are displayed in the register display area of ModMaster's main window (Figure 10, “Register display”).
See the section Defining registers for explanations of the values displayed in each column.
You can select which columns are displayed in the table using the → menu item.
If you right-click on the table (or press the menu key), a popup menu will be displayed, with options for adding, editing and deleting registers.
A field of a register can be edited in the register table by clicking on the field (or moving to it with the keyboard) and then entering/selecting the new value.
Alternatively, a register may edited using the Edit Register panel (Figure 11, “Edit Register panel”), which can be accessed using the → menu item, or from the register table right-click menu.
Use the Address drop-down list to select the register to be edited, change the values as required, and click Apply to save the changes.
The Type of a register may only be changed when ModMaster is stopped (i.e. click the button if necessary).
To delete a register, select it by clicking on its address in the main window (or moving to it using the keyboard), and then select the → menu item.
To delete several registers, select them by clicking on their addresses while holding down the control key, and then select the → menu item.
To delete all registers, use the → menu item.
These menu items are also on the register table right-click menu.
You can delete registers only when ModMaster is stopped (i.e. click the button if necessary).
Register definitions may saved to, and restored from, disk files as part of ModMaster's configuration (see Saving and restoring the configuration ).
Register definitions can also be saved separately by selecting the → menu item. This displays a dialog that enables you to enter or select the name of the file to save the registers to.
To restore the registers from a file, use the → menu item. This displays a dialog that enables you to enter or select the name of the file to restore the registers from. If ModMaster is "running" (i.e. the button is depressed), you will have to click the button again before you can load the registers.
Loading from a file will add new register definitions and replace existing register definitions, but will not delete any register definitions. If you want to totally replace the the set of register definitions you should use → before → .
saves the register definitions in CSV format, and expects the file it reads to be in CSV format. The CSV format is described in the Appendix C. CSV file format appendix.