Patent Description:
In wired communication networks, there is indeed a need to assign addresses to slave devices (or nodes) that are present/added in the network.

This can be performed manually but this solution is long, prone to input errors and requires expertise by the operator manually addressing the slave devices.

To overcome this, some prior art methods, such as the ones described in patent applications <CIT>, <CIT> and <CIT>, use self-addressing mechanisms to assign addresses to slave devices.

Referring to <FIG>, there are shown slave devices <NUM>, <NUM> and <NUM> of a network system according to the prior art.

The slave devices <NUM> are connected via a communication bus comprising two communication lines <NUM> and <NUM>. Each slave device <NUM> also comprises respective switches <NUM> and <NUM> to disconnect the next slave device from each of the communications lines <NUM> and <NUM>.

According to these solutions, the bus switching mechanism is implemented on the communication bus itself.

The solutions of the prior art have the following disadvantages:.

The proposed solutions overcome at least some of the above disadvantages.

<CIT>, <CIT> and <CIT> also disclose slave devices connected to form Daisy chains and methods for assigning unique addresses to each slave device.

It is an object of the invention to alleviate at least some of the disadvantages mentioned above.

A first aspect of the invention concerns a method for addressing a slave device in a network system comprising a master device and a plurality of slave devices, as stated in claim <NUM>.

Such an iterative process allows addressing one unaddressed slave device at a time, which allows efficiently detecting and activating the slave devices. Indeed, at each iteration, there is only one unaddressed slave device in the network. It also makes it easy to detect a faulty slave device.

After activation of the slave device of index k, the method comprises measuring a value of a current consumption on the power line, and, based on a comparison between the measured value and a previous value, determining whether the slave device of index k is correctly activated or not.

Therefore, the detection of a fault is performed efficiently and at a lower cost, as it only requires measuring the current drawn on the power line at each iteration.

The command to change the common default address of the slave device of index k may be sent if the difference between the measured value and the previous value is substantially different from zero.

This ensures to perform the addressing step only if a new slave device is detected, thereby improving the efficiency of the method.

Alternatively, or in complement, the command to change the common default address of the slave device of index k may be sent if the difference between the measured value and the previous value is within a predetermined range, else the master device issues an error message.

This allows to easily and efficiently detect an error in the chain of slave device, and probably in the slave device of index k.

According to some embodiments, for the slave device of index <NUM>, the method may comprise the following operations:.

This allows defining a reference current consumption value on the power line, and therefore increasing the accuracy of the detection of failure.

According to some embodiments, the command to change the common default address of the slave device of index k may be sent if an acknowledgment has been received from the slave device of index k-<NUM> following the instruction sent on the communication line.

This enables to send the command only when the slave device of index k-<NUM> has confirmed that the activation of the slave device of index k is effective, thereby improving the efficiency of the method.

According to some embodiments, the method may further comprise sending a presence query to the unique address of index k, and, upon receiving of an acknowledgment to the presence query from the slave device of index k, repeating the operations of the method for the slave device of index k+<NUM>.

This enables to iterate the method only when the slave device of index k has been correctly registered.

According to some embodiments, the unique address of index k may be a code determined based on index k.

A second aspect of the invention concerns a non-transitory computer readable storage medium, with a computer program stored thereon, the computer program comprising instructions for, when executed by a processor, carrying out the steps of a method according to the first aspect of the invention.

A third aspect of the invention, a master device for addressing a slave device in a network system comprising the master device and a plurality of slave devices, wherein the slave devices have a common default address in an unaddressed state, the master device comprising:.

A fourth aspect of the invention concerns a system comprising a master device according to the third aspect and a plurality of slave devices connected in chain to the master device.

Further objects, aspects, effects and details of the invention are described in the following detailed description of number of exemplary embodiments, with reference to the drawings.

By way of example only, the embodiments of the present disclosure will be described with reference to the accompanying drawing, wherein:.

Referring to <FIG>, there is shown a network system according to some embodiments of the invention.

The network system comprises a master device <NUM> and a plurality of N slave devices <NUM>, <NUM>. k-<NUM>, <NUM>. N, N being an integer greater than or equal to <NUM>, and k being an index varying between <NUM> and N. The slave devices <NUM> are thereby forming a "Daisy" chain.

The master device <NUM> is connected to the chain of slave devices <NUM> via a communication line <NUM> and a power line <NUM>.

The communication line <NUM> may comprise several unidirectional lines as shown on <FIG>, or alternatively only one bidirectional line.

The master device may comprise an activation circuit <NUM> and a sensing circuit <NUM>.

The activation circuit <NUM> is configured for activating/deactivating the power line <NUM>. To this end, the activation circuit <NUM> may be a switch placed between a power source (not represented on <FIG>) and the slave devices <NUM>.

Each slave device <NUM>. k of index k also comprises a circuit <NUM> for connecting/disconnecting a slave device of index k+<NUM> (the next one in the Daisy chain).

<FIG> is a diagram showing the steps of a method according to some embodiments of the invention.

By default, and initially, all the slave devices have a common default address, such as <NUM>*FE for example.

At initial step <NUM>, the master device <NUM> activates the power line <NUM> using the activation circuit <NUM>. For example, the circuit <NUM> may comprise a switch between the power source and the slave devices <NUM>.

The next steps are iterated for an increasing index k, with an initial value of <NUM>. In what follows, N represents the number of slave devices <NUM> in the network system. N is not known in advance by the master device <NUM> and is only determined once the method according to the invention is terminated.

At step <NUM>, the master device <NUM> optionally measures the power consumed on the power line <NUM>. For example, the master device <NUM> measures the current drawn on the power line <NUM>. The current drawn on the power line <NUM> may then be stored in a memory of the master device <NUM>. This measure can be subsequently used to detect a fault in a slave device, according to optional embodiments. For k=<NUM>, the master device <NUM> measures the power on the power line <NUM> while no slave device is activated.

At step <NUM>, the master device <NUM> sends an instruction, via the communication line <NUM>, to the slave device of index k-<NUM> to enable the power line <NUM> of the slave device of index k, via the communication line <NUM>. For k=<NUM>, the master device <NUM> activates its activation circuit <NUM> to activate the slave device <NUM> without the need to send any instruction.

According to some embodiments, the master device <NUM> optionally checks whether a response is received from the slave device of index k-<NUM> (for k=<NUM> the master device <NUM> does not expect any response as no instruction has been sent). To this end, at step <NUM>, the master device <NUM> checks whether a response is received from the slave device <NUM>. k-<NUM>, for example by setting a timer. If a response is received before the timer expires, the method goes to step <NUM>. Else, the method terminates at step <NUM> and it is concluded that there are no more slave devices in the network and N is equal to k-<NUM>.

At step <NUM>, the master device <NUM> optionally waits until the measures performed by the sensing unit are stabilized. Indeed, once the slave device k-<NUM> is connected to the power line <NUM>, it increases the current drawn on the power line <NUM> and the current may be stabilized after a certain amount of time.

At step <NUM>, the master device <NUM> measures the power drawn on the power line <NUM>, such as for example the current drawn on the power line <NUM>.

At step <NUM>, the master device <NUM> compares the measurement performed at step <NUM> with the measurement performed at step <NUM> or alternatively with the measurement performed at step <NUM> for the previous iteration k-<NUM>.

Based on the comparison, it can be detected whether the slave device of index k is correctly activated or not.

For example, the master device <NUM> checks whether the measurements at iterations k and k-<NUM> are substantially the same (their difference is substantially equal to <NUM>). If so, then the method can be terminated at step <NUM>: it is concluded that there is no slave device of index k and that N is equal to k-<NUM>. Else, the method goes to step <NUM>.

At step <NUM>, the master devices <NUM> checks whether the difference between the compared measurements is below a predetermined threshold. The threshold is representative of a current that can be normally drawn by a slave device. If not (if the difference is above the predetermined threshold), then the method terminates at step <NUM>: it is concluded that the slave device <NUM>. k is faulty. An error message/alarm can be issued at step <NUM>.

At step <NUM>, the master device <NUM> sends a command to change the common default address of the slave device of index k to a unique address of index k, via the communication line <NUM>. The command is intended to the common default address, as the slave device of index k is the only slave device that is active and that has the common default address (the other slave devices have been previously addressed with unique addresses), such as <NUM>*FE. The common default address can be put in a recipient field of the command (depending on the communication protocol used on the communication line <NUM>). The unique address can have the same format as the common default address (a digit and two letters for example) and may code the index k of the slave device <NUM>. For example, the address of the first slave device of index <NUM> can be <NUM>*AA or <NUM>*<NUM> for example. The unique address of index k can be included in a payload of the command.

At step <NUM>, the master device optionally checks whether a response to the command is received from slave device <NUM>. If not, the method terminates at step <NUM>: it is concluded that the unique address of index k has not been correctly assigned.

Else, the method is iterated with next index k+<NUM> and goes back to step <NUM>.

At an optional step <NUM>, and before the method is iterated, a query can be sent to the unique address of index k, to check whether the slave device <NUM>. k is properly configured.

If a response is received at step <NUM>, the method is iterated with next index k+<NUM> and goes back to step <NUM>.

If no response is received at step <NUM>, the method terminates at step <NUM>: it is concluded that slave device <NUM>. k is not enrolled.

Therefore, according to the invention, there is, at any time, only one unaddressed slave device connected to the network (with the common default address). This is because, at startup-up, all the slave devices are deactivated by the master device and that the activations are performed iteratively.

The method provides the advantage to easily measure the current consumption of the devices in the Daisy chain, allowing the master device <NUM> to determine whether a slave device <NUM> is behaving within its operating conditions. It can also differentiate between a slave device being absent, operating faulty or normally.

<FIG> shows a structure of a master device <NUM> according to some embodiments of the invention.

The master device <NUM> comprises a memory <NUM> such as a Read Only Memory, ROM, a Random-Access Memory, RAM, a flash memory or any other type of memory, and a processor <NUM> that is configured for performing the steps illustrated on <FIG>. Alternatively, the processor <NUM> may be replaced by an electronic circuit such as a microcontroller that is configured for performing the steps illustrated on <FIG>.

The master device <NUM> may further comprise a communication interface <NUM> for communicating via the communication line <NUM> and a power interface <NUM> between the activation circuit <NUM> and the slave devices <NUM>.

As explained above, the master device <NUM> further comprises a sensing circuit <NUM> configured for measuring the power drawn on the power line <NUM>.

Referring to <FIG>, there is shown a structure of the circuit <NUM> of a slave device <NUM>. This structure is given for illustrative purposes only.

The structure of the circuit <NUM> comprises:.

A signal UC_OK is received from the master device <NUM> to enable/disable the next slave device.

Referring to <FIG>, there is shown a structure of the sensing circuit <NUM> according to some embodiments of the invention. This structure is given for illustrative purposes only.

The circuit of the sensing circuit <NUM> comprises:.

A sensed current signal I_SENSE is sent to the processor <NUM> of the master device <NUM>.

Although the present invention has been described above with reference to specific embodiments, it is not intended to be limited to the specific form set forth herein. Rather, the invention is limited only by the accompanying claims and, other embodiments than the specific above are equally possible within the scope of these appended claims.

Claim 1:
A method for addressing a slave device in a network system comprising a master device (<NUM>) and a plurality of slave devices (<NUM>-<NUM>.k), wherein the slave devices have a common default address in an unaddressed state and wherein the master device and the plurality of slave devices are connected in a Daisy chain via a power line (<NUM>) and a communication line (<NUM>),
wherein each slave device is indexed by an index greater than or equal to <NUM>, the slave device (<NUM>) of index <NUM> being connected to the master device (<NUM>), and the slave device of index k+<NUM> being the next one after the slave device (<NUM>.k) of index k in the Daisy chain,
wherein each slave device (<NUM>.k) of index k comprises a switch (<NUM>) for connecting/disconnecting the slave device of index k+<NUM>,
wherein in a step <NUM>, the master device (<NUM>) activates the power line (<NUM>) using an activation circuit (<NUM>) of said master device,
wherein, to address the slave device (<NUM>.k) of index k, k being equal to or greater than <NUM>, the method comprises the following operations of iteration k performed by the master device (<NUM>), for increasing index k:
- Optional step <NUM>: measuring the current drawn on the power line (<NUM>);
- Step <NUM>: instructing, via the communication line (<NUM>), the slave device (<NUM>.k-<NUM>) of index k-<NUM> to activate the power supply of the slave device (<NUM>.k) of index k via the power line (<NUM>);
- Step <NUM>: measuring a value of a current consumption on the power line (<NUM>);
- Step <NUM>: determining a difference between the value measured in step <NUM> of iteration k and a previous value measured in step <NUM> of iteration k or in step <NUM> of iteration k-<NUM>, and terminating the method if the difference is substantially equal to zero, because it is concluded that there is no slave device of index k;
- Step <NUM>: checking whether the difference is below a predetermined threshold, and if not terminating the method, because it is concluded that the slave device of index k is faulty; and
- Step <NUM>: sending, to the common default address on the communication line, a command to change the common default address of the slave device (<NUM>.k) of index k to a unique address of index k.