COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM
By dynamically adjusting the length of unique identifiers within communication frames using area expansion information, the system effectively addresses the limitations of fixed-length identifiers, enhancing scalability and compatibility in communication systems.
Patent Information
- Application Number
- JP2020571869
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-10
- Filing Date
- 2020-06-01
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-06-01
AI Technical Summary
The challenge of increasing the number of terminals in a communication system beyond the capacity supported by fixed-length unique identifiers, such as in IPv6 networks, leads to inefficiencies and compatibility issues due to wasted space in frames and loss of communication compatibility.
A communication device and system that dynamically adjusts the length of unique identifiers by using area expansion information within the identifier storage area, allowing flexible allocation of identifier lengths to match the number of terminals without reducing communication efficiency.
This approach enables the arbitrary increase in the number of usable unique identifiers, minimizing wasted space and maintaining communication efficiency while ensuring compatibility across different systems.
Smart Images

Figure 0007563179000001 
Figure 0007563179000002 
Figure 0007563179000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a communication device, a communication system, a communication method, and a program. [Background technology]
[0002] In a communication system compatible with, for example, IPv6, in which multiple terminals communicate with each other, the terminals divide the information to be transmitted into multiple frames and transmit them. In addition, each terminal is associated with a predetermined unique identifier. The unique identifier is, for example, a terminal ID (Identifier) or an IP (Internet Protocol) address. A frame is delivered to a destination terminal by storing the unique identifier associated with the destination terminal in the frame. The unique identifier is generally fixed-length data whose length is determined in advance according to the communication protocol or the scale of the communication system, such as an IPv6 address having a fixed length of 128 bits (see, for example, Patent Document 1 and Patent Document 2). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2017-143364 [Patent Document 2] Japanese Patent Publication No. 6130077 Summary of the Invention [Problem to be solved by the invention]
[0004] However, due to factors such as the addition of new terminals, the number of terminals may increase significantly compared to when the communication system was first constructed. In this case, new unique identifiers are required in a number corresponding to the increased number of terminals. However, since unique identifiers are generally of a fixed length, the number of such identifiers is finite. This poses the problem that it is difficult to connect a number of terminals to a communication system that exceeds the number that a fixed-length unique identifier can handle. For example, even if there is a demand for an increase in sensors to be connected to a sensor network that communicates using IPv6 as the IoT becomes more widespread, the number of IP addresses that IPv6 can provide (approximately 2 128 However, it is difficult to connect more than 100 sensors to a sensor network.
[0005] In the past, in order to avoid the above problems, it was necessary to set the length of the unique identifier to be sufficiently long in advance, anticipating a future increase in the number of terminals. However, in this case, there is a problem that communication efficiency decreases because of wasted space (unused space) in the frame while the number of terminals connected to the communication system is small. In addition, there is a problem that communication compatibility between communication systems is lost when unique identifiers of different lengths are used for each communication system, and the communication systems are divided.
[0006] The present invention has been made in consideration of the above-mentioned technical background, and aims to provide a communication device, a communication system, a communication method, and a program that can arbitrarily increase the number of usable unique identifiers without reducing communication efficiency. [Means for solving the problem]
[0007] The present invention has been made to solve the above-mentioned problems, and one aspect of the present invention is a communication device in a communication system in which communication devices provided in each of a plurality of terminals communicate with each other via a communication network, the communication device comprising a receiving unit that receives frames transmitted from other terminals, and a data processing unit that processes data contained in the frames received by the receiving unit, wherein, when obtaining terminal identifier information contained in the frame, the data processing unit reads a first data area of a predetermined length located at a predetermined position in an identifier storage area that stores the terminal identifier information, and determines whether or not to include in the identifier storage area a second data area of the predetermined length located immediately after the first data area based on area extension information included in the first data area. Effect of the Invention
[0008] According to the present invention, the number of available unique identifiers can be increased arbitrarily without reducing communication efficiency. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram showing an example of a product equipped with a plurality of motor units. [Diagram 2] FIG. 1 is a schematic diagram of a multi-motor system 103. [Diagram 3] 1 is a diagram showing an example of the configuration of a multi-motor system 103 including a motor unit that rotates the joints of a communication robot 30. FIG. [Figure 4] 1 is a diagram showing the structure of a data frame 1a used in wired serial communication. [Diagram 5] FIG. 2 is a diagram showing a common data structure 12. [Figure 6] FIG. 2 is a diagram showing an example of a data frame 2a during communication according to the RS-485 standard. [Figure 7] FIG. 13 is a schematic diagram showing a method of storing a device ID in a data frame 1a. [Figure 8] FIG. 2 is a block diagram showing the functional configuration of a processor 112A. [Figure 9] 13 is a flowchart showing an example of the operation of the processor 112A when receiving terminal identifier information. [Figure 10] 13 is a flowchart showing an example of the operation of processor 112A when transmitting terminal identifier information. [Figure 11] FIG. 11 is a schematic diagram showing the flow of a process for checking a non-compatible terminal. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, one embodiment of the present invention will be described.
[0011] Recently, there has been an increase in cases where a single product is equipped with multiple motor units (terminals). In such products, there is an increasing need for a motor unit to communicate with other motor units. The multi-motor system according to this embodiment has multiple motor units (terminals) with communication functions and a communication network that interconnects the multiple motor units. In the multi-motor system, a motor unit transmits a command to the other motor units. Note that in the multi-motor system according to this embodiment, there is no need to provide a host terminal involved in all communications between the motor units.
[0012] [Multi-motor system configuration] An example of the configuration of a multi-motor system and a motor unit that constitutes the multi-motor system will be described below.
[0013] For example, Figure 1 shows an example of a product equipped with multiple motor units.
[0014] Fig. 1 shows the external appearance of a communication robot 30. The communication robot 30 is equipped with a motor unit at each location indicated by an arrow in Fig. 1 (e.g., the joint mechanism of the communication robot 30, etc.). In general, about 20 or more motor units can be installed in one communication robot 30. Installing many motor units enables the communication robot 30 to perform complex movements.
[0015] In this embodiment, a plurality of motor units communicate with each other and operate autonomously and in cooperation with each other.
[0016] 2 is a schematic diagram of a multi-motor system 103 in which a plurality of motor units 32a to 32e communicate with each other. As will be described later, the motor units 32a to 32e each include a motor and various circuit elements.
[0017] For example, when the motor unit 32a detects that it has failed, it transmits a failure notification command indicating that it has failed to the other motor units 32b and 32e. When the motor units 32b and / or 32e receive the failure notification command, they transmit (respond) a reception response command indicating that they have received the command to the motor unit 32a. Then, the motor units 32b and / or 32e operate to substitute for the operation of the failed motor unit 32a.
[0018] In addition, for example, when the motor unit 32a is a component for driving one of the joint mechanisms of the above-mentioned communication robot 30, other motor units may not be able to completely replace the functions of the motor unit 32a. In such cases, the motor units 32b and / or 32e may operate to replace the functions of the motor unit 32a within a predetermined range.
[0019] Information regarding the failure of the motor unit 32a may be further transmitted to the motor units 32c and 32d via the motor units 32b and 32e, respectively. The motor units 32c and 32d may also operate to substitute for the function of the motor unit 32a within a predetermined range. In some cases, the motor units 32c and 32d may notify the motor unit 32a of a notification command indicating that they cannot provide assistance (cannot substitute for the function of the motor unit 32a).
[0020] In the multi-motor system 103 in Fig. 2, motor units that can communicate with each other are shown connected by lines, but the lines and arrows shown are merely examples. Motor units that are not connected by lines in Fig. 2 may also be configured to be able to communicate with each other.
[0021] To realize the above-mentioned communication between motor units, each motor unit needs to know which motor unit it received a command from and which motor unit it should send the command to. Therefore, the source device ID or source IP address can be used as data to identify the source motor unit. The source device ID or source IP address can also be used to specify the destination when sending a response to a received command.
[0022] The configuration of the motor units and the communications carried out between the motor units will be described below.
[0023] 3 shows an example of the configuration of a multi-motor system 103 including motor units that rotate the joints of the communication robot 30 (FIG. 1) according to this embodiment. For convenience of description, two motor units 106A and 106B are shown in the example of FIG. 3. However, as shown in FIGS. 1 and 2, the multi-motor system 103 may have three or more motor units.
[0024] The multi-motor system 103 has motor units 106A and 106B. The motor unit 106A has a communication circuit 110A, a processor 112A, a memory 113A, a motor drive circuit 114A, a joint motor 116A, and a joint mechanism 104A. The motor unit 106B has the same configuration as the motor unit 106A, and has a communication circuit 110B, a processor 112B, a memory 113B, a motor drive circuit 114B, a joint motor 116B, and a joint mechanism 104B. The motor units 106A and 106B are sometimes called intelligent motors (registered trademark).
[0025] The motor units 106A and 106B can directly transmit and receive data frames to and from each other via the communication network NW as shown in Fig. 3. Note that the motor units 106A and 106B may communicate with each other via a higher-level device such as a relay device or a server, instead of directly communicating with each other.
[0026] The communication circuits 110A and 110B have buffers 111A and 111B, respectively. Identifiers for identifying the motor units 106A and 106B, respectively, are stored in advance in the buffers 111A and 111B. The identifiers may be letters and / or numbers that are uniquely identifiable within a communication network within a communicable range, and may be, for example, the above-mentioned ID (device ID) that is uniquely assigned to each device, or an IP address.
[0027] When a data frame is received, the communication circuits 110A and 110B perform processing of the physical layer and data link layer, respectively, and determine whether the destination device ID of the data frame matches its own identifier stored in the buffers 111A and 111B. If they match, the communication circuits 110A and 110B continue processing the data frame, and if they do not match, they discard the data frame.
[0028] When wireless communication is performed according to the Wi-Fi standard, the above-mentioned identifier is an IP address. In this case, the communication circuits 110A and 110B determine whether the destination IP address of the data frame matches their own IP address. The subsequent processing is the same as the above-mentioned processing.
[0029] When continuing to process the data frame, the communication circuits 110A and 110B sequentially process the data frame for each IP layer and transport layer in the OSI reference model, and extract a common data structure 12, which will be described later. The common data structure 12 includes an action command field 12b, which will be described later, and the like. The communication circuits 110A and 110B extract the commands and transmit the extracted commands to the processors 112A and 112B, respectively.
[0030] Both the processors 112A and 112B are signal processors with integrated semiconductors. The processors are also called "signal processing circuits" or "control circuits." The processors 112A and 112B generate signals for rotating the joint motors 116A and 116B at designated rotation speeds, respectively. The signals are, for example, pulse width modulation (PWM) signals. The processors 112A and 112B also interpret commands and data included in the common data structure 12 included in data frames transmitted from other motor units, and perform processing according to the contents of the commands.
[0031] The memories 113A and 113B hold a table in which other motor units are associated with identifiers that identify the other motor units. That is, the identifiers are set in advance in the communication circuits of the motor units, and the identifiers are held in the memories of the other motor units. When the motor units to which the processors 112A and 112B wish to transmit and receive data frames are determined, the processors 112A and 112B can specify the identifiers of the motor units and issue instructions to the communication circuits 110A and 110B.
[0032] The motor drive circuits 114A and 114B respectively supply current to the joint motors 116A and 116B with a magnitude and direction according to the PWM signal, causing the joint motors 116A and 116B to rotate.
[0033] In addition, the rotation speed, time, etc. can be specified in the command by using an attribute command field 12c described later and a data field 12d described later. The processors 112A and 112B may generate PWM signals so that the joint motors 116A and 116B rotate at the specified rotation speed and rotation time.
[0034] The communication protocol for commands sent and received in the multi-motor system will now be described.
[0035] [Communication protocols used in multi-motor systems] Figure 4 shows the structure of a data frame 1a used in wired serial communication. One example of serial communication is assumed to be communication conforming to the RS-485 standard. The RS-485 standard defines the electrical specifications for the physical layer of the OSI reference model.
[0036] Data frame 1a contains various data. For reference, the top row of Fig. 4 shows the division by layer of the OSI reference model. The bottom row of Fig. 4 shows the data size of each data in bytes. The leftmost column of Fig. 4 is a legend.
[0037] The data frame 1a includes, for example, a destination device ID 10, a source device ID 11, and a common data structure 12. The destination device ID 10 is an identifier for identifying the destination device. The source device ID 11 is an identifier for identifying the source device. The destination device and the source device may be motor units having a communication function. The identifier is, for example, an ID (device ID) assigned to each device without duplication, or an IP address. The common data structure 12 is a data structure including commands 1 or 2 described below.
[0038] FIG. 5 shows the common data structure 12 .
[0039] The common data structure 12 has a data length field 12a, an action command field 12b, an attribute command field 12c, and a data field 12d.
[0040] The data length field 12 a indicates the total number of bytes in the common data structure 12 .
[0041] The action command field 12b indicates an action command for operating a motor. The action command is described by a numerical value (binary notation) corresponding to the action command. Examples of action commands are Write Data, Read Data, Execution, and Connect.
[0042] The attribute command field 12c indicates an attribute command related to the motor. The attribute command is also described by a numerical value (binary notation) corresponding to the command. Examples of the attribute command include a present angle, a target angle, an angle limit, and a serial number. Number).
[0043] Data for the attribute command field 12c is written in the data field 12d. Examples of the data include an angle setting value, a rotation speed setting value, and a serial number value.
[0044] The common data structure described above has a relatively short data length, for example, within the range of 3 to 7 bytes. Note that another communication protocol, EtherCAT (registered trademark), has a size of 32 bytes, which can eliminate confusion during communication and reduce line occupation. Furthermore, the operation commands and attribute commands are specified separately, making it easy for users (programmers) to understand.
[0045] [Example of identifiers indicating destination motor unit and source motor unit] The following describes an example in which motor unit 106A wants to know the current rotation speed of motor unit 106B. In this specification and drawings, values described in the common data structure are expressed in binary or hexadecimal. These are merely different formats, and are selected based on the space on the drawings. Those skilled in the art will understand that these are essentially the same. Hexadecimal values are preceded by "0x".
[0046] The motor unit 106A transmits "the identifier of the motor unit 106A+a request for the current rotation speed" to the motor unit 106B. The identifier of the motor unit 106A is described in the transmission source device ID 11 (FIG. 4) indicating the motor unit 106A.
[0047] 6 shows an example of a data frame 2a during communication according to the RS-485 standard. The data frame 2a corresponds to the data frame 1a in FIG.
[0048] In the data frame 2a, one byte (8 bits) of data "00000010" including a 7-bit binary value "0000010" indicating the motor unit 106B is described as the destination device ID 10, and one byte (8 bits) of data "00000001" including a 7-bit binary value "0000001" indicating the motor unit 106A is described as the source device ID 11. The data described in the destination device ID and source device ID will be described in detail later.
[0049] In addition, in the common data structure 12, a one-byte value "0x01" corresponding to a "Read Data" command indicating data reading is described as an operation command field 12b. In addition, a two-byte value "0x00, 0x21" corresponding to a "Present Speed" indicating the current rotation speed is described in the attribute command field 12c. The other data fields are not particularly related to this disclosure. Therefore, a description of the other data fields is omitted.
[0050] The motor unit 106B receives, for example, a data frame 2a including a command addressed to itself. In this case, the processor 112B of the motor unit 106B refers to a table stored in the memory 113B based on the identifier added as the sender ID, and identifies that the motor unit that transmitted the data frame is, for example, the motor unit 106A.
[0051] The motor unit 106B interprets the motion commands and attribute commands included in the common data structure 12 of the data frame 2a, and reads, for example, the current rotation speed of the joint motor 116B. As a result, the motor unit 106B can transmit "sender ID information (motor unit 106B) + current rotation speed information" to the motor unit 106A. Note that a specific description of the data frame transmitted by the motor unit 106B will be omitted. Note that the motor unit 106B may transmit a reception response command indicating that the command has been received to the motor unit 106A immediately after receiving the command.
[0052] [Storage of identifiers] Hereinafter, a method for storing identifiers in the data areas of the destination device ID 10 and the source device ID 11 (hereinafter, these may be collectively referred to simply as "device IDs") in the data frame 1a according to this embodiment will be described. As shown in FIG. 4, the size of the area of the destination device ID 10 and the size of the area of the source device ID 11 in the data frame 1a according to this embodiment are each 1 to m bytes (any size). According to this embodiment, the length of the storage area for the device ID in the data frame 1a can be extended to a desired length.
[0053] 7 is a schematic diagram showing a method of storing a device ID in a data frame 1a. In the method of storing an identifier described below, the length of the device ID is extended by 7 bits at a time, but the method is not limited to this.
[0054] In this embodiment, the storage area for the device ID (hereinafter referred to as the "identifier storage area") has a length of 1 to m bytes (any length) as described above. In each 1-byte (8-bit) data area that constitutes the identifier storage area, a value indicating area extension information is stored in the first bit. The area extension information is information that indicates whether the data area immediately following the data area in which the area extension information is stored is also a data area that constitutes the same identifier storage area.
[0055] The position of the area in which the area extension information is stored within the 1-byte data area is not limited to the first bit, but may be any other predetermined position (any of the second to eighth bits).
[0056] In this embodiment, when the value of the area expansion information is "1", it indicates that the immediately succeeding data area is also the same identifier storage area, and when the value of the area expansion information is "0", it indicates that the immediately succeeding data area is not the same identifier storage area.
[0057] For example, one bit, such as the first bit of the data area, is used as an area to store area extension information, so the length of the device ID that can be stored in a 1-byte data area is up to 7 bits. Therefore, if the size of the device ID is 7 bits or less, the entire device ID can be stored in one data area, so the first bit where area extension information is stored is stored with the value "0".
[0058] For example, as shown in FIG. 7, when the device ID is "1001011", since the size is 7 bits, "0" is stored in the first bit, and the device ID "1001011" is stored in the second to eighth bits.
[0059] The terminal receiving data frame 1a can recognize that the data area immediately following the identifier storage area is not the same identifier storage area because a "0" is stored in the first bit of the data area of the identifier storage area.
[0060] On the other hand, if the size of the device ID is 8 bits or more, it is not possible to store the entire device ID in one data area, so multiple data areas are used as the same identifier storage area, and one device ID is divided and stored in each of the multiple data areas.
[0061] For example, as shown in FIG. 7, if the device ID is "11010101011100", the size is 14 bits, so the device ID is divided and stored in two data areas. A "1" is stored in the first bit of the first data area. This indicates that the second data area immediately following is also an area for storing the same identifier. Then, the second to eighth bits of the first data area store "1101010", which is the value of the first to seventh bits of the device ID.
[0062] The first bit of the second data area is set to "0". This indicates that the third data area immediately following is not the same identifier storage area. The second to eighth bits of the second data area are set to "1011100", which is the value of the eighth to fourteenth bits of the device ID.
[0063] Also, for example, as shown in FIG. 7, if the device ID is "010111000110100101101", the size is 21 bits, so the device ID is divided and stored in three data areas. A "1" is stored in the first bit of the first data area. This indicates that the second data area immediately following is also an area for storing the same identifier. Then, the second to eighth bits of the first data area store "0101110", which is the value of the first to seventh bits of the device ID.
[0064] A "1" is also stored in the first bit of the second data area. This indicates that the third data area immediately following is also an area that stores the same identifier. The second through eighth bits of the second data area then store "0011010", which is the value of the 8th through 14th bits of the device ID.
[0065] The first bit of the third data area is set to "0". This indicates that the fourth data area that immediately follows is not the same identifier storage area. The second through eighth bits of the third data area are set to "0101101", which is the value of the 15th through 21st bits of the device ID.
[0066] In this way, area extension information indicating whether the immediately following data area is the same identifier storage area or not is stored in each data area constituting the identifier storage area. This makes it possible to make the length of the identifier storage area variable. Because the length of the identifier storage area can be appropriately set to match the length of the device ID, it is possible to significantly reduce wasted area (unused area) compared to the conventional case where the length of the identifier storage area is fixed.
[0067] [Processor Functional Configuration] The following describes the functional configuration of the processor 112A shown in Fig. 3. The functional configuration of the processor 112B shown in Fig. 3 is similar to the functional configuration of the processor 112A described below.
[0068] 8 is a block diagram showing the functional configuration of the processor 112A. As shown in FIG. 8, the processor 112A includes a transmitting / receiving unit 121, a data processing unit 122, and a motor control unit 123.
[0069] The transmitting / receiving unit 121 receives a data frame 1a transmitted from another terminal (e.g., the motor unit 106B) connected to the communication network NW via the communication circuit 110A. The transmitting / receiving unit 121 also transmits a data frame 1a generated by the data processing unit 122 to another terminal (e.g., the motor unit 106B) connected to the communication network NW via the communication circuit 110A.
[0070] The data processing unit 122 processes data included in the data frame 1a received by the transmission / reception unit 121. The data processing unit 122 also includes a data generation unit (not shown) that generates the data frame 1a transmitted by the transmission / reception unit 121 and the data included in the data frame 1a.
[0071] Furthermore, the data processing unit 122 outputs to the motor control unit 123 a command based on the data of the above-mentioned common data structure 12 included in the data frame 1a received by the transmitting / receiving unit 121. Furthermore, the data processing unit 122 acquires, for example, information related to the joint motor 116A output from the motor control unit 123. The data processing unit 122 generates data to be included in the data frame 1a based on the acquired information.
[0072] Furthermore, when acquiring terminal identifier information (e.g., a device ID) included in the data frame 1a received by the transmitting / receiving unit 121, the data processing unit 122 reads out a first data area of a predetermined length located at a predetermined position (e.g., the beginning) of the identifier storage area storing the terminal identifier information. Then, based on area extension information included in the first data area, the data processing unit 122 determines whether or not to include in the identifier storage area a second data area of a predetermined length located immediately after the first data area.
[0073] Furthermore, when the data processing unit 122 determines that the second data area is to be included in the identifier storage area, it reads the second data area. Then, the data processing unit 122 determines, based on the area extension information included in the second data area, whether or not to include in the identifier storage area a third data area located immediately after the second data area.
[0074] In addition, when storing terminal identifier information (e.g., a device ID) in an identifier storage area included in a data frame 1a transmitted by the transmission / reception unit 121, the data processing unit 122 determines, based on the length of the terminal identifier information, whether or not to include in the identifier storage area not only a first data area of a specified length located at a specified position (e.g., the beginning) of the identifier storage area, but also a second data area of a specified length located immediately after the first data area.
[0075] Then, when the data processing unit 122 determines that the second data area is to be included in the identifier storage area, it stores predetermined area extension information (e.g., a value of "1") in the first data area. On the other hand, when the data processing unit 122 determines that the second data area is not to be included in the identifier storage area, it stores other predetermined area extension information (e.g., a value of "0") in the first data area.
[0076] Furthermore, when the data processing unit 122 determines that the second data area is to be included in the identifier storage area, it determines whether or not to include a third data area of a predetermined length located immediately after the second data area in the identifier storage area based on the length of the terminal identifier information. Then, when the data processing unit 122 determines that the third data area is to be included in the identifier storage area, it stores predetermined area extension information (for example, the value "1") in the second data area.
[0077] The motor control unit 123 controls the operation of, for example, the joint motor 116A, etc., in accordance with the command output from the data processing unit 122. In addition, the motor control unit 123 obtains, for example, information regarding the joint motor 116A, etc., and outputs the information to the data processing unit 122.
[0078] [Device identifier information reception process] An example of the reception process of terminal identifier information will be described below. Fig. 9 is a flowchart showing an example of the operation of processor 112A when receiving terminal identifier information. The process shown in the flowchart of Fig. 9 is started when transmitter / receiver 121 of processor 112A starts receiving data from the identifier storage area included in data frame 1a.
[0079] Data processing unit 122 of processor 112A reads out a 1-byte data area (first data area) from the beginning of data received by transmission / reception unit 121 (step S01). Data processing unit 122 temporarily stores the second to eighth bits of data from the read 1-byte data area in memory 113A (step S02).
[0080] If the value of the first bit of the read 1-byte data area (i.e., the value of the area extension information) is "1" (step S03: Yes), the data processing unit 122 determines that the data area (second data area) located immediately after the read data area is also included in the identifier storage area. Then, the data processing unit 122 further reads out the 1-byte data area located immediately after the read data area (step S01).
[0081] The data processing unit 122 repeats the above steps S01 to S03 until it detects a data area in which the value of the first bit of the read data area (ie, the value of the area extension information) is "0".
[0082] If the value of the first bit of the read 1-byte data area (i.e., the value of the area extension information) is "0" (step S03: No), data processing unit 122 determines that the data area located immediately after the data area is not included in the identifier storage area. Then, data processing unit 122 identifies the data temporarily stored in memory 113A in sequence as terminal identifier information (e.g., device ID, etc.) (step S04). This ends the operation of processor 112A shown in the flowchart of FIG. 9.
[0083] [Device identifier information transmission process] An example of the transmission process of terminal identifier information will be described below. Fig. 10 is a flowchart showing an example of the operation of processor 112A when transmitting terminal identifier information. The process shown in the flowchart of Fig. 10 is started when data processing unit 122 of processor 112A stores terminal identifier information (e.g., device ID) in the identifier storage area of data frame 1a.
[0084] The data processing unit 122 reads out terminal identifier information to be stored in the identifier storage area of the data frame 1a (step S11). If the data length of the read terminal identifier information is longer than 7 bits (step S12: Yes), the data processing unit 122 determines that it is not possible to store all of the terminal identifier information in one data area of 1 byte, and cuts out the first 7 bits of data of the terminal identifier information (step S13).
[0085] Then, the data processing unit 122 stores a value of "1" in the first bit (i.e., the storage area for area extension information) (step S14), and stores the extracted 7 bits of data in the second to eighth bits (step S15), and outputs 1 byte of data to the transmission / reception unit 121 (step S16).
[0086] Data processing unit 122 reads out the terminal identifier information after the above extraction (step S17). Then, data processing unit 122 repeats the processes of steps S12 to S17 until the data length of the read terminal identifier information (i.e., the remaining terminal identifier information after extraction) is within 7 bits.
[0087] If the data length of the read terminal identifier information is 7 bits or less (step S12: No), data processing unit 122 determines that all the remaining terminal identifier information can be stored in one data area of 1 byte.
[0088] Then, data processing unit 122 stores a value of "0" in the first bit (i.e., the storage area for area extension information) (step S18), and stores the remaining terminal identifier information in the second and subsequent bits (step S19), and outputs the 1-byte data to transmitting / receiving unit 121 (step S20). This ends the operation of processor 112A shown in the flowchart of FIG.
[0089] As described above, the communication function (hereinafter referred to as "communication device") of the terminal (motor unit 106A and motor unit 106B) according to one embodiment of the present invention is a communication device in a communication system (multi-motor system 103) in which communication devices provided in each of a plurality of terminals communicate with each other via a communication network. The communication device includes a receiver (transmitter / receiver 121) that receives a frame (data frame 1a) transmitted from another terminal, and a data processor 122 that processes data included in the frame received by the receiver. When acquiring terminal identifier information (e.g., device ID) included in the frame, the data processor 122 reads out a first data area of a predetermined length located at a predetermined position (e.g., the beginning) of an identifier storage area that stores the terminal identifier information, and determines whether or not to include a second data area of a predetermined length located immediately after the first data area in the identifier storage area based on area extension information included in the first data area.
[0090] As described above, the communication device provided in the terminal (motor unit 106A and motor unit 106B) according to an embodiment of the present invention includes a transmitter (transmitter / receiver 121) that transmits a frame (data frame 1a) to another terminal, and a data processor 122 that generates data to be included in the frame transmitted by the transmitter. When storing terminal identifier information (e.g., a device ID) in an identifier storage area included in a frame, the data processor 122 determines whether or not to include in the identifier storage area not only a first data area of a predetermined length located at a predetermined position (e.g., the beginning) of the identifier storage area, but also a second data area of a predetermined length located immediately after the first data area, based on the length of the terminal identifier information. Then, when the data processor 122 determines that the second data area is to be included in the identifier storage area, it stores predetermined area extension information (e.g., a value of "1") in the first data area.
[0091] By being equipped with the above-described configuration, a communication device according to one embodiment of the present invention can appropriately set the length of the identifier storage area to match the length of the terminal identifier information, thereby allowing the number of usable unique identifier information to be increased arbitrarily without reducing communication efficiency.
[0092] [Check process for non-compatible devices] In a communication system in which the number of pieces of usable unique identifier information can be set arbitrarily, the data length of the unique identifier information that can be recognized by each terminal connected to the same communication network may differ. As an example, consider a communication system in which terminals connected to the same communication network that can recognize unique identifier information with a data length of 1 byte (hereinafter referred to as "1-byte compatible terminals") and terminals that can recognize unique identifier information with a data length of 2 bytes (hereinafter referred to as "2-byte compatible terminals") are mixed.
[0093] In such a case, even if a 2-byte compatible terminal transmits 2 bytes of data to a 1-byte compatible terminal, the 1-byte compatible terminal cannot correctly recognize the contents of the received data. More generally, a 2-byte compatible terminal cannot recognize which terminal is a 1-byte compatible terminal.
[0094] However, by using the configuration of the communication device according to the present embodiment described above, a terminal capable of processing multiple bytes (e.g., a 2-byte compatible terminal) can check in advance for the presence of a terminal that only supports processing fewer bytes than the terminal in question (e.g., a 1-byte compatible terminal). Such a process for checking for non-compatible terminals will be described below. In the following example, a case will be described in which a 2-byte compatible terminal checks for the presence of a 1-byte compatible terminal.
[0095] 11 is a schematic diagram showing the flow of the process of checking for non-compliant terminals. It is assumed that the device ID of the 2-byte compatible terminal that checks for non-compliant terminals is "11110000000111" (data length: 14 bits). It is also assumed that at least one 1-byte compatible terminal is connected to the communication network NW, and that the device ID of one of the 1-byte compatible terminals is "0000010" (data length: 7 bits).
[0096] Since a 2-byte compatible terminal has its own device ID of 14 bits, the area size of the source device ID 11 in the data frame 1a shown in Fig. 4 is set to 2 bytes. As shown in Fig. 11, the data stored in the area of the source device ID 11 has a "1" stored in the first bit of the first byte and a "0" stored in the first bit of the second byte. Then, the 2nd to 8th bits of the first byte and the 2nd to 8th bits of the second byte are used to store the 14-bit device ID of the 2-byte compatible terminal.
[0097] Furthermore, a 2-byte compatible terminal stores test data for checking the presence of a non-compatible terminal in the destination device ID 10 area of the data frame 1a shown in Fig. 4. The test data is assumed to be predetermined data such as "000000000000000" (data length: 14 bits, all bits have the value "0") as shown in Fig. 11.
[0098] For a 2-byte compatible terminal, the test data is 14 bits, so the area size of the destination device ID 10 is set to 2 bytes. As shown in Fig. 11, the data stored in the area of the destination device ID 10 has "1" stored in the first bit of the first byte and "0" stored in the first bit of the second byte. Then, the 14-bit test data is stored using the second to eighth bits of the first byte and the second to eighth bits of the second byte.
[0099] The 2-byte compatible terminal stores test data in the destination device ID 10 field and broadcasts a data frame 1a in which its own device ID is stored in the source device ID 11 field to other terminals connected to the communication network NW.
[0100] Other terminals connected to the communication network NW each receive the broadcast data frame 1a. If the receiving terminal is a 2-byte compatible terminal, the 2-byte compatible terminal can correctly recognize that the test data is stored in the destination device ID 10 field and that the device ID of the source terminal is stored in the source device ID 11 field.
[0101] Here, for example, it is assumed that a rule is set in advance such that a terminal that can correctly recognize the test data and the device ID of the sending terminal does not respond to the sending terminal. Therefore, a 2-byte compatible terminal that receives the test data does not respond to the sending terminal.
[0102] On the other hand, if the receiving terminal is a 1-byte compatible terminal, the 1-byte compatible terminal can only recognize the first byte of data stored in the area of the destination device ID 10 and the first byte of data stored in the area of the source device ID 11. Therefore, the 1-byte compatible terminal cannot correctly recognize that the test data is stored in the area of the destination device ID 10, and cannot correctly recognize the device ID of the source terminal stored in the area of the source device ID 11.
[0103] However, a 1-byte compatible terminal can recognize that data longer than 2 bytes has been sent because the value of the first bit in the destination device ID 10 area is "1" or the value of the first bit in the source device ID 11 area is "1".
[0104] In this case, the 1-byte compatible terminal stores a value of "0" in the first bit of the area of the destination device ID 10 of the data frame 1a, and stores test response data in the second to eighth bits. The test response data is data for notifying the source terminal that the terminal itself is not compatible with 2-byte processing. The test response data is assumed to be predetermined data such as "0000000" (data length: 7 bits, all bits are "0") as shown in FIG. 11.
[0105] The 1-byte compatible terminal stores a value of "0" in the first bit of the source device ID 11 area of the data frame 1a, and stores its own 7-bit device ID "0000010" in the second to eighth bits. The 1-byte compatible terminal then stores test response data in the destination device ID 10 area, and broadcasts the data frame 1a in which its own device ID is stored in the source device ID 11 area to other terminals connected to the communication network NW. The reason for broadcasting here is that the 1-byte compatible terminal cannot recognize the device ID of the terminal that transmitted the test data, and therefore cannot identify the destination.
[0106] Next, the 2-byte compatible terminal that transmitted the test data receives data frame 1a transmitted from the 1-byte compatible terminal that transmitted the test response data. The 2-byte compatible terminal then recognizes the test response data stored in the destination device ID 10 field and the source 1-byte compatible terminal's device ID "0000010" stored in the source device ID 11 field. This allows the 2-byte compatible terminal to recognize that the terminal with the device ID "0000010" is a 1-byte compatible terminal (non-compatible terminal).
[0107] In this way, the 2-byte compatible terminal can obtain only the device ID of the 1-byte compatible terminal from the data frame 1a transmitted from the 1-byte compatible terminal. This allows the 2-byte compatible terminal to identify the non-compatible terminal (1-byte compatible terminal) that does not support 2-byte processing.
[0108] As described above, the communication system (multi-motor system 103) according to the above-described embodiment is a communication system in which a first communication device provided in at least one terminal (motor unit) that performs arithmetic processing on each data piece of a first data length (e.g., 2 bytes) and a second communication device provided in at least one terminal that performs arithmetic processing on each data piece of a second data length (e.g., 1 byte) that is shorter than the first data length communicate with each other via a communication network NW.
[0109] The first communication device includes a first transceiver that transmits and receives frames to and from other terminals, a first data generator that generates data included in a first frame that is a frame transmitted by the first transceiver, and a first data processor that processes data included in a second frame that is a frame transmitted by the second transceiver and received by the first transceiver. The first data generator stores terminal identifier information that identifies the first communication device in a source identifier storage area included in the first frame, and stores predetermined area extension information in a first data area of a predetermined length located at a predetermined position (e.g., the beginning) of the source identifier storage area.
[0110] The second communication device includes a second transceiver that transmits and receives frames to and from another terminal, a second data generator that generates data included in a second frame that is a frame transmitted by the second transceiver, and a second data processor that processes data included in a first frame that is a frame transmitted by the first transceiver and received by the second transceiver. When predetermined area extension information is stored in the first data area, the second data generator stores terminal identifier information that identifies the second communication device in a source identifier storage area included in the second frame, and stores predetermined test response data in a destination identifier storage area included in the second frame.
[0111] If specified test response data is stored in a destination identifier storage area included in the second frame, the first communication device determines that the second communication device is a communication device that is unable to perform arithmetic processing on each data piece of the first data length.
[0112] With the above configuration, a terminal capable of processing multiple bytes (e.g., a terminal capable of 2 bytes) can check in advance for the existence of a terminal that can only process fewer bytes than the terminal in question (e.g., a terminal capable of 1 byte).
[0113] Although the embodiment of the present invention has been described in detail above, the specific configuration is not limited to the above, and various design changes, etc. are possible within the scope that does not deviate from the gist of the present invention.
[0114] In addition, a part or all of the communication devices provided in the terminals (motor unit 106A and motor unit 106B) in the above-mentioned embodiment may be realized by a computer. In that case, a program for realizing this control function may be recorded in a computer-readable recording medium, and the program recorded in the recording medium may be read into a computer system and executed to realize the control function.
[0115] In this context, the term "computer system" refers to a computer system built into a communication device, including hardware such as the OS and peripheral devices. Additionally, the term "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, as well as storage devices such as hard disks built into a computer system.
[0116] Furthermore, the term "computer-readable recording medium" may include a medium that dynamically holds a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, and a medium that holds a program for a certain period of time, such as a volatile memory inside a computer system that serves as a server or client in such a case. The above program may be one that realizes part of the above-mentioned functions, or may be one that can realize the above-mentioned functions in combination with a program already recorded in the computer system.
[0117] The communication device in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the communication device may be individually processed, or may be integrated into a processor in part or in whole. The integrated circuit may be realized by a dedicated circuit or a general-purpose processor, not limited to an LSI. If an integrated circuit technology that can replace an LSI appears due to the progress of semiconductor technology, an integrated circuit based on that technology may be used. [Explanation of symbols]
[0118] 1a data frame, 2a data frame, 12 common data structure, 12a data length field, 12b action command field, 12c attribute command field, 12d data field, 21 source IP address, 30 communication robot, 30b communication robot, 32a motor unit, 32b motor unit, 32c motor unit, 32d motor unit, 32e motor unit, 103 multi-motor system system, 104A... joint mechanism, 104B... joint mechanism, 106A... motor unit, 106B... motor unit, 110A... communication circuit, 110B... communication circuit, 111A... buffer, 111B... buffer, 112A... processor, 112B... processor, 113A... memory, 113B... memory, 114A... motor drive circuit, 114B... motor drive circuit, 116A... joint motor, 116B... joint motor, 121... transmitter / receiver, 122... data processing unit, 123... motor control unit
Claims
1. A communication device in a communication system in which a plurality of terminals communicate with each other via a communication network, the communication device comprising: A receiving unit for receiving a frame transmitted from another terminal; a data processing unit that processes data included in the frame received by the receiving unit; Equipped with The data processing unit includes: When acquiring terminal identifier information included in the frame, a first data area of a predetermined length located at a predetermined position in an identifier storage area for storing the terminal identifier information is read, and based on area extension information included in the first data area, it is determined whether or not a second data area of the predetermined length located immediately after the first data area is to be included in the identifier storage area; When it is determined that the second data area is to be included in the identifier storage area, the second data area is read, and based on area extension information included in the second data area, it is determined whether or not a third data area located immediately after the second data area is to be included in the identifier storage area. Communications equipment.
2. A communication device in a communication system in which a plurality of terminals communicate with each other via a communication network, the communication device comprising: A transmitter for transmitting frames to other terminals; a data processing unit that generates data to be included in the frame to be transmitted by the transmission unit; Equipped with The data processing unit includes: when storing terminal identifier information in an identifier storage area included in the frame, determining, based on a length of the terminal identifier information, whether or not to include in the identifier storage area not only a first data area of a predetermined length located at a predetermined position in the identifier storage area but also a second data area of the predetermined length located immediately after the first data area; if it is determined that the second data area is to be included in the identifier storage area, storing predetermined area extension information in the first data area, and determining whether or not to include in the identifier storage area a third data area of the predetermined length located immediately after the second data area based on the length of the terminal identifier information; When it is determined that the third data area is to be included in the identifier storage area, predetermined area extension information is stored in the second data area. Communications equipment.
3. A communication system in which a first communication device provided in at least one terminal performing an arithmetic process for each data piece having a first data length and a second communication device provided in at least one terminal performing an arithmetic process for each data piece having a second data length shorter than the first data length communicate with each other via a communication network, The first communication device is a first transceiver for transmitting and receiving frames to and from other terminals; a first data generating unit that generates data to be included in a first frame to be transmitted by the first transmitting / receiving unit; a first data processing unit that processes data included in a second frame received by the first transceiver; Equipped with The first data generation unit is storing a terminal identifier for identifying the first communication device in a source identifier storage area included in the first frame, and storing predetermined area extension information in a first data area of a predetermined length located at a predetermined position in the source identifier storage area; The second communication device is A second transceiver that transmits and receives the frame to and from another terminal; a second data generating unit configured to generate data to be included in the second frame transmitted by the second transmitting / receiving unit; a second data processing unit that processes data included in the first frame received by the second transceiver; Equipped with If predetermined area extension information is stored in the first data area, The second data generation unit is storing predetermined test response data in a destination identifier storage area included in the second frame; The first communication device is When predetermined test response data is stored in a destination identifier storage area included in the second frame, it is determined that the second communication device is a communication device that cannot perform arithmetic processing for each data piece of the first data length. Communication systems.
4. The first frame is A frame transmitted from the first transceiver, The second frame is A frame transmitted from the second transceiver unit The communication system according to claim 3.
5. The first transceiver unit is broadcasting the first frame to other communication devices communicatively connected to the communication network; The second transceiver unit is Broadcasting the second frame to other communication devices communicatively connected to the communication network. The communication system according to claim 3 or 4.
6. A communication method in a communication system in which communication devices provided in a plurality of terminals communicate with each other via a communication network, comprising: a receiving step of receiving a frame transmitted from another terminal; a data processing step of processing data included in the frame received in the receiving step; In the data processing step, When acquiring terminal identifier information included in the frame, a first data area of a predetermined length located at a predetermined position in an identifier storage area for storing the terminal identifier information is read, and based on area extension information included in the first data area, it is determined whether or not a second data area of the predetermined length located immediately after the first data area is to be included in the identifier storage area; a determination step of reading the second data area when it is determined that the second data area is to be included in the identifier storage area, and determining whether or not a third data area located immediately after the second data area is to be included in the identifier storage area based on area extension information included in the second data area; A communication method comprising:
7. A communication method in a communication system in which communication devices provided in a plurality of terminals communicate with each other via a communication network, comprising: a transmitting step of transmitting a frame to another terminal; a data processing step for generating data to be included in the frame transmitted by the transmitting step; In the data processing step, a determination step of determining, when storing terminal identifier information in an identifier storage area included in the frame, whether or not to include in the identifier storage area not only a first data area of a predetermined length located at a predetermined position in the identifier storage area but also a second data area of the predetermined length located immediately after the first data area, based on the length of the terminal identifier information; if it is determined that the second data area is to be included in the identifier storage area, storing predetermined area extension information in the first data area, and determining whether or not to include in the identifier storage area a third data area of the predetermined length located immediately after the second data area based on the length of the terminal identifier information; a storing step of storing predetermined area extension information in the second data area when it is determined that the third data area is to be included in the identifier storage area; A communication method comprising:
8. A communication method in a communication system, in which a first communication device provided in at least one terminal performing an arithmetic process for each data piece having a first data length and a second communication device provided in at least one terminal performing an arithmetic process for each data piece having a second data length shorter than the first data length communicate with each other via a communication network, a first data generation step of generating data to be included in a first frame to be transmitted to another terminal by the first communication device; a first data processing step of processing data included in a second frame received from another terminal; In the first data generating step, a first storage step of storing a terminal identifier for identifying the first communication device in a source identifier storage area included in the first frame, and storing predetermined area extension information in a first data area of a predetermined length located at a predetermined position in the source identifier storage area; a second data generation step of generating data to be included in the second frame to be transmitted to another terminal by the second communication device; a second data processing step of processing data included in the first frame received from another terminal; If predetermined area extension information is stored in the first data area, In the second data generating step, a second storage step of storing predetermined test response data in a destination identifier storage area included in the second frame; a determining step of determining, by the first communication device, when predetermined test response data is stored in a destination identifier storage area included in the second frame, that the second communication device is a communication device that cannot perform arithmetic processing for each data piece of the first data length; A communication method comprising:
9. The first frame is a frame transmitted by the first communication device, The second frame is A frame transmitted by the second communication device The communication method according to claim 8.
10. The first communication device is broadcasting the first frame to other communication devices communicatively connected to the communication network; The second communication device is Broadcasting the second frame to other communication devices communicatively connected to the communication network. The communication method according to claim 8 or 9.
11. In a communication system in which a communication device provided in each of a plurality of terminals communicates with each other via a communication network, a receiving step of receiving a frame transmitted from another terminal; a data processing step of processing data included in the frame received in the receiving step; In the data processing step, When acquiring terminal identifier information included in the frame, a first data area of a predetermined length located at a predetermined position in an identifier storage area for storing the terminal identifier information is read, and based on area extension information included in the first data area, it is determined whether or not a second data area of the predetermined length located immediately after the first data area is to be included in the identifier storage area; a determination step of reading the second data area when it is determined that the second data area is to be included in the identifier storage area, and determining whether or not a third data area located immediately after the second data area is to be included in the identifier storage area based on area extension information included in the second data area; A program for executing.
12. In a communication system in which a communication device provided in each of a plurality of terminals communicates with each other via a communication network, a transmitting step of transmitting a frame to another terminal; a data processing step for generating data to be included in the frame transmitted by the transmitting step; In the data processing step, when storing terminal identifier information in an identifier storage area included in the frame, determining, based on a length of the terminal identifier information, whether or not to include in the identifier storage area not only a first data area of a predetermined length located at a predetermined position in the identifier storage area but also a second data area of the predetermined length located immediately after the first data area; a storing step of storing predetermined area extension information in the first data area when it is determined that the second data area is to be included in the identifier storage area; and determining whether or not to include the third data area of the predetermined length located immediately after the second data area in the identifier storage area based on the length of the terminal identifier information; a determining step of storing predetermined area extension information in the second data area when it is determined that the third data area is to be included in the identifier storage area; A program for executing.
13. A computer of a communication system in which a first communication device provided in at least one terminal performing an arithmetic process for each data piece having a first data length and a second communication device provided in at least one terminal performing an arithmetic process for each data piece having a second data length shorter than the first data length communicate with each other via a communication network, a first data generation step of generating data to be included in a first frame to be transmitted to another terminal by the first communication device; a first data processing step of processing data included in a second frame received from another terminal; In the first data generating step, a first storage step of storing a terminal identifier for identifying the first communication device in a source identifier storage area included in the first frame, and storing predetermined area extension information in a first data area of a predetermined length located at a predetermined position in the source identifier storage area; a second data generation step of generating data to be included in the second frame to be transmitted to another terminal by the second communication device; a second data processing step of processing data included in the first frame received from another terminal; If predetermined area extension information is stored in the first data area, In the second data generating step, a second storage step of storing predetermined test response data in a destination identifier storage area included in the second frame; a determining step of determining, by the first communication device, that the second communication device is a communication device that cannot perform arithmetic processing for each data piece of the first data length when predetermined test response data is stored in a destination identifier storage area included in the second frame; A program for executing.
14. The first frame is a frame transmitted by the first communication device, The second frame is a frame transmitted by the second communication device; The program according to claim 13.
15. The first communication device, broadcasting the first frame to other communication devices communicatively connected to the communication network; The second communication device, broadcasting the second frame to other communication devices communicatively connected to the communication network; The program according to claim 13 or 14, further comprising:
Citation Information
Patent Citations
Non-volatile semiconductor storage device
JP1986030077A
Address generation method, apparatus, and program, and address delivery method
JP2017143364A
Sensor and receiving device in sensor system
WO2012160825A1
