Communication method, communication device, communication system
The communication method optimizes data processing in FA and IA systems by transmitting simplified message packets with preset storage areas, addressing inefficiencies in frequent detailed information requirements and reducing communication time.
Patent Information
- Application Number
- JP2022199738
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-07-30
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Existing communication methods in FA and IA systems face inefficiencies when frequent determination of detailed information is required, leading to prolonged communication times.
A communication method that transmits simplified message packets by omitting certain areas of information, such as address and length information, and utilizes preset areas in the storage unit to store necessary details, allowing for efficient data processing.
This approach reduces communication time by minimizing the data amount transmitted, enhancing efficiency in high-frequency data processing.
Smart Images

Figure 0007715700000001 
Figure 0007715700000002 
Figure 0007715700000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to the field of communication methods, communication devices, and communication systems for transmitting and receiving message packets between devices. [Background technology]
[0002] In fields such as FA (Factory Automation) and IA (Industrial Automation), for example, driving a robot or managing its operating status is performed by sending and receiving message packets between devices.
[0003] Such message packets may be sent and received at high frequency. For example, in bilateral control using servo motors, the load detected by one servo motor is read and instructions to other servo motors are changed according to the read results, which requires many message packets to be sent and received between each device in a short period of time.
[0004] Therefore, it is desirable to send and receive message packets with high efficiency in order to perform control frequently and smoothly. In Patent Document 1 below, a determination is made as to whether or not detailed information needs to be acquired, and detailed information is acquired only when it is determined that detailed information needs to be acquired, and simple information is acquired otherwise, thereby improving the efficiency of data processing. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Laid-Open No. 2010-049364 Summary of the Invention [Problem to be solved by the invention]
[0006] However, in the method described in Patent Document 1, it is difficult to improve the efficiency of data processing in a situation where it is frequently determined that detailed information needs to be obtained.
[0007] The present invention has been made in view of such problems, and an object thereof is to shorten the time required for communication.
Means for Solving the Problems
[0008] The communication method according to the present invention is a communication method of a communication device including a communication control unit that performs communication control, a transmission unit that transmits a message packet, and a reception unit that receives a message packet. The communication method includes first information indicating a type of processing to be executed by a destination device that is a device to which the message packet is to be transmitted The first area where it is stored and second information for specifying the destination device The second area where it is stored and third information indicating details of the processing The third area where it is stored Among these, at least a part of the third Area is omitted, and a simple message packet is transmitted Area is what it is. and the first information is information indicating a read process, and the partial area is an area where address information indicating a read position on the storage unit of the target device is stored and an area where length information indicating the length of data to be read is stored, and the storage unit stores information of the type stored in the partial area of the third area The third information differs depending on the type of processing specified by the first information. For example, when the first information is information indicating a read process, the third information includes address information of an area on the storage unit that is the read position and length information indicating the length of the data to be read. Further, when the first information is information indicating a write process, the third information includes address information of an area on the storage unit that is the write position and length information indicating the length of the write data. In the simple message packet, for example, the address information and the length information are omitted.
[0009] The communication system according to the present invention is a communication system configured by a plurality of communication devices. Each communication device includes a communication control unit that performs communication control, a transmission unit that transmits a message packet, and a reception unit that receives a message packet. The communication control unit includes first information indicating a type of processing to be executed by a destination device that is a device to which the message packet is to be transmittedThe first area where it is stored and second information for identifying the target device The second area where it is stored and third information indicating details of the processing The third area where it is stored Of these, a simplified message packet Area omitting at least a part of the third Area is transmitted. and the first information is information indicating a read process or a write process, and the partial area is an area where address information indicating a read position or a write position on the storage unit of the target device is stored and an area where length information indicating the length of data to be read or written is stored, and the storage unit stores information of the type stored in the partial area of the third area That's what it is.
Advantages of the Invention
[0010] According to the present invention, the time required for communication can be shortened.
Brief Description of the Drawings
[0011]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Embodiments for Carrying Out the Invention
[0012] Hereinafter, the embodiments will be described in the following order. <1. System Configuration> <2. Configuration of Message Packet> <2-1. Normal Message Packet> <2-2. Return Packet> <2-3. Simple Message Packet 1> <2-4. Simple Message Packet 2> <2-5. Simple Message Packet 3> <3. Flowchart> <3-1. Processing of Control Device> <3-2. Processing of Servo Motor> <4. Modification Example> <5. Summary>
[0013] <1. System Configuration> The configuration of a communication system S including a servo motor 1 as a first communication device and a control device 2 as a second communication device will be described with reference to FIG. 1.
[0014] The communication system S is configured to include a plurality of servo motors 1 and one control device 2. Note that the communication system S may be configured to include one servo motor 1 and one control device 2, or may be configured to include a plurality of servo motors 1 and a plurality of control devices 2.
[0015] The servo motor 1 is a device to be controlled. Also, the control device 2 is a device that controls the device to be controlled.
[0016] The servo motor 1 is enabled to transmit and receive information to and from the control device 2, for example, by a wired connection.
[0017] As another method, for example, a device to be controlled such as a robot may include a single wireless communication unit, and the control device 2 may perform wireless communication only with the wireless communication unit of the robot. In that case, the wireless communication unit included in the robot may control each part by outputting a control instruction or the like to the servo motors 1 provided in each part of the robot, for example, by wire, based on the content of the message packet received from the control device 2. That is, it may be impossible for the servo motor 1 to communicate directly with the control device 2. Also, in this case, the wireless communication unit included in the robot may be regarded as the control device 2. That is, the control device 2 receives various information from other information processing devices and outputs control instructions or the like to each servo motor 1 that is wired to the control device 2.
[0018] Note that the servo motor 1 and the control device 2 may perform wireless communication. In the wireless communication in this case, for example, the vicinity of each frequency band such as 429 MHz (megahertz), 920 MHz, 1.2 GHz (gigahertz), 2.4 GHz, 5 GHz, 6 GHz is used.
[0019] An example of the configuration of the servo motor 1 is shown in FIG. 2. The servo motor 1 includes a communication unit 11 that performs wired communication with other devices via a connector or the like, a communication control unit 12 that controls the communication unit 11, a storage unit 13, a drive control unit 14, a drive unit 15, and a power connector 16.
[0020] The communication unit 11 includes a transmission unit 11s and a reception unit 11r. The transmission unit 11s and the reception unit 11r are configured as, for example, an IC (Integrated Circuit). The transmission unit 11s and the reception unit 11r may be configured as one IC in which a modulation unit, a power amplification unit, a high-frequency amplification unit, and a demodulation unit are integrally formed. Note that the transmission unit 11s and the reception unit 11r may be configured as different ICs.
[0021] The transmission unit 11s executes a process of transmitting the packet passed from the communication control unit 12 to the control device 2 as a return packet. The reception unit 11r receives the message packet transmitted from the control device 2 and executes a process of passing it to the communication control unit 12. Note that the reception unit 11r is capable of receiving a simplified message packet in which some information is omitted in addition to the normal message packet.
[0022] The communication control unit 12 is configured to have, for example, a CPU (Central Processing Unit) or the like, and performs a process of creating a return packet, reads the header area of the received message packet, and performs a process according to the content (command) thereof.
[0023] The storage unit 13 is configured to have a ROM (Read Only Memory), a RAM (Random Access Memory), or the like, and stores various programs and setting data executed by the communication control unit 12 and the drive control unit 14, or a device ID (Identification) for uniquely identifying the servo motor 1. In addition, the storage unit 13 stores complementary information for executing appropriate processing based on the simple message packet. This complementary information is information pre-stored before the reception of the simple message packet, and is referred to as "preset information P". Also, the area in the storage unit 13 where the preset information P is stored is referred to as the preset area PA. The preset information P and the preset area PA will be described later in detail.
[0024] In addition, the storage unit 13 also functions as a work area when the communication control unit 12 and the drive control unit 14 execute various processes.
[0025] The drive control unit 14 drives the drive unit 15 of the servo motor 1 based on the instruction of the communication control unit 12 or based on the setting information stored in the storage unit 13. When the drive unit 15 is driven by the drive control unit 14, the posture etc. of a robot or the like which is the control target to which the servo motor 1 is attached changes.
[0026] In addition, the drive control unit 14 is capable of detecting the drive state etc. of the drive unit 15. Specifically, the drive control unit 14 is capable of detecting temperature, angle, voltage, speed, etc. These detection information are stored in a predetermined area of the storage unit 13.
[0027] Note that in FIG. 1, an example in which the servo motor 1 has a communication function is shown, but the part having the communication function with the servo motor 1 may be configured as a separate device. In that case, the part having the communication function with the servo motor 1 is connected by, for example, step-synchronous serial communication (RS232C) or short-range wireless communication.
[0028] The power connector 16 supplies the operating power supply voltage input from the outside to each part of the servo motor 1 (for example, the communication control unit 12, the transmission unit 11s, the reception unit 11r, the storage unit 13, etc.). The power connector 16 may be provided integrally with, for example, a connector for wired communication. That is, the servo motor 1 and the control device 2 may be connected by a single cable including a power supply line and a communication line. Alternatively, a power supply unit that generates a power supply voltage may be provided instead of the power connector 16. The power supply unit in this case is, for example, a lithium ion battery, a dry battery, or the like. Note that illustration of the power supply voltage lines to each unit is omitted to avoid complication.
[0029] Next, a configuration example of the control device 2 is shown in FIG. 3. The control device 2 includes a communication unit 21 that performs wired communication with other devices via a connector, a control unit 22, an output unit 23, an input unit 24, a storage unit 25, a drive 26, and a power supply unit 27, and each unit is connected via a bus B so as to be able to communicate with each other.
[0030] The communication unit 21 includes a transmission unit 21s and a reception unit 21r. The transmission unit 21s and the reception unit 21r may be configured as the same IC or different ICs.
[0031] The communication unit 21 transmits a message packet and receives a return packet based on an instruction from the communication control unit 22a of the control unit 22. Specifically, the transmission unit 21s executes a process of transmitting the message packet passed from the communication control unit 22a to the servo motor 1. The reception unit 21r receives the return packet transmitted from the servo motor 1 and executes a process of passing it to the communication control unit 22a. Note that the transmission unit 21s is capable of transmitting a simple message packet in addition to a normal message packet.
[0032] The control unit 22 includes a CPU, a ROM, a RAM, etc., and realizes various functions by executing a program. Specifically, the control unit 22 functions as a communication control unit 22a and an application function unit 22b.
[0033] As described above, the communication control unit 22a causes the communication unit 21 to generate and transmit and receive a message packet.
[0034] The application function unit 22b performs various processes for operating an application for controlling and managing a plurality of servo motors 1. For example, in order to change the posture of the robot to which the servo motor 1 is attached according to an operation input by the user via the application, the communication control unit 22a is made to execute generation and transmission of a message packet.
[0035] The application function unit 22b executes a display process for causing an interface for receiving a user operation to be displayed on an output unit 23 such as a monitor.
[0036] Further, the application function unit 22b may perform a display process for presenting the operation state and the like of each servo motor 1 to the user.
[0037] The output unit 23 is a display unit such as an LCD (Liquid Crystal Display) or an organic EL (Electro-Luminescence) panel, a voice output unit such as a speaker, and the like. The output unit 23 is provided integrally or separately from the control device 2. On the display unit as the output unit 23, various information and menu displays are made by the display process by the application function unit 22b.
[0038] The input unit 24 is various operators and operation devices such as a keyboard, a mouse, keys, a dial, a touch panel, a touch pad, a remote controller, and the like. These input units 24 detect a user operation and output a detection signal to the control unit 22.
[0039] The storage unit 25 is configured as a hard disk, a solid-state memory, or the like, and stores programs and data used for processes executed by the control unit 22.
[0040] The drive 26 is capable of mounting a removable storage medium 28 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory. Information read from the removable storage medium 28 is stored in the storage unit 25, for example.
[0041] The power supply unit 27 generates the necessary power supply voltages for each of the above units and supplies the operating power supply voltage to each unit of the control device 2. For example, the power supply unit 27 converts the input commercial AC voltage into a DC voltage and supplies it to each unit. Note that the illustration of the power supply voltage lines to each unit is omitted to avoid complication.
[0042] <2. Configuration of Message Packet> In the present embodiment, normal message packets and simple message packets are transmitted and received. Each will be described with reference to the attached drawings.
[0043] <2-1. Normal Message Packet> An example of a normal message packet is shown in FIG. 4. The normal message packet is composed of a header area Ar1, an ID area Ar2, an address area Ar3, a data length area Ar4, a data area Ar5, and a CRC (Cyclic Redundancy Check) area Ar6.
[0044] The header area Ar1 is an area where a 1-byte command is stored. Examples of commands include a read command, a write command, a preset read command, a preset write command, etc. In addition, various commands are prepared, such as a command for checking whether the servo motor 1 is operating normally.
[0045] The ID area Ar2 is an area where 1-byte information representing the device ID for specifying the device to be transmitted is stored. For example, in a read command or a write command, the device ID of the servo motor 1 to be read or the servo motor 1 to be written is stored in the ID area Ar2.
[0046] The address area Ar3 is an area where 1-byte information representing the address on the storage unit 13 of the servo motor 1 is stored. In the case of a read command, the starting address of the area to be read is stored in the address area Ar3. Also, in the case of a write command, the starting address of the area to be written is stored in the address area Ar3.
[0047] The data length area Ar4 is an area where 1-byte information indicating the data length is stored. The area to be read or the area to be written can be specified by the starting address stored in the address area Ar3 and the data length stored in the data length area Ar4.
[0048] The data area Ar5 is an area where n bytes (n is a positive integer) of information written by a write command are stored. The number of bytes of the information stored in the data area Ar5 varies depending on the size of the area to be written.
[0049] In the CRC area Ar6, 1-byte redundant code for detecting errors in data other than the CRC area is stored. Note that the redundant code for detecting only the errors in the data area Ar5 may be stored in the CRC area Ar6. Also, in the CRC area Ar6, as a code for error checking other than CRC, for example, something using BCC (Block Check Character) etc. may be stored. That is, the method of error checking (error correction) is not limited.
[0050] Note that Fig. 4 extracts only the main part of the configuration of the message packet, and the actual message packet may include a preamble area, a synchronization code area, a control data area, etc. in addition to the areas shown in Fig. 4.
[0051] An example of a normal message packet transmitted from the control device 2 to the servo motor 1 to read the state of the servo motor 1 is shown in Fig. 5. For numerical values in hexadecimal notation, add "0x" at the beginning. That is, when representing the decimal number "10" in 1-byte hexadecimal, it is described as "0x0A".
[0052] In the header area Ar1, 0xF1 is stored. 0xF1 represents a read command for one servo motor 1.
[0053] In the ID area Ar2, 0x03 is stored. This information indicates that it is a normal message packet transmitted to the servo motor 1 with the device ID "3". That is, the example shown in Fig. 5 indicates that it is a message packet for reading information from the storage unit 13 of the servo motor 1 with the device ID "3".
[0054] In the address area Ar3, 0x16 is stored. This information is the address of the area in the storage unit 13 of the servo motor 1 where the sensing data about the temperature is stored.
[0055] In the data length area Ar4, 0x01 is stored. This information indicates that the data to be read is 1 byte.
[0056] The CRC area Ar6 omits the notation of specific numerical values.
[0057] That is, the example of the normal message packet shown in Fig. 5 is a packet for reading the temperature data sensed in one servo motor 1 assigned the device ID "3".
[0058] <2-2. Return Packet> Next, an example of a return packet sent from the servo motor 1 is shown in FIG. 6. The return packet shown in FIG. 6 is a return packet that is returned from the servo motor 1 when the normal message packet shown in FIG. 5 is sent to the servo motor 1 with the device ID set to "3".
[0059] The return packet sent from the servo motor 1 is configured to include, for example, a header area Ar1, an ID area Ar2, a flag area Ar7, a data area Ar5, and a CRC area Ar6.
[0060] In the header area Ar1, "0x81" is stored as information indicating that it is a return for a read command.
[0061] In the ID area Ar2, the device ID of the servo motor 1 that is the source of the return packet is stored.
[0062] The flag area Ar7 stores 1-byte information in which various flag information is aggregated. That is, since the flag area Ar7 is 8 bits, it is possible to include 8 flag information. Examples of the flag information include various error flags such as the presence or absence of a communication error and the presence or absence of a hardware error, and a flag indicating whether the drive unit 15 of the servo motor 1 has reached the target position.
[0063] In the data area Ar5, temperature information that is a sensing result is stored.
[0064] In the CRC area Ar6, although the notation of specific numerical values is omitted, a 1-byte redundant code for detecting errors is stored.
[0065] <2-3. Simple Message Packet 1> Next, a first configuration example of the simple message packet will be described. First, before explaining the configuration example of the simple message packet, an example of the memory map of the storage unit 13 of the servo motor 1 is shown in FIG. 7.
[0066] In the 4-byte area from address 0x10 to 0x13 in the memory unit 13, angular data is stored. The angular data is, for example, control data instructed from the control device 2.
[0067] In the 2-byte area from address 0x14 to 0x15 in the memory unit 13, speed data is stored. The speed data is, for example, sensing data detected in the servo motor 1.
[0068] In the 1-byte area at address 0x16 in the memory unit 13, temperature data is stored. The temperature data is, for example, sensing data detected in the servo motor 1.
[0069] In the 1-byte area at address 0x17 in the memory unit 13, voltage data is stored. The voltage data is, for example, sensing data detected in the servo motor 1.
[0070] Here, consider the case of reading angular data and temperature data from the memory unit 13 of the servo motor 1. The control device 2 transmits a normal message packet shown in FIG. 8 to the servo motor 1, for example. This normal message packet is a command for reading 7-byte data from the head address 0x10 in the memory unit 13.
[0071] By transmitting this message packet, 7-byte data from address 0x10 to 0x16 is returned as a return packet from the servo motor 1 to the control device 2.
[0072] Thereby, angular data and temperature data can be read from the memory unit 13 of the servo motor 1.
[0073] However, the data area Ar5 of the return packet returned from the servo motor 1 contains not only angle data and temperature data but also speed data. As a result, extra information other than the information to be acquired is included in the packet, so the communication efficiency is not good.
[0074] Therefore, a preset area PA is provided in another area of the storage unit 13 of the servo motor 1, and the data to be acquired is separately and continuously stored there. An example is shown in FIG. 9.
[0075] As shown in the figure, 4-byte angle data is separately stored in the area from address 0xA0 to 0xA3 in the preset area PA of the storage unit 13. Also, 1-byte temperature data is separately stored in the area of address 0xA4 in the preset area PA.
[0076] The area for storing the data to be acquired in the preset area PA is referred to as the "first preset area PA1". That is, the first preset area PA1 in FIG. 9 is the area from address 0xA0 to 0xA4. And the preset information P stored in the first preset area PA1 is angle data and temperature data.
[0077] Even in this state, the control device 2 can acquire the desired data without reading unnecessary data by transmitting a message packet to read the first preset area PA1 in the storage unit 13 of the servo motor 1. Specifically, by storing 0xA0 in the address area Ar3 in FIG. 8 and storing 0x05 in the data length area Ar4, it is possible to read only the angle data and the temperature data.
[0078] In this embodiment, a device for further reducing the data amount is made. Specifically, in the preset area PA, in addition to the first preset area PA1, a second preset area PA2 in which the data length of the data to be read is stored in advance is prepared.
[0079] The second preset area PA2 shown in FIG. 9 is a 1-byte area with the address 0xAF. And the 1-byte preset information P stored in the second preset area PA2 is data length information, and in this example, 0x05 is stored.
[0080] And when the control device 2 reads the angle data and temperature data in the servo motor 1, it transmits a simple message packet. An example of the simple message packet is shown in FIG. 10.
[0081] The simple message packet is obtained by omitting the information stored in the first preset area PA1 and the second preset area PA2 among the respective data areas constituting the normal message packet.
[0082] That is, as shown in FIG. 10, the simple message packet includes a header area Ar1, an ID area Ar2, and a CRC area Ar6, and the address area Ar3 and the data length area Ar4 are omitted.
[0083] Also, 0xF3 indicating that it is a preset read command is stored in the header area Ar1. That is, the simple message packet shown in FIG. 10 is a simple message packet for a read command.
[0084] The servo motor 1 that has received the simple message packet with 0xF3 stored in the header area Ar1 confirms that the data length of the data to be read is 5 bytes based on the information stored in the second preset area PA2. Then, the servo motor 1 reads 5 bytes of the information stored in the first preset area PA1, stores it in the data area Ar5 of the return packet, and transmits it to the control device 2.
[0085] Thereby, it is possible to obtain the data to be acquired while reducing the data amount of the packet transmitted from the control device 2 to the servo motor 1. In addition, by preparing a plurality of commands for the simple message packet and configuring each to read different areas in the preset area PA of the storage unit 13 of the servo motor 1, it becomes possible to efficiently read various data.
[0086] Here, a modified example of the preset area PA will be described. In the example shown in FIG. 9, an example in which sensing data and the setting data itself are stored in the first preset area PA1 was described. In this modified example, as shown in FIG. 11, address information is stored in the first preset area PA1.
[0087] Specifically, in the area with the address 0xA0 in the first preset area PA1 of the storage unit 13 of the servo motor 1, 0x10, which is the start address of the area where the angle data is stored, is stored. Also, in the area with the address 0xA1, 0x16, which is the start address of the area where the temperature data is stored, is stored.
[0088] And in the second preset area PA2, 0x05, which is data length information as preset information P, is stored.
[0089] The servo motor 1 that has received the simple message packet (see FIG. 10) with 0xF3 stored in the header area Ar1 confirms that the data length of the data to be read is 5 bytes based on the information stored in the second preset area PA2. Then, the servo motor 1 reads the angle data stored at addresses 0x10 to 0x13 and the temperature data stored at address 0x16 by referring to the addresses stored in the first preset area PA1, stores them in the data area Ar5 of the return packet, and transmits them to the control device 2.
[0090] Even in such a mode, it is possible to obtain the data to be acquired while reducing the data amount of the packet transmitted from the control device 2 to the servo motor 1.
[0091] In this example, as shown in FIG. 9, 0x05 which is the data length information was stored in the second preset area PA2 which is a 1-byte area with the address 0xAF. And the 5-byte information is the information for 5 bytes stored in the first preset area PA1, and the breakdown is 4-byte angle data and 1-byte temperature data.
[0092] Here, for the case where it is sufficient to obtain 1-byte data as the angle data, a configuration for further reducing the data amount will be described.
[0093] In the case where only 1-byte angle data and 1-byte temperature data need to be acquired, 0x02 is stored in the second preset area PA2 as the data length information. And the control device 2 transmits the message packet shown in FIG. 10 as a simple message packet for reading the angle data and temperature data in the servo motor 1.
[0094] The servo motor 1 that has received the simple message packet with 0xF3 stored in the header area Ar1 confirms that the data length of the data to be read is 2 bytes based on the information stored in the second preset area PA2. Then, the servo motor 1 reads 2 bytes of data as the information stored in the first preset area PA1.
[0095] The data read at this time is 1-byte data as the angle data and 1-byte data as the temperature data. That is, based on the two address information stored in the first preset area PA1 shown in FIG. 11, 1-byte angle data stored at the address 0x10 and 1-byte temperature data stored at the address 0x16 are read, stored in the data area Ar5 of the return packet, and transmitted to the control device 2.
[0096] Thereby, it becomes possible to further reduce the data amount of the return packet.
[0097] <2-4. Simple Message Packet 2> An example of the second simple message packet will be described. This example is an example of a simple message packet transmitted for writing data.
[0098] First, FIG. 12 shows an example of a normal message packet transmitted from the control device 2 to the servo motor 1 when writing data to a predetermined area of the storage unit 13 of the servo motor 1.
[0099] This normal message packet is composed of a header area Ar1, an ID area Ar2, an address area Ar3, a data length area Ar4, a data area Ar5, and a CRC area Ar6.
[0100] In the header area Ar1, 0xF0 indicating that it is a normal message packet for a write command is stored.
[0101] In the ID area Ar2, the device ID (0x03 in FIG. 12) for the servo motor 1 which is the destination of the normal message packet is stored.
[0102] In the address area Ar3, 0x10 which is the start address of the area where the angle data is stored in the storage unit 13 of the servo motor 1 is stored.
[0103] In the data length area Ar4, 0x04 which is the data length of the angle data is stored.
[0104] In the data area Ar5, 4-byte data which is the angle data is stored.
[0105] Specific description of the CRC area Ar6 is omitted.
[0106] The control device 2 can control the angle of the drive unit 15 of the servo motor 1 by transmitting a normal message packet as shown in FIG. 12 to the servo motor 1.
[0107] Here, in order to be able to send a simple message packet for the preset write command, an example of the information stored in the first preset area PA1 and the second preset area PA2 of the storage unit 13 of the servo motor 1 is shown in FIG. 13.
[0108] In the example shown in FIG. 13, 0x10, which is the start address of the area where the angle data is stored, is stored in the first preset area PA1 (address 0xA0). Also, the data length (4 bytes) of the angle data is stored in the second preset area PA2 (address 0xAF).
[0109] An example of a simple message packet for the preset write command transmitted from the control device 2 to the servo motor 1 with the angle data address stored in the first preset area PA1 and the data length stored in the second preset area PA2 is shown in FIG. 14.
[0110] As shown in the figure, in the simple message packet, the address area Ar3 and the data length area Ar4 are omitted. Also, 0xFA indicating that it is a simple message packet for the write command is stored in the header area Ar1.
[0111] Note that FIGS. 13 and 14 show a mechanism for sending a simple message packet for writing one piece of data (angle data in this example), but it is also possible to send a simple message packet for writing a plurality of pieces of data.
[0112] For example, the start address of the angle data is stored at address 0xA0 in the first preset area PA1, and the start address of the speed data is stored at address 0xA1. Then, 0x06 obtained by adding the data length of the angle data and the data length of the speed data is stored in the second preset area PA2.
[0113] Then, in the data area Ar5 of the simple message packet, 6-byte data in which the angle data and the speed data are continuous is stored. As a result, the servo motor 1 can perform control based on the angle data and the speed data stored in the simple message packet.
[0114] In addition, in Fig. 7, the areas where the angle data and the speed data are stored are continuous areas, but even if the areas where the angle data and the speed data are stored are separated, it is possible to rewrite the two data with a single simple message packet.
[0115] <2-5. Simple Message Packet 3> A third example of the simple message packet will be described. This example is an example of the simple message packet transmitted for writing data, similar to the second example. Also, different from the second example, it is an example of the simple message packet in which the angle data to be written is also omitted.
[0116] First, in order to make it possible to transmit the simple message packet of this example for writing, an example of the information stored in the first preset area PA1, the second preset area PA2, and the third preset area PA3 of the storage unit 13 of the servo motor 1 is shown in Fig. 15.
[0117] As shown in the figure, at address 0xA0 in the first preset area PA1, 0x10, which is the start address of the area where the angle data is stored, is stored. In addition, in the second preset area PA2, the data length (4 bytes) of the angle data is stored. Furthermore, in the third preset area PA3, the angle movement amount data (0x00000001) is stored.
[0118] The angle movement amount data stored in the third preset area PA3 is data to be added to the current angle data. In the example shown in Fig. 15, as the angle movement data, "1", which is the minimum control unit, is stored. That is, when the servo motor 1 receives the simple message packet in this example, it performs a process of adding (or subtracting) "1" to the current angle data to update the current angle data.
[0119] Note that the data of the amount of movement of the angle stored in the third preset area PA3 is preferably data that is frequently used. Thereby, the opportunity to transmit a simple message packet instead of a normal message packet can be increased, and the effect of reducing the data amount can be enhanced.
[0120] Note that when the process of setting the angle data to the initial value frequently occurs, the angle data itself may be stored in the third preset area PA3 instead of the amount of movement data of the angle.
[0121] An example of the simple message packet in this example is shown in FIG. 16. As shown in the drawing, although the simple message packet of this example is for writing angle data, the address area Ar3, the data length area Ar4, and the data area Ar5 are omitted. In addition, the header area Ar1 stores 0xFD indicating that it is a simple message packet for a preset write command in which the address area Ar3, the data length area Ar4, and the data area Ar5 are omitted. Thereby, the data amount of the packet to be transmitted is greatly reduced.
[0122] Note that in FIG. 15, the third preset area PA3 is a 4-byte area. However, since the amount of movement data of the angle only requires 1 byte of data amount, it may be configured such that "0x01" is stored at address 0xA1. Even in such a mode, the angle data can be updated appropriately. In addition, reduction of the area of the third preset area PA3 can be achieved.
[0123] <3. Flowchart> <3-1. Processing of Control Equipment> An example of the process executed by the control unit 22 of the control device 2 is shown in FIG. 17. First, in step S101, the control unit 22 determines whether a normal message packet generation instruction has been given. If it is determined that a normal message packet generation instruction has been given, for example, when a normal message packet is selected by a user's operation, the control unit 22 generates a normal message packet according to the instruction in step S102 and transmits it to the servo motor 1 to be transmitted in step S103.
[0124] On the other hand, if it is determined in step S101 that a normal message packet generation instruction has not been given, the control unit 22 determines in step S104 whether a simple message packet generation instruction has been given.
[0125] And if it is determined that a simple message packet generation instruction has been given, the control unit 22 generates a simple message packet in step S105 and transmits it to the servo motor 1 to be transmitted in step S103.
[0126] When a normal message packet or a simple message packet is transmitted in step S103, the control unit 22 determines in step S106 whether there is a return packet. The presence or absence of the return packet depends on the type of the message packet transmitted in step S103.
[0127] For example, if a message packet that does not require a return packet was transmitted in the previous step S103, the control unit 22 determines in step S106 that there is no return packet. On the other hand, if a message packet that requires a return packet was transmitted in the previous step S103, the control unit 22 determines in step S106 that there is a return packet.
[0128] If it is determined that there is no return packet, the control unit 22 returns to the process of step S101. On the other hand, when it is determined that there is a return packet, the control unit 22 checks the reception of the return packet in step S107 and returns to the process of step S101. Although the illustration to FIG. 17 is omitted, when an error code or the like is included in the received return packet, the control unit 22 may perform retransmission processing of the message packet, restart processing of the servo motor 1, etc. before returning to the process of step S101.
[0129] Also, when it is determined that generation instructions are not given for both the normal message packet and the simple message packet (NO determination in both steps S101 and S104), the control unit 22 returns to the process of step S101 again.
[0130] <3-2. Processing of Servo Motor> An example of the process executed by the communication control unit 12 of the servo motor 1 is shown in FIG. 18. In step S201, the communication control unit 12 determines whether a message packet has been received from the control device 2.
[0131] If it is determined that no packet has been received, the communication control unit 12 repeats the process of step S201 again. On the other hand, if it is determined that a packet has been received, in step S202, the communication control unit 12 determines whether the received message packet is a simple message packet.
[0132] If it is determined that a simple message packet has been received, the communication control unit 12 obtains the preset information P in step S203 to grasp the instruction content from the control device 2 and specify the process to be executed.
[0133] On the other hand, if it is determined that a normal message packet has been received (NO determination in step S202), the communication control unit 12 skips the process of step S203.
[0134] Subsequently, in step S204, the communication control unit 12 writes or reads data according to the instruction content from the control device 2. When writing data, accordingly, the drive control unit 14 of the servo motor 1 drives the drive unit 15 to realize a predetermined operation.
[0135] Then, in step S205, the communication control unit 12 determines whether a return packet is necessary. For example, when receiving a message packet corresponding to a data read command or when receiving a message packet corresponding to a command that requires the return of an ACK packet, the communication control unit 12 determines that a return packet is necessary.
[0136] If it is determined that a return packet is necessary, in step S206, the communication control unit 12 generates a return packet and, in step S207, performs a process of transmitting the return packet to the control device 2. After that, the communication control unit 12 returns to the process of step S201. Also, even when it is determined in step S205 that a return packet is unnecessary, the communication control unit 12 returns to the process of step S201.
[0137] In addition to the process shown in FIG. 18, the servo motor 2 performs various sensing operations every several tens of microseconds, several milliseconds, or several seconds, and stores the sensing data obtained as a result in a predetermined area of the storage unit 13. Thereby, the control device 2 can grasp the latest status of the servo motor 2.
[0138] <4. Modification Example> In the example of the simple message packet for the read command, an example of reading data stored in a plurality of discontinuous areas at once has been described. However, not limited to this, even when reading a plurality of data stored in a continuous single area at once or when reading one data, it is possible to reduce data by transmitting a simple message packet.
[0139] For example, when only temperature data is read, 0x16, which is the address information of the area where the temperature data is stored, is stored in the first preset area PA1 of the storage unit 13 of the servo motor 1, and 0x01, which is the data length of the temperature data, is stored in the second preset area PA2.
[0140] The simple message packet includes a header area Ar1, an ID area Ar2, and a CRC area Ar6, and the address area Ar3 and the data length area Ar4 are omitted. In the header area Ar1, 0xF3 indicating that it is a simple message packet for the read command is stored.
[0141] Thus, even if there is only one piece of data to be read, the data amount of the message packet can be reduced.
[0142] In each of the above examples, the servo motor 1 attached to a device such as a robot to be controlled is taken as an example of the transmission target of the message packet generated by the control device 2, but other examples are also conceivable. Specifically, any device in which sensing data is stored in the storage unit or any device that operates by setting a set value in the storage unit can be used instead of the servo motor 1.
[0143] <5. Summary> As described in each of the above examples, the communication method of the communication performed between the control device 2 and the servo motor 1 is a communication method of a communication device (control device 2) including a communication control unit 22a that performs communication control, a transmission unit 21s that transmits a message packet, and a reception unit 21r that receives a message packet. A simple message packet in which at least a part of the third information among the first information (information in the header area Ar1) indicating the type of processing to be executed by the target device (for example, the servo motor 1) which is the transmission destination device of the message packet, the second information (information in the ID area Ar2) for specifying the target device, and the third information (information such as the address area Ar3, the data length area Ar4, and the data area Ar5) indicating the details of the processing is omitted is transmitted. The third information differs depending on the type of processing specified by the first information. For example, when the first information is information indicating a read process, address information (information in the address area Ar3) for specifying the area that is the read position in the storage unit and length information (information in the data length area Ar4) indicating the length of the data to be read are included in the third information. Also, when the first information is information indicating a write process, address information (information in the address area Ar3) of the area on the storage unit that is the write position, length information (information in the data length area Ar4) indicating the length of the write data, and the write data itself (information in the data area Ar5), etc. are included in the third information. In the simple message packet, for example, the address information and the length information are omitted. Therefore, the amount of data can be reduced, the time required for data transmission and reception can be shortened, and the consumption of the bandwidth used for communication can be reduced.
[0144] Also, in the communication method of the communication performed between the control device 2 and the servo motor 1, the omitted information among the third information may be stored in the storage unit 13 of the target device (for example, the servo motor 1). Thereby, the omitted information can be complemented by the target device, and a desired operation can be realized in the target device.
[0145] Also, in the communication method of the communication performed between the control device 2 and the servo motor 1, the first information may be information indicating a read process (read command), and a part of the information omitted in the third information may be address information indicating a read position on the storage unit 13 (information in the address area Ar3) and length information indicating the length of data to be read (information in the data length area Ar4). By omitting the address information indicating the read position and the length information of the data to be read, the message packet includes, for example, a command header that is the first information, a device ID that is the second information, and CRC information that is the other information, and all of the third information can also be omitted. Therefore, the data amount of the message packet generated as a read command can be reduced, and the time required for transmission and reception of the read command can be shortened.
[0146] Also, in the communication method of the communication performed between the control device 2 and the servo motor 1, the first information may be information indicating a write process (write command), and a part of the information omitted in the third information may be address information indicating a write position on the storage unit 13 (information in the address area Ar3) and length information indicating the length of data to be written (information in the data length area Ar4). By omitting the address information indicating the write position and the length information of the write data, the message packet can also be composed of, for example, only the write data (information in the data area Ar5) as the third information. Therefore, the data amount of the message packet generated as a write command can be reduced, and the time required for transmission and reception of the write command can be shortened.
[0147] Also, in the communication method of the communication performed between the control device 2 and the servo motor 1, a part of the information omitted in the third information may include address information indicating the position of a specific area (first preset area PA1) where a plurality of pieces of information stored in a plurality of discontinuous areas on the storage unit 13 are continuously stored on the storage unit 13. For example, when reading a plurality of pieces of information stored in discontinuous areas, there are two methods: reading with a plurality of read commands, or reading with a single read command including data stored in unnecessary intermediate areas. However, in the first method, two read commands are required. In the second method, since unnecessary intermediate data is read, the amount of data in the return packet received from the target device increases. In addition, in the write command, since the data to be written in the unnecessary intermediate area is unknown, there are cases where only the first method can be used. According to this configuration, since a plurality of pieces of information stored in discontinuous areas are configured to be continuously stored in another specific area, only the target data can be read or written with a single read command or write command. In addition, in the read command and write command for the specific area, by omitting at least a part of the third information, it is possible to further reduce the amount of data in the read command and write command. Therefore, the amount of data in the message packet generated as a command can be reduced, and the time required for sending and receiving the command can be shortened.
[0148] The above-described configuration can be applied to, for example, a communication device such as the servo motor 1. Thereby, it is possible to reduce the amount of data related to the transmission and reception of the message packet performed in the transmission of the drive instruction and the acquisition of the state information for controlling the servo motor 1.
[0149] This effect is particularly suitable for the servo motor 1 that performs bilateral control or the like. Bilateral control frequently performs the transmission of a message packet for feeding back the magnitude of the force applied to the target device (servo motor 1) to the communication device as the control device 2, and the transmission of a message packet for transmitting an instruction from the control device 2 to the target device. By applying this configuration to such a communication device, it is possible to enhance the effect of reducing communication time by reducing the data volume of message packets. Therefore, it becomes possible to reduce the consumption of the communication bandwidth or to perform more frequent control.
[0150] A program for implementing such a communication method in a communication device such as the control device 2 can be pre-recorded in an HDD (Hard Disk Drive) as a recording medium built into a device such as a computer device, or in a ROM in a microcomputer having a CPU, etc. Alternatively, the program can be temporarily or permanently stored (recorded) in a removable recording medium such as a flexible disk, CD-ROM (Compact Disk Read Only Memory), MO (Magneto Optical) disk, DVD (Digital Versatile Disc), Blu-ray Disc (registered trademark), magnetic disk, semiconductor memory, memory card, etc. Such a removable recording medium can be provided as so-called packaged software. Also, such a program can be installed from a removable recording medium to a personal computer or the like, or downloaded from a download site via a network such as a LAN (Local Area Network) or the Internet.
[0151] Various effects described above can also be obtained by such a program.
[0152] As described in each of the above examples, as a communication method of a communication device (for example, servo motor 1) including a communication control unit 12 that performs communication control, a transmission unit 11s that transmits a message packet, and a reception unit 11r that receives a message packet, it receives a simple message packet in which at least a part of the third information among the first information (information in the header area Ar1) indicating the type of processing to be executed by the target device (servo motor 1) that is the transmission destination device of the message packet, the second information (information in the ID area Ar2) that identifies the target device, and the third information (information such as the address area Ar3, the data length area Ar4, and the data area Ar5) that indicates the details of the processing is omitted.
[0153] Further, the communication device as the servo motor 1 includes a function of performing communication control, a reception unit 11r that receives a simple message packet in which at least a part of the third information among the first information (information in the header area Ar1) indicating the type of processing to be executed by the target device (servo motor 1) that is the transmission destination device of the message packet, the second information (information in the ID area Ar2) that identifies the target device, and the third information (information such as the address area Ar3, the data length area Ar4, and the data area Ar5) that indicates the details of the processing is omitted, and a function of obtaining a part of the information from the storage unit 13 and performing writing or reading to / from the storage unit 13 based on the first information, the second information, and the third information.
[0154] In addition, a communication system S including a servo motor 1 and a control device 2 is a communication system S composed of a plurality of communication devices. At least a part of each communication device (for example, the control device 2) includes a communication control unit 21a that performs communication control, a transmission unit 21s that transmits a message packet, and a reception unit 21r that receives a message packet. The communication control unit 21a transmits a simple message packet in which at least a part of the third information (information such as an address area Ar3, a data length area Ar4, and a data area Ar5) is omitted, out of the first information (information in the header area Ar1) indicating the type of processing to be executed by the target device (for example, the servo motor 1) that is the transmission destination device of the message packet, the second information (information in the ID area Ar2) for specifying the target device, and the third information indicating the details of the processing.
[0155] Such communication devices and communication systems can also obtain the various operational effects described above.
[0156] Note that the above-described examples can be combined in any way, and even when various combinations are used, the various operational effects described above can be obtained.
Explanation of Reference Numerals
[0157] 1 Servo motor 2 Control device 11s Transmission unit 11r Reception unit 12 Communication control unit 13 Storage unit 21s Transmission unit 21r Reception unit 22a Communication control unit S Communication system PA1 First preset area (specific area)
Claims
1. A communication control unit that performs communication control, A transmission unit that transmits message packets, As a communication method of a communication device including a reception unit that receives message packets, Among a first area in which first information indicating a type of processing to be executed by a target device that is a destination device of a message packet is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating details of the processing is stored, a simple message packet in which at least a part of the third area is omitted is transmitted, The first information is information indicating a read process, The part of the area is an area in which address information indicating a read position on a storage unit of the target device is stored and an area in which length information indicating a length of data to be read is stored, In the storage unit, information of the type stored in the part of the third area is stored Communication method.
2. A communication control unit that performs communication control, A transmission unit that transmits message packets, As a communication method of a communication device including a reception unit that receives message packets, Among a first area in which first information indicating a type of processing to be executed by a target device that is a destination device of a message packet is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating details of the processing is stored, a simple message packet in which at least a part of the third area is omitted is transmitted, The first information is information indicating a write process, The part of the area is an area in which address information indicating a write position on a storage unit of the target device is stored and an area in which length information indicating a length of data to be written is stored, In the storage unit, information of the type stored in the part of the third area is stored Communication method.
3. The information stored in the storage unit and of the type stored in the part of the area includes address information indicating a position of a specific area in which a plurality of discontinuous pieces of information stored in a plurality of areas on the storage unit are continuously stored on the storage unit The communication method according to claim 1 or claim 2.
4. The target device is a servo motor unit including a communication control unit The communication method according to claim 1 or claim 2.
5. The target device is a device to be controlled by bilateral control The communication method according to claim 1 or claim 2.
6. A communication control unit that performs communication control, A transmission unit that transmits a message packet, As a communication method of a communication device including a reception unit that receives a message packet, Of a first area in which first information indicating the type of processing to be executed by a target device, which is the device to which the message packet is to be sent, is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating the details of the processing is stored, a simple message packet in which at least a part of the third area is omitted is received, The first information is information indicating a read process, The partial area is an area in which address information indicating a read position on the storage unit of the target device is stored, and an area in which length information indicating the length of data to be read is stored, In the storage unit, information of the type stored in the partial area of the third area is stored Communication method.
7. A communication control unit that performs communication control, A transmission unit that transmits a message packet, As a communication method of a communication device including a reception unit that receives a message packet, Of a first area in which first information indicating the type of processing to be executed by a target device, which is the device to which the message packet is to be sent, is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating the details of the processing is stored, a simple message packet in which at least a part of the third area is omitted is received, The first information is information indicating a write process, The partial area is an area in which address information indicating a write position on the storage unit of the target device is stored, and an area in which length information indicating the length of data to be written is stored, In the storage unit, information of the type stored in the partial area of the third area is stored Communication method.
8. A communication control unit that performs communication control, A reception unit that receives a simple message packet in which at least a part of a third area is omitted, from among a first area in which first information indicating the type of processing to be executed by a target device, which is the device to which the message packet is to be sent, is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating the details of the processing is stored, A control unit that acquires information of the type stored in the partial area from a storage unit and performs reading on the storage unit based on the first information, the second information, and the information acquired from the storage unit, The first information is information indicating a read process, The partial area is an area in which address information indicating a read position on the storage unit is stored, and an area in which length information indicating the length of data to be read is stored. Communication device.
9. A communication control unit that performs communication control, A first area in which first information indicating a type of process to be executed on a target device that is a transmission destination device of a message packet is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating details of the process is stored. Among them, a receiving unit that receives a simple message packet in which at least a partial area of the third area is omitted, A control unit that acquires information of the type stored in the partial area from the storage unit and performs writing to the storage unit based on the first information, the second information, and the information acquired from the storage unit. The first information is information indicating a writing process. The partial area is an area in which address information indicating a writing position on the storage unit is stored, and an area in which length information indicating the length of data to be written is stored. Communication device.
10. A communication system composed of a plurality of communication devices, Each communication device A communication control unit that performs communication control, A transmission unit that transmits a message packet, A receiving unit that receives a message packet, and The communication control unit transmits a simple message packet in which at least a partial area of a third area among a first area in which first information indicating a type of process to be executed on a target device that is a transmission destination device of a message packet is stored, a second area in which second information for specifying the target device is stored, and a third area in which third information indicating details of the process is stored is omitted. The first information is information indicating a reading process or a writing process. The partial area is an area in which address information indicating a reading position or a writing position on the storage unit of the target device is stored, and an area in which length information indicating the length of data to be read or written is stored. In the storage unit, information of the type stored in the partial area of the third area is stored. Communication system.
Citation Information
Patent Citations
Equipment management device, equipment management system, equipment information management method, equipment information management program and recording medium recording the program
JP2010049364A
Sensor device and sensor device management system, sensor device management method
JP2020141217A
Control system, setting device and computer program
JP2021012405A