The application OneWire Tool is a utility intended to be used for configuring the gateway 1-Wire / Modbus RTU. It helps you manage 1-Wire elements connected to the gateway and map them to the Modbus holding registers. The application is also a useful verification tool whereby you can evaluate whether your system works well. OneWire Tool reads and displays the data stored in the Modbus registers and allows to see the states and measured quantities of the connected 1-Wire elements.
This manual describes features of the OneWire Tool application. For a detailed description of the gateway and its Modbus interface, refer the gateway manual.
2 Description of the User Interface
5 Backup of Gateway Configuration
Fig. 2 Communication settings overview
Fig. 3 Communication works properly
Fig. 9 Channel configuration – having unsaved changes
Fig. 11 The tooltip explaining a value
Fig. 12 Adding elements one by one.
Fig. 13 Adding multiple elements at once
Fig. 14 Firmware Loader – main window overview
Fig. 15 Firmware update result box
Tab. 1 Configuration versus volatile registers
Tab. 4 Menu – Communication options
Tab. 7 Overview tab – the meaning of columns (n is a channel number from 0 to 39)
Tab. 8 LED indication during manual reprogramming
Tab. 9 Document revision history
To communicate with the gateway, the application uses the COM port and Modbus RTU protocol. The application always behaves like a MASTER (sends queries) and the gateway like a SLAVE (responds to queries from the application).
The gateway has three communication ports: USB, RS485 and RS232 port. Although the USB port is designated for configuring the gateway, the RS485 and RS232 port can also be used thanks to a single communication interface.
Fig. 1 Common connections
The USB interface is implemented using an integrated circuit from FTDI. Communication via the USB port needs a driver to be installed on your computer that causes the gateway appears as an additional COM port. The operating system usually performs the driver installation automatically when a gateway is first connected. Alternatively, the driver can be downloaded from the manufacturer's website and installed manually (http://www.ftdichip.com/Drivers/VCP.htm).
The operating system assigns a unique COM port during the installation. If more than one gateway is used on the computer, each gateway has different port assigned because the port is assigned to a particular FTDI chip. The COM port can be changed in the Device Manager.
For the RS485 and RS232 port, a USB-to-serial converter is usually needed. If this is the case, the driver and virtual COM port is related to the converter and does not depend on the connected gateway.
Complete communication settings are available through the Communication/Communication Settings menu item (F11).
Fig. 2 Communication settings overview
Only the COM port must be selected, the remaining settings are fixed for the USB port.
To start communicating with a gateway:
1. Connect the gateway through USB port to your computer
2. Select the COM port
3. Tick the checkbox “Use the USB settings”
4. Press “Connect” (F3)
If everything is all right, the message “Connected – answer OK” is shown.
Fig. 3 Communication works properly
Otherwise, if communication does not work properly, a red-highlighted error message is shown. Check the communication settings and physical connection and try again.
Fig. 4 Communication error
Note: If there are many COM ports available on the computer, the following procedure can be used to determine the right one:
1. Connect the gateway to the computer (or disconnect if it has been already connected)
2. Using the F5 key update the list of available ports
3. Check out what COM port appears in the list (or disappears)
To start communicating with a gateway:
1. Connect the gateway through RS485 port or RS232 to your computer
2. Select the COM port
3. Uncheck the checkbox “Use the USB settings” to enable further settings
4. Perform the enabled communication settings
5. Press “Connect” (F3)
The application gets the data automatically when communication is running. First, the configuration registers are read then the application switches to the state where the volatile registers are being looped. The division into the configuration and volatile registers is discussed in the following table. The range corresponds to addresses that are actually read by the application.
Tab. 1 Configuration versus volatile registers
Configuration data – it is supposed only the MASTER can change this data Loaded after the “Connect” command executed, then if necessary. |
||
Area Name |
Range |
Description |
Values |
0…399 |
Rom codes off the assigned elements |
Labels |
10000…13999 |
Descriptions of channels |
Volatile data – this data may change without the participation of MASTER Being updated periodically after configuration reading done. |
||
Values |
0…399 |
Actual data of the assigned elements |
ServiceRegisters |
1000…1069 |
Data and settings concerning the gateway itself |
FoundRomCodes |
1100…1299 |
The result of bulk searches |
In one point of view, the application can be thought as an editor of gateway configuration. This configuration can be stored either in the memory of a gateway or in a file. This chapter introduces the main parts of the user interface.
1. Communication control – basic control of communication with the gateway.
2. Application status – shows the state that the application is currently in.
3. Gateway – an editor of gateway configuration (see chapter 2.3).
4. New device – searching of 1-Wire elements connected to the gateway (see chapter 2.4.1).
5. Channel configuration – an editor of the selected channel (see chapter 2.4.2).
6. Data interpretation – displays the value registers of the selected channel (see chapter 2.4.3).
Fig. 5 Main window overview
Note: The main
window can operate under two modes – online and offline. The online mode occurs
when there is a gateway connected. In the online mode, overall configuration
changes made by the editor are written directly to the gateway, the volatile
data (e.g. V1…V5, New device, etc.) is available and new elements can be found
and assigned. In the offline mode, it works only as a configuration file
editor.
Tab. 2 Menu – File options
Item |
Meaning |
|
|
New |
Creates an empty, unsaved configuration file and opens it in another window. |
|
Open |
Opens an existing configuration file. Then the file can be written to the connected gateway or shown in another window. |
|
Open in Editor |
Opens an existing configuration file directly in another window. |
|
Save |
Saves changes to the open configuration file. |
|
Save As |
Saves the open configuration file as another file. |
|
Close |
Forces the application to close. |
Tab. 3 Menu – Edit options
Item |
Meaning |
|
|
Undo |
Undoes the last change made to the gateway configuration. |
|
Redo |
Undoes the last undo action. |
|
Copy |
Copies the selected channels to the clipboard. |
|
Paste |
Writes the copied channels, if there are any. The writing starts at the first selected channel of the current selection. |
|
Cut |
Copies and deletes the selected channels. |
|
Delete |
Deletes the selected channels. |
Tab. 4 Menu – Communication options
Item |
Meaning |
|
|
Connect |
Starts communicating with the gateway. (Enters the online editor mode) |
|
Disconnect |
Stops communicating with the gateway. (Leaves the online editor mode) |
|
Communication Settings |
Settings of communication between the application and gateway. |
Tab. 5 Menu – Tools options
Item |
Meaning |
|
|
Firmware Loader |
Opens a firmware update utility. (see chapter 4) |
|
Clear Gateway |
Deletes all channels. |
Tab. 6 Menu – Help options
Item |
Meaning |
|
|
View Help |
The manual. |
|
About |
Information about the application. |
|
View Changelog |
Brief information about differences between the current and recent versions. |
This window, together with the Channel window, can be considered an editor of gateway configuration. It is used to display and edit the configuration stored either in the connected gateway or in the open file. This chapter explains the meaning of individual parts.
This view allows to manage both Line1 and
Line2 channels. The configuration and volatile data are merged in a datagrid.
The individual columns are listed and further described in the table below. The
configuration registers can be changed by editing the corresponding field in
the datagrid, as seen in the “Editable” column. The table also shows
which registers each column is related to.
Tab. 7 Overview tab – the meaning of columns (n is a channel number from 0 to 39)
Header |
Description |
Editable |
Holding Registers |
Ch. |
Channel number |
|
n |
Label |
A description up to 40 characters, without diacritics |
|
10000…10099 + 100n |
ROM Code |
The ROM code of the assigned element (Format: hexadecimal) |
|
0…3 + 10n |
Icon |
A pictogram representing the family |
|
|
V1…V5 |
The last data available (Format: decimal number or interpretation string) |
|
4…8 + 10n |
Status |
Channel status (Format: both decimal number and string) |
|
9 + 10n |
Fig. 6 Overview Tab
These views are separate editors for Line1
(channels 0 to 19) and Line2 (channels 20 to 39) that provide an advanced
interface for searching and adding 1-Wire elements. See the chapter 3 for information about adding elements.
This view visualizes the so-called service registers (registers 1000 to 1099), these are the registers concerning the settings and state information of the gateway itself.
Overview (Fig. 7):
1. An editor of the configurable service registers
2. A listing of all service registers
The changes made in the editor must be confirmed with the “Save” button to store the new values. To restore the default values, use “Restore Defaults“ –> “Save“.
Fig. 7 Gateway Settings Tab
This box allows to search and assign 1-Wire elements one by one (see chapter 3.1). The ROM code found can be used in the “Channel configuration” box to configure the selected channel.
Fig. 8 New device
This box serves as a channel editor. There are two states:
1. Display mode: Configuration of the currently selected channel is shown.
2. Editor mode: Appears when there is an unsaved change made to the content of the box. It happens either by editing the content or when a ROM code was found. The display is locked, and channel selection only affects the channel number where the content is to be saved.
Fig. 9 Channel configuration – having unsaved changes
Displays the value registers of the selected channel in three formats: interpretation string, decimal number and hexadecimal number. A description explaining each value is also shown. “None” means that the register is not used.
Fig. 10 Data interpretation
The value descriptions are also available through tooltips in the datagrids.
Fig. 11 The tooltip explaining a value
The assignment of a 1-Wire element to a channel consist in storing its ROM code in the appropriate Modbus registers. This can be done through the application. If we know the ROM code, the element can be simply assigned to the desired channel by filling in the ROM code field. Otherwise, the ROM codes of unassigned 1-Wire elements that are connected to the gateway can be obtained by search commands. The second option is further explained in the following chapters.
Let’s have a temperature sensor we want to assign to the channel 0 (Line 1). The procedure is as follows:
1. Connect the sensor to the Line 1.
2. Select the channel number 0.
3. Click the “Find” button.
4. Add a short label to distinguish the sensor from others.
5. Click “Save” to confirm changes.
6. Now the sensor is assigned to the channel 0 and its data is available through the Modbus interface.
Fig. 12 Adding elements one by one
Let’s have six unassigned sensors we want to add to the Line 2. The procedure is as follows:
1. Connect the sensors to the Line 2.
2. Click the “Find All New” button (use of the command 0x06FF).
3. Select and copy found ROM codes.
4. Select the starting channel and paste the copied ROM codes.
5. Now the sensors are assigned and can be accessed through the Modbus interface.
6. Add short labels to distinguish the sensors.
Note: An assigned element can be identified:
a) by disconnecting it – the row turns red which indicates an error
b) by changing its state – e.g. temperature sensor can be warmed up.
Fig. 13 Adding multiple elements at once
1. Connect the gateway through USB, RS485 or RS232 port to the computer; perform communication settings if necessary and from the menu bar select “Tools/Firmware Loader”.
2. In the window shown, select the firmware file (Fig. 14 – 3).
3. By the “Program Memory” button start downloading of the firmware (Fig. 14 – 5).
4. After downloading finished, the gateway must be reprogrammed. This procedure may depend on the HW or FW version – see Automatic / Manual reprogramming below.
5. Check firmware version (Fig. 14 – 2).
Fig. 14 Firmware Loader – main window overview
Automatic reprogramming
When the firmware is downloaded, the gateway is forced to reboot by the application and the communication is lost. Then, within a few seconds, reprogramming should perform. Wait until the communication is renewed and the result code is returned (Fig. 15).
Fig. 15 Firmware
update result box
Manual reprogramming
Some previous HW or FW versions require a manual reprogramming procedure. This is indicated by a prompt shown after the firmware is downloaded. Follow these steps:
1. Set the switch “PROG“ to ON
2. Power off the gateway
3. Power on again
4. Watch the LED indication on the front panel
Tab. 8 LED indication during manual reprogramming
|
Normal turning on (without reprogramming) |
|
Entering the programming mode |
|
Reprogramming failed (CRC does not match, the new program is incomplete or there is not a new program in the memory) |
|
Programs are the same (probably already programmed) |
|
Reprogramming successful |
The configuration of the gateway can be exported to a file for later recovery or other purposes.
To back up the configuration:
1. Connect the gateway and let the configuration to be loaded.
2. Use the Save command (Ctrl+S or File/Save).
3. Define the file path and name in the dialog shown.
4. Confirm “Save”.
To restore the configuration:
1. Connect the gateway and check if the communication works properly.
2. Use the Open command (Ctrl+O or File/Open).
3. Select a file and confirm “Open” in the dialog shown.
4. A prompt dialog is shown, select “Yes” to confirm the gateway configuration is to be overwritten.
Note: Select “No” if you only wish to open the file, it will be shown in a new window.
Tab. 9 Document revision history
Date |
Version |
Modifications made |
2019-10-08 |
2.0 |
Initial release |