Network device, control method and recording medium
By designing an automatic ID number allocation mechanism in network equipment, using the signal exchange between modules and port configuration, the complex, time-consuming and overlapping problems of ID numbering settings in the prior art are solved, and efficient and automatic ID number management is achieved.
Patent Information
- Application Number
- CN202110453235.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-04-27
- Filing Date
- 2021-04-26
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-04-26
AI Technical Summary
The prior art requires manual specification and storage when setting control unit ID numbers in multiple measurement systems, which is complex and time-consuming, especially when re-arrangement or addition of counters, the problem of overlapping ID numbers is prone to occur.
A network device is designed to generate and output commands to automatically assign unique ID numbers through a module connected in series, using the front and rear segment input/output ports and ID number information holding unit to use the ID numbers of the front segment and the back segment to generate and output commands to automatically assign unique ID numbers to ensure that the ID numbers of each module do not overlap. And temporarily set the initial ID number when the power is turned on, and update the ID number by monotonically increasing or decreasing.
The automated ID number setting process is realized, which reduces manual intervention, improves efficiency, avoids ID number overlap, and simplifies the counter rearrangement and addition process.
Smart Images

Figure CN113645321B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a network device, for example, to a technology for automatically setting identification (ID) numbers of a plurality of modules connected to the network device. Background Art
[0002] In order to construct a measuring system that measures multiple points at the same time, it is desirable to use multiple measuring machines in combination (JP3299488). At this time, multiple control units (e.g., counters) connected to the measuring machines are prepared and connected to the upper I / F module or host computer.
[0003] (A "connection" may be a wired or wireless connection, or may be an electrical or communications connection.)
[0004] Communication between the host computer and each control unit (eg, counter) is required to appropriately set the ID number of each control unit.
[0005] It is necessary to write the ID number in a recording medium such as an EEPROM in each counter in separate communication, or to set the ID number by specifying the ID number by a DIP switch in advance.
[0006] In addition, in order to rearrange or add connected counters, it is necessary to specify and reset the ID numbers so as not to overlap with the numbers of other counters.
[0007] Furthermore, if there are counters for which it is desired that the ID numbers be fixed despite the need to rearrange the order of the counters instead of arranging the counters in the order of consecutive numbers, setting the ID numbers of the counters is a complicated task.
[0008] Furthermore, it may take time and labor to appropriately set and store the ID number of the counter in the upper module (I / F module or host computer). Summary of the invention
[0009] The present invention provides a network device capable of easily and automatically setting ID numbers of a plurality of modules connected to a network.
[0010] The network device according to an embodiment of the present invention is a network device as follows, which includes a plurality of modules connected in series, wherein each of the plurality of modules includes: a front-end input port, which is configured to receive a signal from a front-end module of the module; a front-end output port, which is configured to output a signal to the front-end module of the module; a rear-end output port, which is configured to output a signal to the rear-end module of the module; a rear-end input port, which is configured to receive a signal from the rear-end module of the module; an ID number information holding unit, which is configured to hold the ID number information of the module; a first command generating unit, which is configured to generate a first command for notifying the rear-end module of the module of the ID number information of the module; a first command output unit, which is configured to output the first command from the rear-end output port; and a second command generating unit, which is configured to generate a command for notifying the rear-end module of the module of the ID number information of the module. a second command for notifying the front-end module of the module's ID number information and the ID number information of the back-end module of the module; a second command output unit, which is configured to output the second command from the front-end output port; and an ID number information updating unit, which is configured to, when the first command is received from the front-end module of the module, set the new ID number information obtained by monotonically increasing or decreasing the ID number information of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit, wherein each of the multiple modules connected to the network device outputs the first command and the second command a predetermined number of times or within a predetermined time period to assign different ID numbers to each of the multiple modules connected to the network device.
[0011] In an embodiment of the present invention, when the power is turned on, the ID number information holding unit is preferably temporarily set with the minimum number that can be used as an ID number, and the ID number information updating unit of each module among the multiple modules is configured to, when the first command is received from the front-end module of the module, set the value obtained by adding a numbering unit to the ID number of the front-end module of the module contained in the received first command as the ID number information of the module, preferably in the ID number information holding unit.
[0012] In an embodiment of the present invention, a module with a fixed ID number is preferably connected to the network device, and the module with a fixed ID number is configured to, when the first command is received from the front-end module of the module, preferably output the received first command as the first command of the module directly to the back-end module of the module.
[0013] In an embodiment of the present invention, when the power of the module with a fixed ID number is turned on, the ID number information contained in the first command first output from the module with a fixed ID number is preferably a value obtained by reducing one number unit from the minimum number that can be used as an ID number.
[0014] The control method according to an embodiment of the present invention is a control method for a network device, wherein the network device includes a plurality of modules connected in series, and the network device is configured to assign an ID number to each of the plurality of modules, wherein each of the plurality of modules includes: a front-end input port, which is configured to receive a signal from a front-end module of the module; a front-end output port, which is configured to output a signal to the front-end module of the module; a rear-end output port, which is configured to output a signal to a rear-end module of the module; a rear-end input port, which is configured to receive a signal from a rear-end module of the module; and an ID number information holding unit, which is configured to hold the ID number information of the module; the control method for the network device includes: a first command generating step, which is used to generate a first command for notifying the rear-end module of the module of the ID number information of the module; a first command output step, which is used to output the signal from the rear-end output port a second command generating step for generating a second command for notifying the front-end module of the module of the ID number information of the module and the ID number information of the back-end module of the module; a second command outputting step for outputting the second command from the front-end output port; and an ID number information updating step for, when the first command is received from the front-end module of the module, setting the new ID number information obtained by monotonically increasing or decreasing the ID number information of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit, wherein each of the multiple modules connected to the network device outputs the first command and the second command a predetermined number of times or within a predetermined time period to assign different ID numbers to each of the multiple modules connected to the network device.
[0015] The module according to an embodiment of the present invention is a module configured to set its own ID number, and the module includes: a front-end input port configured to receive a signal from the front-end module of the module; a front-end output port configured to output a signal to the front-end module of the module; a rear-end output port configured to output a signal to the rear-end module of the module; a rear-end input port configured to receive a signal from the rear-end module of the module; an ID number information holding unit configured to hold the ID number information of the module; a first command generating unit configured to generate a first command for notifying the rear-end module of the module of the ID number information of the module; a first command output unit configured to output the first command from the rear-end output port; and a second command generating unit configured to generate a command for notifying the front-end module of the module of the ID number information. a second command for storing the ID number information of the module and the ID number information of the subsequent module of the module; a second command output unit, which is configured to output the second command from the front-end output port; and an ID number information updating unit, which is configured to, upon receiving the first command from the front-end module of the module, set the new ID number information obtained by monotonically increasing or decreasing the ID number information of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit, wherein the module includes a plurality of modules, and each of the plurality of modules connected to the network device outputs the first command and the second command a predetermined number of times or within a predetermined time period to assign different ID numbers to each of the plurality of modules.
[0016] A computer-readable recording medium according to an embodiment of the present invention is a computer-readable recording medium storing a program for causing a computer to execute the above-described control method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a diagram showing an example of a measurement system;
[0018] Figure 2 is a diagram showing a functional block diagram of a counter;
[0019] Figure 3A and 3B is a diagram showing an example of a data format of a first command signal and a second command signal;
[0020] Figure 4 is a diagram for explaining an operation for automatically setting ID numbers of three counters as a first operation example;
[0021] Figure 5 is a diagram for explaining a first operation example;
[0022] Figure 6 is a diagram for explaining a first operation example;
[0023] Figure 7 is a diagram for explaining a first operation example;
[0024] Figure 8 is a diagram for explaining a first operation example;
[0025] Fig. 9 is a diagram for explaining a first operation example;
[0026] Fig.10 is a diagram for explaining a first operation example;
[0027] Fig.11 is a diagram for explaining a first operation example;
[0028] Fig.12 is a diagram for explaining a first operation example;
[0029] Fig.13 is a diagram for explaining a first operation example;
[0030] Fig.14 is a diagram for explaining determination of an ID number in the first operation example;
[0031] Fig.15 is a diagram for explaining an operation for setting ID numbers of three counters including a counter having a fixed ID number as a second operation example;
[0032] Fig.16 is a diagram for explaining a second operation example;
[0033] Fig.17 is a diagram for explaining a second operation example;
[0034] Fig.18 is a diagram for explaining a second operation example;
[0035] Fig.19 is a diagram for explaining a second operation example;
[0036] Fig. 20 is a diagram for explaining a second operation example;
[0037] Fig.21 is a diagram for explaining a second operation example;
[0038] Fig. 22 is a diagram for explaining a second operation example;
[0039] Fig.23 is a diagram for explaining a second operation example;
[0040] Fig.24 is a diagram for explaining a second operation example; and
[0041] Fig.25 2 is a diagram illustrating determination of an ID number in the second operation example.
[0042] Description of Reference Numerals
[0043] 10 Indicators
[0044] 20Host Computer
[0045] 100, 400, 500, 600 counters
[0046] 110 Display
[0047] 120 front-end input port
[0048] 130 front-end output port
[0049] 140 rear output port
[0050] 150 rear input port
[0051] 160 measuring machine connection port
[0052] 171 displacement detection unit
[0053] 172 Display control unit
[0054] 173 computing units
[0055] 200ID number management unit
[0056] 210, 410, 510, 610 ID number holding unit
[0057] 220 first command generating unit
[0058] 230 first command output unit
[0059] 240 second command generation unit
[0060] 250 Second command output unit
[0061] 260ID number update unit
[0062] 270, 470, 570, 670 first command buffer
[0063] 280, 480, 580, 680 second command buffer DETAILED DESCRIPTION
[0064] Embodiments of the present invention are shown and described with reference to the reference numerals attached to the elements in the drawings.
[0065] (First Exemplary Embodiment)
[0066] Figure 1 An example of a measurement system is shown.
[0067] The measuring system includes a plurality of digital indicators 10 (also called digital dial indicators or electric micrometers) to measure a plurality of points simultaneously.
[0068] Each indicator 10 includes a main body cylindrical portion, a shaft provided in such a manner as to be slidable relative to the main body cylindrical portion, and an encoder that detects displacement of the shaft.
[0069] Each indicator 10 is connected to a counter (module) 100 .
[0070] Here, the counter 100 is a control unit of the indicator 10, and has functions of a detector, a display, a communication device, a simple calculator, etc. The counter (module) 100 is also called a relay unit or a data collection unit, or may be simply referred to as a small terminal device.
[0071] In the measuring system, the counters 100 are connected in series.
[0072] The foremost stage counter 100 is connected to the host computer 20. In addition, for example, an interface (I / F) module may be connected between the foremost stage counter 100 and the host computer 20.
[0073] Here, in order for the host computer 20 to communicate with each counter 100 , it is necessary to assign a different ID number to each counter 100 and notify the host computer 20 of the ID number of each counter 100 .
[0074] Figure 2 is a functional block diagram of each counter 100 .
[0075] The counter 100 includes a display 110 and input / output ports 120 to 150 on the outer surface of the housing and a circuit unit inside the housing. The circuit unit includes a central processing unit (CPU) and a memory (ROM or RAM), and a program (ID number management program) executed by the CPU stored in the memory implements the function as a functional unit.
[0076] The counter 100 includes a front-end input port 120 , a front-end output port 130 , a rear-end output port 140 , a rear-end input port 150 , and a measuring machine connection port 160 as input / output ports.
[0077] The front-end input port 120 is connected to and receives a signal from its own front-end counter.
[0078] The front-end output port 130 is connected to its own front-end counter and outputs a signal to its own front-end counter.
[0079] The subsequent-stage output port 140 is connected to its own subsequent-stage counter and outputs a signal to its own subsequent-stage counter.
[0080] The back-end input port 150 is connected to its own back-end counter and receives a signal from its own back-end counter.
[0081] The measuring machine connection port 160 is used to connect to the indicator 10 . One counter 100 may be connected to two or more indicators 10 , and in this case, the counter 100 may include a plurality of measuring machine connection ports 160 .
[0082] Note that the front-end input port 120 and the front-end output port 130 may not be physically separated, and one front input / output port may be used as both the front-end input port and the front-end output port. Similarly, the rear-end output port 140 and the rear-end input port 150 may not be physically separated, and one rear input / output port may be used as both the rear-end input port and the rear-end output port.
[0083] In addition, each counter 100 may include an upper input / output port to be connected to an upper module (host computer or I / F module). In this exemplary embodiment, the front-end input port 120 or the front-end output port 130 receives a signal from the upper module or outputs a signal to the upper module.
[0084] Each counter 100 further includes a displacement detection unit 171 , a display control unit 172 , a calculation unit 173 , and an ID number management unit 200 .
[0085] The displacement detection unit 171 detects a scale signal from a scale (encoder) included in the indicator 10 to acquire the displacement of the shaft.
[0086] The display control unit 172 controls the display of the display 110 (for example, an LCD panel), and displays, for example, the acquired displacement amount of the axis on the display 110 .
[0087] The calculation unit 173 performs simple calculations such as origin setting, preset setting, display of maximum and minimum values, and range setting, etc. Then, the counter 100 transmits the detected displacement to the host (host computer 20), ie, serves as a communication means.
[0088] The ID number management unit 200 exchanges ID number information between the preceding stage counter and the succeeding stage counter to determine its own ID number.
[0089] The ID number management unit 200 includes an ID number holding unit 210 , a first command generating unit 220 , a first command output unit 230 , a second command generating unit 240 , a second command output unit 250 , an ID number updating unit 260 , a first command buffer 270 , and a second command buffer 280 .
[0090] The ID number holding unit 210 is a memory or register that holds its own ID number. In order to accept the automatic allocation of the ID number, the ID number holding unit 210 is provided with a temporary ID number when the power is turned on. In this specification, when the power of the counter 100 is turned on, it is assumed that the temporary ID number is "01".
[0091] Note that the initial value as the temporary ID number when the power of the counter 100 is turned on is immediately rewritten, and the value is not limited as long as it is any number that does not change.
[0092] However, considering the case where the counter accepting automatic assignment of ID numbers is placed at the forefront, it is preferable to set the minimum value of the ID numbers available in the automatic setting as the initial value.
[0093] It is assumed that the user can select a fixed ID number to be set in the counter 100 .
[0094] Here, it is assumed that a value of "50" or more is used as a fixed ID number and the user sets an ID number of "50" or more in the ID number holding unit 210. Then, the counter 100 does not accept automatic allocation of an ID number and does not rewrite the fixed ID number held by the ID number holding unit 210.
[0095] The first command generating unit 220 generates a first command signal including as information its own ID number held by the ID number holding unit 210. However, if the counter 100 is provided with a fixed ID number, the first command signal received from the preceding stage counter is directly used as its own first command signal.
[0096] Figure 3A An example of the data format of the first command signal is shown.
[0097] The first command signal includes, in order from the beginning, a header (start signal), a command type, ID number information of a host module, its own ID number information, and a tail.
[0098] The command type is, for example, a command identification code for identifying the command signal as a first command signal or a second command signal, and a preset command identification code such as A, B, 1 or 2 is allocated according to the type of the signal.
[0099] The ID number information of the upper module is used to transmit the ID number of the host computer 20 or the I / F module to the later stage when the host computer 20 or the I / F module is included in the system structure as the upper module of the counter 100. If the first command signal received from the previous stage (or upper) module contains the ID number information of the upper module, the counter 100 directly transmits the part to the later stage. In addition, when the counter 100 does not receive the first command signal from any other module and is to first transmit the first command signal from itself, the counter 100 sets the "ID number information of the upper module" to, for example, "0".
[0100] The first command output unit 230 outputs the first command signal from the subsequent-stage output port 140 to the subsequent-stage counter thereof.
[0101] The second command generation unit 240 generates a second command signal including its own ID number and the ID number of its subsequent module (counter) as information.
[0102] Figure 3B An example of the data format of the second command signal is shown.
[0103] The second command signal includes a header, a command type, its own ID number and the ID number of the subsequent counter, and a tail in order from the beginning. The second command signal is specifically described in the operation example described later.
[0104] The second command output unit 250 outputs a second command signal from the front-end output port 130 to the front-end counter.
[0105] When receiving the first command signal from the previous stage counter, the ID number update unit 260 calculates a value by adding "1" to the ID number contained in the first command signal from the previous stage counter. Then, the ID number update unit 260 updates the ID number held by the ID number holding unit 210 to the calculated value as its own new ID number. However, if a fixed ID number has been set, the ID number update unit 260 is not started and is in a sleep mode.
[0106] The first command buffer 270 is a memory or a register that temporarily buffers (stores) the first command signal received from the previous stage counter.
[0107] The second command buffer 280 is a memory or a register that temporarily buffers (stores) the second command signal received from the subsequent-stage counter.
[0108] The counter 100 inputs / outputs the first command signal and the second command signal at predetermined time intervals (for example, 20 ms intervals) until a predetermined time (for example, two seconds) elapses from when the power is turned on.
[0109] (First Operation Example)
[0110] An operation example of the present invention is described below.
[0111] As a first operation example, the ID numbers of the three counters 100 are automatically set.
[0112] like Figure 4 As shown, the three counters 100 are referred to as a first counter 400, a second counter 500, and a third counter 600 from the left. The first counter 400 is the foremost counter among the three counters, and is connected to the host computer 20.
[0113] exist Figure 4 , the host computer 20 and the indicator 10 are omitted, and only the counters 400, 500 and 600 are shown.
[0114] For easy understanding of the operation description, the ID number holding units 410, 510, and 610, the first command buffers 470, 570, and 670, and the second command buffers 480, 580, and 680 are shown as functional units of the counters 400, 500, and 600. Figure 4 In the embodiment, the first counter 400, the second counter 500 and the third counter 600 receive automatic allocation of ID numbers, and when the power is turned on, the temporary ID number "01" is set in the respective ID number holding units 410, 510 and 610.
[0115] Afterwards, the first counter 400 , the second counter 500 , and the third counter 600 exchange the first command signal and the second command signal therebetween to update their own ID numbers and finally determine their own ID numbers. At this time, the respective ID numbers may be displayed on the display 110 .
[0116] For example, when the power is turned on, the temporary ID number "01" is displayed on the display 110 of each of the counters 400, 500 and 600, and when the ID number is updated in the operation described later, the number displayed on the display 110 is updated. When the temporary ID number is displayed, the displayed ID number may flash or its color may change to inform the user that the ID number has not been determined, and once the ID number is determined, the determined ID number can be displayed in a normal manner for a predetermined period of time (e.g., 5 seconds or 10 seconds).
[0117] refer to Figure 5 .
[0118] After power is turned on, the counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0119] The first command signal is used to notify the subsequent-stage counter of its own ID number.
[0120] The counters 400 , 500 , and 600 each output an ID number held by the respective ID number holding units 410 , 510 , and 610 as a first command signal.
[0121] At the beginning, each of the counters 400, 500 and 600 has not received the first command signal from any other counter, and the ID number is not updated. Therefore, the first command signal outputted from each of the counters 400, 500 and 600 is its temporary ID number "01" set to the initial value. Each of the counters 400, 500, 600 outputs the first command signal to its own subsequent counter.
[0122] However, the third counter 600 does not have a subsequent-stage counter to which the first command signal is output.
[0123] The rear-stage output port 140 of the rear-stage counter (in this specification, the third counter 600) may be attached with a cap to terminate. Alternatively, if the counter has the rear-stage output port 140 with an end cap attached, the counter may not output the first command signal.
[0124] The second command signal is used to notify the front-stage counter of its own ID number and the ID number of the rear-stage counter.
[0125] The second command generation unit 240 generates a second command signal by adding its own ID number in front of the ID number information stored in the second command buffer 280 (480, 580, and 680).
[0126] In this step ( Figure 5 ), counters 400, 500 and 600 have not received the second command signal from any other counter. At this time, the second command signal outputted from each of counters 400, 500 and 600 is its temporary ID "01". Counters 400, 500 and 600 each output the second command signal to its own preceding counter.
[0127] Next, refer to Figure 6 .
[0128] When the first command signal is received from the previous stage counter, the ID number update unit 260 calculates a value by adding "1" to the ID number contained in the first command signal from the previous stage counter, and uses the calculated value to update the ID number maintained by the ID number maintaining unit 210 (410, 510 and 610) as its own new ID number.
[0129] The first counter 400 is a preceding stage counter and does not receive the first command signal from the preceding stage, and its own ID number is not updated and remains at the initial value "01".
[0130] The second counter 500 and the third counter 600 are described.
[0131] The second counter 500 and the third counter 600 are each in an earlier step ( Figure 5 ) receives a first command signal from a front-end counter.
[0132] Thus, the ID number update unit 260 adds 1 to "01" which is the received first command, and rewrites the ID number held by the ID number holding unit 210 (510, 610) to update its own ID number. Then, the ID numbers of the second counter 500 and the third counter 600 become "02".
[0133] In addition, the first counter 400 and the second counter 500 are each in an earlier step ( Figure 5 ) receives the second command signal “01” from the subsequent counter. Therefore, the second command buffer 480 of the first counter 400 and the second command buffer 580 of the second counter 500 each store the received second command “01”.
[0134] Next, refer to Figure 7 .
[0135] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0136] The first command signal is used to notify the subsequent counter of its own ID number, and the counters 400, 500, 600 each output the ID number held by the ID number holding unit 410, 510, 610 as the first command signal. That is, the first command signal output from the first counter 400 is "01". The first command signal output from the second counter 500 and the third counter 600 is "02".
[0137] The second command signal is used to notify the previous stage counter of its own ID number and the ID number of the subsequent stage counter. The second command generation unit 240 generates the second command signal by adding its own ID number to the front of the ID number information stored in each of the second command buffers 480, 580 and 680.
[0138] The third counter 600 is the last stage counter and does not receive the second command signal from any other counter, and the second command signal output from the third counter 600 is its own ID number. That is, the second command signal output from the third counter 600 is "02".
[0139] The second counter 500 is set at an earlier step ( Figure 5 ) has received the second command signal “01” from the third counter 600 and has stored “01” in the second command buffer 580. At this time, the second command generation unit 240 of the second counter 500 generates a second command signal “0201” by adding the storage value “01” following its own ID number “02”, and outputs the generated second command signal from the front-end output port 130.
[0140] The first counter 400 is in the earlier step ( Figure 5 ) receives the second command signal “01” from the second counter 500 and has stored “01” in the second command buffer 480.
[0141] The second command generation unit 240 of the first counter 400 generates a second command signal “0101” by adding a storage value “01” following its own ID number “01”, and outputs the generated second command signal to the front stage (host computer 20 ).
[0142] Next, refer to Figure 8 .
[0143] The third counter 600 is in the earlier step ( Figure 7 ) receives the first command signal "02" from the second counter 500. Therefore, the ID number of the third counter 600 itself is updated to "03". Although the ID numbers of the first counter 400 and the second counter 500 are updated, they ultimately remain unchanged, and their description is omitted.
[0144] The second command buffer 480 of the first counter 400 and the second command buffer 580 of the second counter 500 are described.
[0145] The second command buffer 480 of the first counter 400 stores the command of the earlier step ( Figure 7 ) receives the second command signal “0201” from the second counter 500.
[0146] The second command buffer 580 of the second counter 500 stores the data in the earlier step ( Figure 7 ) receives the second command signal “02” from the third counter 600.
[0147] Next, refer to Fig. 9 .
[0148] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0149] The first command signal is used to transmit its own ID number, and the first command signal output from the first counter 400 is "01", the first command signal output from the second counter 500 is "02", and the first command signal output from the third counter 600 is "03".
[0150] The second command signal is generated by adding its own ID number in front of the ID number information related to its subsequent stage counter stored in each of the second command buffers 480 , 580 , and 680 .
[0151] The second command signal output from the first counter 400 is "010201".
[0152] The second command signal output from the second counter 500 is "0202".
[0153] The second command signal output from the third counter 600 is "03".
[0154] Next, refer to Fig.10 .
[0155] Counters 400, 500 and 600 are each based on the counters in the earlier step ( Fig. 9 ) to update its own ID. However, the ID numbers of the first counter 400, the second counter 500 and the third counter 600 have been increased by "1" from the left.
[0156] Therefore, in this step ( Fig.10 ), the ID number ends up remaining the same before and after it is updated.
[0157] Next, the second command buffers 480 , 580 , and 680 of the counters 400 , 500 , and 600 are described.
[0158] The first counter 400 is in the earlier step ( Fig. 9 ) receives the second command signal “0202” from the second counter 500, and the second command buffer 480 of the first counter 400 stores “0202”.
[0159] The second counter 500 is set at an earlier step ( Fig. 9 ) receives the second command signal “03” from the third counter 600, and the second command buffer 580 of the second counter 500 stores “03”.
[0160] Next, refer to Fig.11 .
[0161] Each of the counters 400, 500, and 600 notifies the subsequent counter of its ID number information through the first command signal.
[0162] The ID numbers were in the earlier steps ( Fig.10 ) is unchanged, and the first command signal outputted from each of the counters 400, 500 and 600 is the same as the first command signal outputted from the step ( Fig. 9 )
[0163] The second command signal output from each of the counters 400 , 500 , and 600 is described.
[0164] The second command signal output from the third counter 600 is its own ID number "03" and is consistent with the earlier step ( Fig. 9 )
[0165] The second counter 500 is calculated by the earlier step ( Fig.10 ) adds its own ID number “02” in front of “03” stored in the second command buffer 580 to generate a second command signal “0203”.
[0166] The first counter 400 is calculated by the earlier step ( Fig.10 ) adds its own ID number “01” in front of “0202” stored in the second command buffer 480 to generate a second command signal “010202”.
[0167] Next, refer to Fig.12 .
[0168] In the earlier step ( Figure 8 ), the ID numbers of the counters 400, 500 and 600 have been increased by "1" from the left, and although the counters 400, 500 and 600 have updated their ID numbers, the ID numbers remain unchanged.
[0169] The second command buffers 480 , 580 , and 680 of the counters 400 , 500 , and 600 are described.
[0170] The first counter 400 is in the earlier step ( Fig.11 ) receives the second command signal “0203” from the second counter 500, and the second command buffer 480 of the first counter 400 stores “0203”.
[0171] The second command buffer 580 of the second counter 500 and the second command buffer 680 of the third counter 600 are finally executed in the same manner as in the earlier step ( Fig.10 ) and omit redundant description.
[0172] refer to Fig.13 .
[0173] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0174] Describe in this step ( Fig.13 ) is a second command signal output from the first counter 400.
[0175] The first counter 400 is calculated by the earlier step ( Fig.12 ) adds its own ID number “01” to the front of “0203” stored in the second command buffer 480 to generate a second command signal “010203”. Then, “010203” is notified to the host computer 20 through the second command signal from the first counter 400.
[0176] The subsequent steps from this step are Fig.12 and Fig.13 The counters 400, 500 and 600 continue to send the same data (the first command signal and the second command signal) to each other within a predetermined period of time (in this specification, two seconds after the power is turned on).
[0177] After a predetermined period of time has passed, counters 400, 500 and 600 each determine their own ID number, such as Fig.14 In addition, the host computer 20 and the counters 400 , 500 , and 600 can recognize the ID number of the subsequent counter from the ID number information stored in the second command buffers 480 , 580 , and 680 .
[0178] According to the present exemplary embodiment, it is possible to automatically assign ID numbers that are successively increased by 1 from the leading counter 400 to the connected plurality of counters 100 (400, 500, and 600). In addition, the upper host computer 20 can know the ID numbers of the counters 400, 500, and 600, and each of the counters 400, 500, and 600 can know the existence of its succeeding counter and its ID number from the ID number information stored in the second command buffers 480, 580, and 680.
[0179] If a counter is installed, removed or replaced, the ID number of the counter is automatically assigned appropriately, thereby eliminating the trouble of manually resetting the ID numbers one by one and eliminating the mental labor of thinking about the complicated ID number assignment.
[0180] (Second operation example)
[0181] Next, as a second operation example, a case where a counter whose ID number is fixed is included is described.
[0182] refer to Fig.15 .
[0183] The first counter 400 is the foremost counter 100 among the three counters 100 , and the first counter 400 is connected to the host computer 20 (not shown).
[0184] Here, it is assumed that the ID number of the second counter 500 is fixedly set to "78".
[0185] The ID numbers of the first counter 400 and the third counter 600 are automatically set.
[0186] exist Fig.15 , the host computer 20 and the indicator 10 are omitted, and only the counter is shown.
[0187] refer to Fig.16 .
[0188] After power is turned on, the counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0189] At the beginning, each of the counters 400, 500 and 600 has not received the first command signal from any other counter. The ID numbers of the first counter 400 and the third counter 600 are automatically set. The first command signal outputted from each of the counters 400 and 600 whose ID numbers are to be automatically set is its temporary ID "01" set to the initial value.
[0190] The ID number of the second counter 500 is fixed.
[0191] When the counter is provided with a fixed ID, the counter directly transmits the first command signal received from the preceding-stage counter as its first command signal to the succeeding-stage counter, but does not receive the first command signal from any other counter at the beginning.
[0192] Here, it is assumed that the ID number included in the first command signal outputted from the counter (500) whose ID number is fixed is "00".
[0193] Note that the first command signal outputted first from the counter whose ID number is fixed may be any ID number that does not change, for example, "01".
[0194] However, considering the situation where the counter with fixed ID number can be placed at the front stage, the first command signal output from the counter with fixed ID number is preferably the minimum value of the ID number available in the automatic setting or (as a most suitable example) a value obtained by subtracting one from the minimum ID number "01" available in the automatic setting (such as "00" etc.).
[0195] Describe the second command signal.
[0196] Each of the counters 400, 500 and 600 does not receive the second command signal from any other counter, and the second command signal outputted from each of the counters 400, 500 and 600 is its own ID number. That is, the first counter 400 and the third counter 600 each output their temporary ID number "01" as the second command signal.
[0197] The second counter 500 outputs its own fixed ID number "78" as the second command signal.
[0198] refer to Fig.17 .
[0199] The first counter 400 has not received the first command signal from the preceding stage, and its ID number is not updated and remains at “01” as an initial value.
[0200] The ID number of the second counter 500 is fixed at "78".
[0201] The third counter 600 receives "00" as the first command signal from the second counter 500, and updates its own ID number by adding 1 to the received first command "00". Therefore, the ID number of the third counter 600 remains "01" and does not change.
[0202] The second command buffers 480 , 580 , and 680 of the counters 400 , 500 , and 600 are described.
[0203] The first counter 400 stores the second command signal “ 78 ” received from the second counter 500 in the second command buffer 480 .
[0204] The second counter 500 stores the second command signal “01” received from the third counter 600 in the second command buffer 580 .
[0205] Now, refer to Fig.18 .
[0206] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0207] The first counter 400 and the third counter 600 each use its own ID number "01" as a first command signal.
[0208] The second counter 500 has a fixed ID number. The second counter 500 will be in the earlier step ( Fig.16 ) received in step ( ) is directly output from the front-end counter (the first counter 400) to the back-end counter (the third counter 600). That is, in this step ( Fig.18) the ID number contained in the first command signal output from the second counter 500 is "01".
[0209] Here, as a variation, a counter with a fixed ID number can exchange the first command signal in the same manner as a counter that accepts automatic assignment of ID numbers. That is, the counter with a fixed ID number can start with its temporary ID number "01", update the temporary ID number by adding 1 to the ID number received from the front-end counter, and transmit its own updated ID number to the back-end counter. Then, the counter with a fixed ID number only needs to discard the automatically updated temporary ID number to eventually use a fixed set ID number (e.g., "78") as its own ID number. In this case, although the consecutive numbers are destroyed at the counter with a fixed ID number, the ID numbers do not overlap with each other.
[0210] The second command signal will now be described.
[0211] The first counter 400 is calculated by the earlier step ( Fig.16 ) adds its own ID number “01” in front of the second command signal “78” received from the second counter 500 to generate the second command signal “0178”.
[0212] The second counter 500 is calculated by the earlier step ( Fig.16 ) adds its own ID number “78” in front of the second command signal “01” received from the third counter 600 to generate a second command signal “7801”.
[0213] The third counter 600 does not receive the second command signal from any other counter and uses its own ID number "01" as the second command signal.
[0214] refer to Fig.19 .
[0215] The ID numbers of the first counter 400 and the second counter 500 remain unchanged.
[0216] The third counter 600 is in the earlier step ( Fig.18 ) receives the first command signal “01” from the second counter 500 and updates its own ID number to “02” by adding “1” in front of the received first command signal “01”.
[0217] With respect to the second command buffer 480, the first counter 400 is set at an earlier step ( Fig.18 ) receives the second command signal “7801” from the second counter 500 and stores “7801” in the second command buffer 480.
[0218] refer to Fig. 20 .
[0219] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0220] Regarding the first command signal, the first command signal outputted from each of the first counter 400 and the second counter 500 is the same as the first command signal outputted from the earlier step ( Fig.18 ) and its redundant description is omitted.
[0221] The ID number included in the first command signal output from the third counter 600 is “02” which has been updated. However, the third counter 600 does not have a subsequent-stage counter to which the first command signal is output.
[0222] The second command signal will now be described.
[0223] The first counter 400 is calculated by the earlier step ( Fig.18 ) adds its own ID number "01" in front of the second command signal "7801" received to generate the second command signal "017801".
[0224] The second counter 500 is calculated by the earlier step ( Fig.18 ) adds its own ID number "78" in front of the second command signal "01" received to generate the second command signal "7801".
[0225] The ID number of the third counter 600 is obtained in an earlier step ( Fig.17 and Fig.18 ) remains unchanged and in this step ( Fig. 20 ) is finally combined with the second command signal output from the second counter 500 in the earlier step ( Fig.18 )
[0226] The third counter 600 outputs its own ID number “02” as the second command signal to the second counter 500 .
[0227] refer to Fig.21 .
[0228] The ID number of the third counter 600 is obtained in an earlier step ( Fig.19 ) is "02" and is "1" greater than the ID number of the first counter 400, and the second counter 500 with a fixed ID number is inserted therebetween. Thus, the ID numbers of the first counter 400 and the third counter 600 remain unchanged.
[0229] Regarding the second command buffers 480, 580, and 680, the second counter 500 is set in the earlier step ( Fig. 20) receives the second command signal “02” from the third counter 600 and stores “02” in the second command buffer 580 of the second counter 500.
[0230] The ID numbers stored in the second command buffer 480 of the first counter 400 and the second command buffer 680 of the third counter 600 ultimately remain unchanged, and a redundant description thereof is omitted.
[0231] refer to Fig. 22 .
[0232] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0233] The first command signal is ultimately associated with the earlier step ( Fig. 20 ) remains unchanged and its description is omitted.
[0234] Regarding the second command signal, the second counter 500 is set at an earlier step ( Fig. 20 ) receives the second command signal “02” from the third counter 600, and generates a second command signal “7802” by adding its own ID number “78” in front of the received second command signal.
[0235] The second command signals outputted from the first counter 400 and the third counter 600 are finally combined with the earlier step ( Fig. 20 ) and its description is omitted.
[0236] refer to Fig.23 .
[0237] The ID numbers of the first counter 400 , the second counter 500 , and the third counter 600 remain unchanged.
[0238] With respect to the second command buffer 480, the first counter 400 is set at an earlier step ( Fig. 22 ) receives the second command signal “7802” from the second counter 500, and the second command buffer 480 of the first counter 400 stores “7802”.
[0239] The ID number stored in the second command buffer 580 of the second counter 500 ultimately remains unchanged, and the description is omitted.
[0240] refer to Fig.24 .
[0241] The counters 400 , 500 , and 600 each output a first command signal and a second command signal.
[0242] The second command signal of the first counter 400 is the same as that of the earlier step ( Fig. 22) has changed compared to the previous one.
[0243] The first counter 400 is in the earlier step ( Fig. 20 ) receives the second command signal “7802” from the second counter 500, and generates a second command signal “017802” by adding its own ID number “01” in front of the received second command signal.
[0244] The subsequent steps from this step are Fig.23 and Fig.24 The counters 400, 500 and 600 continue to send the same data (the first command signal and the second command signal) within a predetermined period of time (in this specification, two seconds after the power is turned on).
[0245] After a predetermined period of time, if Fig.25 As illustrated, the counters 400, 500, and 600 each determine their own ID number. The first counter 400 and the third counter 600 set their own ID numbers "01" and "02" as automatically set ID numbers, respectively. The second counter 500 sets the fixedly set ID number "78" as its own ID number.
[0246] In addition, the host computer 20 and the counters 400 , 500 , and 600 can recognize the ID numbers of their own subsequent-stage counters from the ID number information stored in the second command buffers 480 , 580 , and 680 .
[0247] According to the present exemplary embodiment, although there is a counter that has a fixed ID number and does not accept the automatic allocation of ID numbers, the ID number can be automatically allocated to other counters that accept the automatic allocation of ID numbers. At this time, the ID number of the counter that accepts the automatic allocation of ID numbers will be continuous in such a way that it increases by 1 from the previous number without losing the number.
[0248] Note that the present invention is not limited to the exemplary embodiments and can be modified without departing from the spirit thereof.
[0249] The temporary ID number at power-on has been set to a small value "01", and the ID numbers of the subsequent stage counters are set (updated) by sequentially increasing (adding) 1 from the ID number of the first stage counter.
[0250] In contrast, the ID number of the top-stage counter may be set to a large value (eg, "49"), and the ID numbers of the subsequent-stage counters may be set (updated) by sequentially decreasing by "1" from the ID number of the top-stage counter.
[0251] Note that the ID number can be incremented or decremented by "2" and incremented or decremented by "1" in sequence.
[0252] It only needs to be monotonically increasing or decreasing so that the ID numbers do not overlap.
[0253] The functions of the functional units described in the exemplary embodiments can be realized by arranging a CPU and a memory to function as a computer, installing a predetermined ID number management program in the memory, and executing the installed program by the CPU, etc. The ID number management program can be distributed by recording in a nonvolatile recording medium such as a CD-ROM or a memory card, or can be downloaded via the Internet, etc.
[0254] CROSS-REFERENCE TO RELATED APPLICATIONS
[0255] This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2020-078000 (DAS Code 346A) filed on April 27, 2020, the disclosure of which is incorporated herein in its entirety by reference.
Claims
1. A network device comprising a plurality of modules connected in series, in, Each module in the plurality of modules comprises: A front-end input port configured to receive a signal from a front-end module of the module; A front-end output port configured to output a signal to a front-end module of the module; A back-end output port, which is configured to output a signal to a back-end module of the module; A back-end input port configured to receive a signal from a back-end module of the module; An ID number information holding unit configured to hold the ID number information of the module; A first command generating unit, configured to generate a first command for notifying a subsequent module of the module of the ID number information of the module; A first command output unit, configured to output the first command from the back-end output port; A second command generating unit configured to generate a second command for notifying the front-end module of the module of the ID number information of the module and the ID number information of the back-end module of the module; a second command output unit configured to output the second command from the front-end output port; a second command buffer configured to temporarily store the second command received from a subsequent module of the module; and The ID number information updating unit is configured to, when receiving the first command from the front-end module of the module, set new ID number information obtained by a predetermined calculation by monotonically increasing or decreasing the ID number information of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit, The second command generating unit generates the second command by adding the ID number information of the second command to the second command temporarily stored in the second command buffer. each of the plurality of modules connected to the network device outputs the first command and the second command a predetermined number of times or within a predetermined time period to assign a different ID number to each of the plurality of modules connected to the network device, In a case where the power is turned on, the ID number information holding unit is temporarily set with a number that can be used as an ID number, and The ID number information updating unit of each module among the multiple modules is configured to, when the first command is received from the front-end module of the module, set a value obtained by adding a numbering unit to the ID number of the front-end module of the module contained in the received first command, or subtracting a numbering unit from the ID number of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit.
2. The network device according to claim 1, further comprising a module with a fixed ID number, the module being connected to the network device, in, The module with a fixed ID number is configured to, when receiving the first command from the front-end module of the module, directly output the received first command as the first command of the module to the back-end module of the module.
3. The network device according to claim 2, in, When the power of the module with a fixed ID number is turned on, the ID number information included in the first command outputted from the module with a fixed ID number is a value obtained by reducing the minimum number that can be used as an ID number by one number unit.
4. A control method for a network device, the network device comprising a plurality of modules connected in series, and the network device being configured to assign an ID number to each of the plurality of modules, Each module in the plurality of modules include: A front-end input port configured to receive a signal from a front-end module of the module; A front-end output port configured to output a signal to a front-end module of the module; A back-end output port, which is configured to output a signal to a back-end module of the module; A back-end input port configured to receive a signal from a back-end module of the module; as well as An ID number information holding unit configured to hold the ID number information of the module; The control method for the network device includes: A first command generating step, for generating a first command for notifying a subsequent module of the module of the ID number information of the module; A first command output step, for outputting the first command from the rear-end output port; A second command generating step, for generating a second command for notifying the front-end module of the module of the ID number information of the module and the ID number information of the back-end module of the module; A second command output step, for outputting the second command from the front-end output port; A second command buffering step, for temporarily storing the second command received from the back-end module of the module in a second command buffer; and an ID number information updating step for setting, in the case where the first command is received from the front-end module of the module, new ID number information obtained by a predetermined calculation by monotonically increasing or decreasing the ID number information of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit, wherein, in the second command generating step, the second command is generated by adding the ID number information of the second command to the second command temporarily stored in the second command buffer, each of the plurality of modules connected to the network device outputs the first command and the second command a predetermined number of times or within a predetermined time period to assign a different ID number to each of the plurality of modules connected to the network device, In a case where the power is turned on, the ID number information holding unit is temporarily set with a number that can be used as an ID number, and In the ID number information updating step, when the first command is received from the front-end module of the module, a value obtained by adding a numbering unit to the ID number of the front-end module of the module contained in the received first command, or subtracting a numbering unit from the ID number of the front-end module of the module contained in the received first command, is set in the ID number information holding unit as the ID number information of the module.
5. A module configured to set its own ID number, the module include: A front-end input port configured to receive a signal from a front-end module of the module; A front-end output port configured to output a signal to a front-end module of the module; A back-end output port, which is configured to output a signal to a back-end module of the module; A back-end input port configured to receive a signal from a back-end module of the module; An ID number information holding unit configured to hold the ID number information of the module; A first command generating unit, configured to generate a first command for notifying a subsequent module of the module of the ID number information of the module; A first command output unit, configured to output the first command from the back-end output port; A second command generating unit configured to generate a second command for notifying the front-end module of the module of the ID number information of the module and the ID number information of the back-end module of the module; a second command output unit configured to output the second command from the front-end output port; a second command buffer configured to temporarily store the second command received from the back-end module of the module; as well as The ID number information updating unit is configured to, when receiving the first command from the front-end module of the module, set new ID number information obtained by a predetermined calculation by monotonically increasing or decreasing the ID number information of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit, Wherein, the module includes multiple modules. The second command generating unit generates the second command by adding ID number information of the second command to the second command temporarily stored in the second command buffer, each of the plurality of modules connected to the network device outputs the first command and the second command a predetermined number of times or within a predetermined time period to assign a different ID number to each of the plurality of modules, In a case where the power is turned on, the ID number information holding unit is temporarily set with a number that can be used as an ID number, and The ID number information updating unit is configured to, when the first command is received from the front-end module of the module, set a value obtained by adding a numbering unit to the ID number of the front-end module of the module contained in the received first command, or subtracting a numbering unit from the ID number of the front-end module of the module contained in the received first command as the ID number information of the module in the ID number information holding unit. 6 . A computer-readable recording medium storing a program for causing a computer to execute the control method according to claim 4 .
7. A computer program product comprising a program for causing a computer to execute the control method according to claim 4.
