COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION CONTROL METHOD, AND PROGRAM
The communication device and system allow for periodic transmission and reception of sub data in a shorter cycle than main data by allocating a slot for sub data communication within the main data transmission period, addressing the challenge of efficient communication in industrial networks.
Patent Information
- Application Number
- JP2022538636
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-07-22
- Filing Date
- 2021-06-17
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-06-17
AI Technical Summary
Existing communication devices struggle to periodically transmit, receive, or transmit/receive sub data in a cycle shorter than the time required for main data transmission.
A communication device and system that includes a processing section and a communication section, which transmits main data in a first cycle and sets a second period within the first period to allow for periodic transmission of sub data by allocating a slot for sub data communication every second cycle, with the frame including at least one slot in the middle of the main data transmission period.
Enables easy periodic transmission, reception, or transmission/reception of sub data in a cycle shorter than the time required for main data transmission, facilitating robust and punctual communication suitable for industrial networks.
Smart Images

Figure 0007603212000008 
Figure 0007603212000009 
Figure 0007603212000010
Abstract
Description
[Technical field]
[0001] The present disclosure generally relates to a communication device, a communication system, a communication control method, and a program, and more particularly to a communication device, a communication system, a communication control method, and a program that communicate with one or more slaves. [Background technology]
[0002] Patent Document 1 discloses a communication device connected to a network in which data is updated at predetermined intervals. This communication device includes a first scheduling means and a second scheduling means. The first scheduling means secures a first communication band required for updating first data used to control a manufacturing device or production facility at predetermined intervals. The second scheduling means secures a second communication band required for second data to arrive at a destination within a specified time within a communication band other than the first communication band among the communication bands of the network.
[0003] In the communication device described in Patent Document 1, it is possible to transmit second data (sub data) in an available band other than the communication band required for communicating first data (main data). However, this communication device has a problem in that it is difficult to periodically transmit, receive, or transmit and receive the second data (sub data) in a period shorter than the time required for transmitting the first data (main data). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2018-64245 A Summary of the Invention
[0005] The present disclosure has been made in consideration of the above points, and aims to provide a communication device, a communication system, a communication control method, and a program that make it easy to transmit, receive, or transmit and receive secondary data periodically at a period shorter than the time required to transmit main data.
[0006] A communication device according to an embodiment of the present disclosure includes a processing unit and a communication unit. The communication unit communicates with one or more slaves. The processing unit has a function of executing a communication process and a setting process. The communication process includes causing the communication unit to transmit a frame including main data to the one or more slaves in a first period. The setting process includes setting N second periods (N is an integer equal to or greater than 2) within the first period. The setting process includes setting a slot for each second period in which communication of secondary data other than the main data is performed. The frame includes at least one of the slots in the middle of a period for transmitting the main data.
[0007] A communication system according to another aspect of the present disclosure includes the above-mentioned communication device and one or more slaves, the one or more slaves being connected to the communication device and communicating with the communication device.
[0008] A communication control method according to another aspect of the present disclosure includes a communication step and a setting step. The communication step includes causing one or more slaves connected to a communication device to transmit a frame including main data in a first period. The setting step includes setting N second periods (N is an integer equal to or greater than 2) within the first period. The setting step includes setting a slot for communicating secondary data other than the main data in each second period. The frame includes at least one of the slots in the middle of a period for transmitting the main data.
[0009] A program according to another aspect of the present disclosure causes one or more processors to execute the above-described communication control method.
[0010] The present disclosure has an advantage in that secondary data can be easily transmitted, received, or transmitted and received periodically at a period shorter than the time required for transmitting primary data. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a block diagram illustrating an overview of a communication system including a communication device according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is an explanatory diagram of communication processing by the communication device of the above embodiment. [Diagram 3] FIG. 3 is an explanatory diagram of the operation timing of a slave included in the communication system according to the above embodiment. [Figure 4] FIG. 4 is a flowchart of a setting process performed by the communication device. [Diagram 5] FIG. 5 is an explanatory diagram of the division process performed by the communication device according to the embodiment. [Figure 6] FIG. 6 is an explanatory diagram of a communication process performed by a communication device of the comparative example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] (1) Overview Fig. 1 is a block diagram showing an overview of a communication system 100 including a communication device 1 according to an embodiment of the present disclosure. As shown in Fig. 1, the communication system 100 includes the communication device 1 and one or more (here, n (n is a natural number)) slaves 2 (21, 22, 23, ... 2n) connected to the communication device 1. The communication device 1 is a master equivalent to a higher-level device of the one or more slaves 2. The communication device 1 and the one or more slaves 2 are connected to the same network. The one or more slaves 2 are connected to the communication device 1 and communicate with the communication device 1.
[0013] In this embodiment, the communication device 1 and one or more slaves 2 are connected to an industrial network. The "industrial network" in this disclosure is, for example, a field network used in factory automation, and is used for communication between multiple devices installed in a factory. The industrial network may include, for example, Ethernet / IP (registered trademark), EtherCAT (registered trademark), or PROFINET (registered trademark). The devices connected to the industrial network may include, for example, a controller (for example, a PLC (Programmable Logic Controller)), a sensor (for example, a displacement sensor, a flow meter, a pressure gauge, an image sensor, or a remote I / O (Input / Output)). The devices connected to the industrial network may include, for example, a servo amplifier, an inverter, a robot, an actuator, or a valve.
[0014] Industrial networks are required to be more robust, punctual, and real-time than standard best-effort networks used in offices, etc. For example, in an industrial network, when periodically transmitting control data from a controller to a controlled device such as a servo amplifier, delays are not tolerated as compared to best-effort networks, and faster response speeds to control data are also required.
[0015] 1, the communication device 1 includes a processing unit 11 and a communication unit 12. The communication unit 12 is a communication interface that communicates with one or more slaves 2. The processing unit 11 has a function of executing a communication process and a setting process.
[0016] FIG. 2 is an explanatory diagram of a communication process by a communication device according to an embodiment of the present disclosure. The communication process is a process in which a frame (communication frame) F1 including main data is transmitted from the communication unit 12 to one or more slaves 2 at a first cycle CT1. That is, the communication device 1 transmits the main data to one or more slaves 2 at a first cycle CT1 by executing the communication process. For example, if the communication device 1 is a controller and the one or more slaves 2 are devices to be controlled such as servo amplifiers, the main data may include control data for controlling the slaves 2. As an example, the first cycle CT1 is several tenths of a millisecond to several milliseconds. When each slave 2 receives the main data, it executes a process according to the received main data. For example, if the main data includes one or more control data corresponding to each of the one or more slaves 2, when each slave 2 receives the main data, it acquires the corresponding control data included in the main data and executes a process according to the acquired control data.
[0017] The setting process includes setting a second period CT2 within a first period CT1. In the setting process, the processing unit 11 sets N second periods CT2 (N is an integer equal to or greater than 2) within the first period CT1. The setting process includes setting a slot S0 for communicating secondary data other than the primary data for each second period CT2. That is, within the first period CT1, each of the N second periods CT2 includes a slot S0 for communicating secondary data other than the primary data.
[0018] In this embodiment, in the setting process, the processing unit 11 assigns the above-mentioned slot S0 to at least one slave 2 out of the one or more slaves 2 for each second cycle CT2.
[0019] The slave 2 can obtain data included in the corresponding slot S0 (allocated slot S0) and transmit data to other devices (communication device 1 or other slave 2) using the corresponding slot S0. That is, the slave 2 to which the slot S0 is allocated can periodically receive secondary data using the slot S0 for each second period CT2, separately from the main data transmitted in the first period CT1. The slave 2 to which the slot S0 is allocated can periodically transmit secondary data using the slot S0 for each second period CT2, separately from the main data. That is, this embodiment has the advantage that, for example, the slave 2 connected to the communication device 1 can easily transmit or receive secondary data periodically (for each second period CT2).
[0020] Furthermore, in the communication process, the processing unit 11 transmits the frame F1 so that at least one slot S0 is included in the middle of the transmission period of the main data. In other words, at least one slot S0 of the second cycle CT2 is inserted in the middle of the frame F1. Therefore, in this embodiment, for example, the slave 2 to which the slot S0 is assigned can periodically transmit, receive, or transmit / receive the secondary data in a cycle (second cycle CT2) shorter than the transmission time of the primary data (the time required to transmit the primary data). In other words, this embodiment has the advantage that it is easy to periodically transmit, receive, or transmit / receive the secondary data in a cycle (second cycle CT2) shorter than the time required to transmit the primary data.
[0021] (2) Details A communication system 100 including a communication device 1 of this embodiment will be described in detail below with reference to FIG. 1. In this embodiment, a plurality of (here, n (n is an integer equal to or greater than 1)) slaves 2 are connected to the communication device 1. The plurality of slaves 2 (in other words, one or more slaves 2) are connected to the communication device 1 in a daisy chain. Specifically, a first slave 21, a second slave 22, a third slave 23, ..., an n-th slave 2n are connected to the communication device 1 in a ring shape in this order. Therefore, in this embodiment, a frame F1 transmitted from the communication device 1 is transmitted in the order of the first slave 21, the second slave 22, the third slave 23, ..., the n-th slave 2n, and the communication device 1.
[0022] Moreover, in the communication system 100 of this embodiment, one slave 2 of the multiple slaves 2 is a sensor, and the remaining slaves 2 are servo amplifiers. In other words, in this embodiment, at least one slave 2 of the one or more slaves 2 is a motor driving device that drives a motor. Moreover, in the communication system 100, the communication device 1 is a controller that controls the multiple slaves 2 (that is, the multiple servo amplifiers and sensors) individually or as a whole.
[0023] The communication device 1 includes a processing unit 11 and a communication unit 12. In this embodiment, the communication device 1 stores data in a memory included in the processing unit 11, but may include a storage unit separate from the processing unit 11. Examples of the storage unit include electrically rewritable non-volatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) and volatile memory such as a RAM (Random Access Memory).
[0024] The processing unit 11 includes, for example, a computer system. The computer system is mainly composed of a processor and a memory as hardware. The processor executes a program recorded in the memory of the computer system, thereby realizing the function of the processing unit 11. The program may be pre-recorded in the memory of the computer system, may be provided through an electric communication line, or may be recorded and provided on a non-transitory recording medium such as a memory card, an optical disk, or a hard disk drive that is readable by the computer system.
[0025] The communication unit 12 is a communication interface for communicating with a plurality of slaves 2, and includes, for example, a wired communication module conforming to the industrial Ethernet (registered trademark) protocol. The communication unit 12 transmits a frame F1 to a communication unit 202 (described later) of a slave 2 (first slave 21 in FIG. 1) at the front stage directly connected to the communication device 1. The communication unit 12 also receives a frame F1 transmitted from a communication unit 202 of a slave 2 (n-th slave 2n in FIG. 1) at the last stage directly connected to the communication device 1.
[0026] The processing unit 11 has a function of executing a communication process, a setting process, and a division process. The setting process and the division process are both processes executed before operating the communication system 100 including the communication device 1. The communication process is a process executed while the communication system 100 including the communication device 1 is operating.
[0027] The division process is a process of dividing the main data into a plurality of main data fragments. In this embodiment, the main data may include control data for each slave 2, which is transmitted from the communication device 1 to each slave 2. Each main data fragment after division may include a part or all of the control data transmitted to at least one slave 2. In the division process, the processing unit 11 divides the main data into a plurality of main data fragments based on the maximum allowable data size ADm div The main data is divided into a plurality of main data fragments based on (described later). Details of the division process will be described later in "(3) Setting process."
[0028] The communication process is a process in which a frame F1 is transmitted from the communication unit 12 to a plurality of slaves 2 at a first cycle CT1. The first cycle CT1 is set in advance in the communication device 1. In this embodiment, the communication device 1 transmits a frame F1 to the first slave 21, whereby the frame F1 is transmitted in the order of the first slave 21, the second slave 22, the third slave 23, ..., the n-th slave 2n (see FIG. 1).
[0029] 2, frame F1 is composed of multiple frame segments F21, F22, ..., F2β (β is an integer equal to or greater than 2). That is, in communication processing, the processing unit 11 (repeatedly) transmits frame F1 composed of multiple frame segments F21, F22, ..., F2β at a first cycle CT1. Hereinafter, when the multiple frame segments F21, F22, ..., F2β are not distinguished from one another, they will be referred to as "frame segments F2."
[0030] Here, "β" is the division number. The division number β is the number of divided frames F2 that make up the frame F1, and is calculated in the setting process as described below. The division number β is equal to the number N of the second period CT2 included in the first period CT1.
[0031] More specifically, in the communication process, within one first cycle CT1, a plurality of divided frames F21, F22, ..., F2β are transmitted from the communication unit 12 to a plurality of slaves 2 at a second cycle CT2 (see FIG. 2). In other words, in the communication process, the processing unit 11 transmits a plurality of divided frames F21, F22, ..., F2β at the second cycle CT2. The second cycle CT2 is set in the setting process, as described later.
[0032] As shown in Fig. 2, each divided frame F2 includes at least a header D100, a sub-data area D2, and a footer D101. At least one divided frame F2 (divided frames F21, F22, F23 in the example of Fig. 2) among the divided frames F21, F22, ..., F2β further includes a main data area D1.
[0033] The main data area D1 is an area (slot) used for transmitting main data (main data fragment). That is, the main data is transmitted in the main data area D1. In each of at least one divided frame F2 (divided frames F21, F22, F23) including the main data area D1, the main data area D1 includes at least a portion of at least one slot among a plurality of slots D11, D12, ..., D1n (here, n is the number of slaves 2). The plurality of slots D11, D12, ..., D1n are assigned to a plurality of slaves 21, 22, ..., 2n, respectively. It is preferable that the main data area D1 of the frame F1 includes all of the n slots D11, D12, ..., D1n corresponding to the n slaves 2.
[0034] In the example of FIG. 2, the main data area D1 of the split frame F21 includes slots D11 and D12. The main data area D1 of the split frame F22 includes slots D13 and D14. The main data area D1 of the split frame F23 includes slots D15 and D16. That is, in each of the split frames F21, F21, and F23 including the main data area D1, the main data area D1 includes the entirety of each of the two slots. However, this is not limited to the example, and one slot (for example, the slot D11 assigned to the first slave 21) may be divided and included in the main data areas D1 of multiple split frames F2. For example, the main data area D1 of the split frame F21 may include a part of the slot D11, and the main data area D1 of the split frame F22 may include the remaining part of the slot D11.
[0035] In this manner, in this embodiment, the processing unit 11 divides a plurality of main data pieces at N second cycles CT2 in the communication process and transmits them.
[0036] The slave 2 that receives the frame F1 can acquire the main data from the communication device 1 by using an assigned slot (for example, slot D11 for the first slave 21) in the main data region D1. Specifically, each slave 2 acquires main data for itself (its own control data) from the divided frame F2 that includes the slot assigned to it. In the example of FIG. 2, the first slave 21 can acquire the main data (the control data of the first slave 21) from the communication device 1 by using slot D11 of the divided frame F21. Also, the third slave 23 can acquire the main data (the control data of the third slave 23) from the communication device 1 by using slot D13 of the divided frame F22.
[0037] In this embodiment, as described above, the main data may include control data for each slave 2 that is transmitted from the communication device 1 to each slave 2. The main data may include response data for each slave 2 to the control data.
[0038] In this embodiment, the processing unit 11 transmits the frame F1 including data (hereinafter also referred to as "synchronization data") indicating the end timing of the transmission of the main data in the frame F1. That is, the frame F1 may include synchronization data indicating the end timing of the transmission of the main data. The synchronization data is included, for example, in the header D100 of the last divided frame F2 (divided frame F23 in the example of FIG. 2) that includes the main data region D1 among the multiple divided frames F2.
[0039] In each divided frame F2, the sub-data area D2 is divided into a plurality of (here, n) slots D21, D22, ..., D2n. Each of the plurality of slots D21, D22, ..., D2n corresponds to the slot S0 set by the setting process, and is assigned to a plurality of slaves 21, 22, ..., 2n, respectively. That is, in this embodiment, the frame F1 includes the slot S0. Each divided frame F2 includes the slot S0. The slot S0 is set by the setting process.
[0040] The slave 2 that receives the divided frame F2 can obtain the secondary data contained in the assigned slot S0 (for example, slot D21 for the first slave 21) in the secondary data area D2, or can transmit the secondary data to another device (the communication device 1 or another slave 2) using slot S0. In this embodiment, the secondary data can include various data transmitted from the slave 2 to another slave 2. In other words, slot S0 is used to communicate secondary data other than the main data. In particular, slot S0 can be used for communication between one or more slaves 2.
[0041] In this embodiment, the processing unit 11 updates the main data for each first cycle CT1. Specifically, the processing unit 11 generates main data to be included in the next frame F1 during the period from when the transmission of the frame F1 is started to when the transmission of the next frame F1 is started. When generating the main data, the processing unit 11 refers to, for example, command information from a higher-level system of the communication device 1 and response information received from each slave 2. For example, the processing unit 11 generates control data (main data) for controlling each servo amplifier (each slave 2) by referring to detection information received from a sensor (slave 2). Therefore, the first cycle CT1 needs to be set to an extent that the process of generating the main data can be executed, and depends on the processing performance of the processing unit 11.
[0042] The setting process is a process for setting the second cycle CT2 and the slot S0 used in the communication process. That is, the communication process is executed based on the parameters set in the setting process.
[0043] In the setting process, the processing unit 11 sets N second periods CT2 (N is an integer equal to or greater than 2) within the first period CT1. The second period CT2 is shorter than the first period CT1. In this embodiment, the processing unit 11 sets the second period CT2 based on at least the first period CT1, the data size of the main data, and the data size of the sub-data, as described later. The slot S0 is assigned to the slave 2 for each second period CT2. In this embodiment, the processing unit 11 assigns the slot S0 to all the slaves 2 in each second period CT2 (each divided frame F2). The slot S0 assigned to each slave 2 in the setting process constitutes the above-mentioned sub-data area D2. Details of the setting process will be described later in "(3) Setting process". The slot length of the slot S0 assigned to each slave 2 may differ depending on the data size.
[0044] The slave 2 includes a processing unit 201 and a communication unit 202. The slave 2 stores data in a memory included in the processing unit 201, but may also have a storage unit separate from the processing unit 201. Examples of the storage unit include an electrically rewritable non-volatile memory such as an EEPROM, and a volatile memory such as a RAM.
[0045] The processing unit 201 includes, for example, a computer system. The computer system is mainly composed of a processor and a memory as hardware. The processor executes a program recorded in the memory of the computer system, thereby realizing the functions of the processing unit 201. The program may be pre-recorded in the memory of the computer system, may be provided through an electric communication line, or may be recorded and provided on a non-transitory recording medium such as a memory card, an optical disk, or a hard disk drive that is readable by the computer system.
[0046] The processing unit 201 has a function of executing a process based on corresponding data (here, control data) of the main data received by the communication unit 202. FIG. 3 is an explanatory diagram of the operation timing of a slave included in the communication system 100 according to an embodiment of the present disclosure. As shown in FIG. 3, when the processing unit 201 receives a divided frame F2 (divided frame F23 in the example of FIG. 2) including synchronization data, the processing unit 201 executes a process according to the main data (control data) after the end of reception of the divided frame F2. Since the divided frame F2 (divided frame F23) including synchronization data is transmitted in the first cycle CT1, the processing unit 201 of each slave 2 executes a process according to the main data in the first cycle CT1. In other words, the frame F1 includes data (synchronization data) for controlling the slave 2 in the first cycle CT1. Moreover, one or more (plural) slaves 2 execute a process according to the main data in synchronization with each other based on the synchronization data. In other words, the frame F1 includes data (synchronization data) for synchronizing the operations of one or more slaves 2.
[0047] The processing unit 201 has a function of executing processing according to the corresponding data among the sub-data received by the communication unit 202. For example, the processing unit 201 executes processing according to the sub-data received in each divided frame F2 when a predetermined delay time has elapsed from the reception time of the header D100 of the divided frame F2 (see FIG. 3). For example, the delay time is set to a time shorter than the second cycle CT2 by the time required for processing according to the sub-data, but is not limited to this. Since the divided frame F2 is transmitted in the second cycle CT2 as described above, the processing unit 201 executes processing according to the sub-data in the second cycle CT2.
[0048] Furthermore, the processing unit 201 has a function of executing a process of transmitting the sub-data to another device by using the allocated slot S0 in the sub-data area D2 of the received divided frame F2.
[0049] The communication unit 202 is a communication interface for communicating with the communication device 1 or another slave 2, and includes, for example, a wired communication module conforming to the industrial Ethernet (registered trademark) protocol. The communication unit 202 receives the frame F1 (divided frame F2) transmitted from the communication unit 12 of the communication device 1 or the communication unit 202 of the slave 2, which is in the previous stage directly connected to the slave 2. The communication unit 202 transmits the received frame F1 (divided frame F2) to the communication unit 12 of the communication device 1 or the communication unit 202 of the slave 2, which is in the subsequent stage directly connected to the slave 2. As an example, the communication unit 202 of the first slave 21 receives the frame F1 transmitted from the communication unit 12 of the communication device 1, and transmits the received frame F1 to the communication unit 202 of the second slave 22. At this time, the communication unit 202 of the first slave 21 may appropriately update the received frame F1 before transmitting it.
[0050] (3) Setting process The setting process executed by the processing unit 11 of the communication device 1 will be described in detail below with reference to Fig. 4. Fig. 4 is a flowchart of the setting process by the communication device 1 according to an embodiment of the present disclosure.
[0051] As described above, the setting process is a process for setting the second cycle CT2 and the slot S0. The setting process is executed by the processing unit 11, for example, before the communication system 100 is operated, when the user performs a predetermined operation using a user interface provided in the communication device 1. In a stage prior to the execution of the setting process, the user inputs setting data required for executing the setting process to the communication device 1 using the user interface.
[0052] In this embodiment, the setting data includes the total data size of the main data, the total data size of the sub data, and the minimum communication cycle CT min The total data size of the main data is the sum of the data size of the main data that can be received by each slave 2 for all frames. The total data size of the sub data is the sum of the data size of the sub data that can be transmitted, received, or transmitted and received by each slave 2 for all frames. Minimum communication cycle CTmin is the minimum communication cycle that is permitted for the communication device 1 to communicate with one or more slaves 2. In this embodiment, the minimum communication cycle CT min is the longest communication cycle among the communication cycles that each of the slaves 21, 22, . . . , 2n can handle.
[0053] The communication device 1 may obtain the setting data from each slave 2 when establishing communication between the communication device 1 and each slave 2 and transmitting an initialization frame from the communication device 1 to each slave 2. That is, the communication device 1 obtains the setting data from each slave 2 in response to the initialization frame. In this case, it is assumed that the setting data has been set in advance in each slave 2, for example, by a user inputting the setting data.
[0054] In the setting process, when setting data is input (ST1), the processing unit 11 first selects the shortest communication cycle CT as a second cycle candidate CCT2. min (ST2). The processing unit 11 also calculates the minimum transmission time TTsf of the divided frame F2 (ST3). The minimum transmission time TTsf is the transmission time (time required to send) of the divided frame F2 that includes only the header D100, the sub-data area D2, and the footer D101. Specifically, the processing unit 11 calculates the minimum transmission time TTsf by performing calculation based on the following formula (1).
[0055]
number
[0056] In the above formula (1), "Dh" represents the data size of the header D100 of the divided frame F2, "Ds" represents the total data size of the sub-data, and "Df" represents the data size of the footer D101 of the divided frame F2. "Tr" represents the transfer rate, "x" represents the number (=n+1) of devices (communication device 1 and slave 2) belonging to the communication system 100, "Td1" represents the delay time per device, and "Td2" represents the delay time in the entire communication system 100.
[0057] The processing unit 11 calculates the minimum transmission time TTsf and the second cycle candidate CCT2 (the minimum communication cycle CT min ) is compared with (step ST4). If the minimum transmission time TTsf is smaller than the second cycle candidate CCT2 (Yes in step ST4), the processing unit 11 calculates the division number β (step ST5). Specifically, the processing unit 11 calculates the division number β by performing an operation based on the following formula (2).
[0058]
number
[0059] That is, the division number β is a quotient calculated by dividing the first period CT1 by the second period candidate CCT2.
[0060] The processing unit 11 then performs calculation based on the following formula (3) to obtain the data size Dm of the divided data obtained by dividing the main data. div is calculated (step ST6).
[0061]
number
[0062] In the above formula (3), "Dm" represents the total data size of the main data.
[0063] Next, the processing unit 11 calculates the necessary transmission time TTf of the divided frame F2 (step ST7). The necessary transmission time TTf is the transmission time (time required for sending) of the divided frame F2 including the header D100, the transmission area of the divided data calculated in step ST6, the sub-data area D2, and the footer D101. Specifically, the processing unit 11 calculates the necessary transmission time TTf by performing calculation based on the following formula (4).
[0064]
number
[0065] Next, the processing unit 11 calculates the required transmission time TTf and the second cycle candidate CCT2 (the shortest communication cycle CT min If the necessary transmission time TTf is smaller than the second cycle candidate CCT2 (Yes in step ST8), the processing unit 11 compares the second cycle candidate CCT2 (the shortest communication cycle CT min ) is set as the second period CT2 (step ST9).
[0066] In this manner, in the present embodiment, the processing unit 11 sets the second period CT2 in the setting process based on at least the first period CT1, the data size Dm of the main data, and the data size Ds of the secondary data.
[0067] When the second period CT2 is set, the processing unit 11 calculates the data size Dm of the divided data based on the second period CT2 and the required transmission time TTf. div (step ST10). Here, the processing unit 11 adjusts the allowable maximum data size ADm div Calculate the maximum allowable data size ADm div is the maximum data size of the divided data that can be allocated to the main data area D1 of one divided frame F2. Specifically, the processing unit 11 calculates the maximum allowable data size ADm div Calculate.
[0068]
number
[0069] In the above formula (5), "α" represents a margin time taking jitter into consideration.
[0070] Maximum allowed data size ADm div After calculating, the processing unit 11 sets the main data area D1 and the sub-data area D2 of each divided frame F2.
[0071] Specifically, the processing unit 11 sets slots D11, D12, ..., D1n in the main data area D1 of at least one split frame F2 so that the entire main data is transmitted in one of the multiple split frames F21, F22, ..., F2β.
[0072] The processing unit 11, for example, determines the maximum allowable data size ADm div , F2β, in order from the first divided frame F21, the processing unit 11 divides the main data into a plurality of divided data based on the maximum allowable data size ADm div That is, in this embodiment, the divided data (main data fragments) are allocated to the multiple divided frames F2 in a so-called "front-filling" manner. As a result, a main data region D1 is set in at least one divided frame F2 out of the multiple divided frames F2.
[0073] In the example shown in FIG. 5, the total data size Dm of the main data is the maximum allowable data size ADm div Therefore, the first divided frame F21 and the second divided frame F22 have a maximum data size ADm div The third divided frame F23 is assigned the divided data (main data fragment) of the maximum allowable data size ADm div In addition, since the allocation of all the divided data has been completed up to the third divided frame F23, the fourth and subsequent divided frames F24, ..., F2β do not include the main data area D1.
[0074] Thus, in this embodiment, step ST10 can be said to include a division process for dividing the main data into a plurality of main data fragments.
[0075] Furthermore, the processing unit 11 sets a sub data area D2 for each set second cycle CT2 (i.e., for each divided frame F2). Here, the processing unit 11 assigns a slot S0 to each slave 2 for each second cycle CT2 (for each divided frame F2). That is, the processing unit 11 assigns slots D21, D22, ..., D2n to slaves 21, 22, ..., 2n, respectively, as slot S0. In short, in the setting process, the processing unit 11 sets a slot S0 for each second cycle CT2.
[0076] 4, when the minimum transmission time TTsf is equal to or greater than the second cycle candidate CCT2 (No in step ST4), or when the necessary transmission time TTf is equal to or greater than the second cycle candidate CCT2 (No in step ST8), the processing unit 11 changes the second cycle candidate CCT2 to a value greater than the current value. Here, the processing unit 11 adds (increments) "1" to the number of repetitions "m" whose initial value is set to "1" (step ST11), and changes the second cycle candidate CCT2 to the minimum communication cycle CT min and the current number of repetitions m (step ST12). Therefore, in this embodiment, the processing unit 11 changes (updates) the communication cycle that one or more slaves 2 can support (the minimum communication cycle CT min It can be said that the second cycle CT2 is set to an integer multiple of the first cycle CCT2. Then, the processing unit 11 returns to step ST4, and repeats steps ST11, ST12, and ST4 to ST8 until the necessary transmission time TTf becomes smaller than the second cycle candidate CCT2 (Yes in step ST8).
[0077] (4) Specific examples A specific example of the setting process will be described below. In the following description, it is assumed that the first cycle CT1 is 500 μs. In addition, it is assumed that the communication system 100 includes three slaves 2 (the first slave 21, the second slave 22, and the third slave 23). That is, in the following description, the number x of devices (communication devices 1 and slaves 2) belonging to the communication system 100 is four. In the following description, it is assumed that the data size of the header D100 is 12 bytes, and the data size of the footer D101 is 12 bytes. In the following description, it is assumed that the transfer rate Tr is 100 Mbps, the delay time Td1 per slave 2 is 3 μs, the delay time Td2 of the entire communication system 100 is 1.5 μs, and the margin time α is 3 μs.
[0078] First, a case where the setting data for each slave 2 is the data shown in Table 1 below will be described.
[0079] [Table 1]
[0080] In this case, the total data size Ds of the sub-data is 16 (=4+4+8) bytes, and the frame size of the divided frame F2 including the header D100, the sub-data area D2, and the footer D101 is 320 (=(12+16+12)×8) bits, so the minimum transmission time TTsf is calculated as 16.7 (=320 / 100+3×4+1.5) μs from formula (1). In this case, of all the communication cycles that the slaves 21, 22, and 23 can support, the communication cycles that the first slave 21 and the third slave 23 can support are the longest, so the minimum communication cycle CT min The minimum transmission time TTsf is 31.25μs. min Since this is smaller than the minimum communication cycle CT min (31.25 μs) is set as the second cycle candidate CCT2. In this case, the division number β is 16 (= 500 / 31.25) according to the formula (2).
[0081] In addition, since the total data size Dm of the main data is 80 (= 32 + 16 + 32) bytes, the data size Dm of the divided data div is 5 (=80 / 16) bytes according to formula (3), and the frame size of the divided frame F2 including the header D100, the transmission area of the divided data, the sub-data area D2, and the footer D101 is 360 (=(12+5+16+12)×8) bits. Therefore, the necessary transmission time TTf is calculated as 17.1 (=360 / 100+3×4+1.5) μs according to formula (4). When the necessary transmission time TTf is less than the second cycle candidate CCT2 (the shortest communication cycle CT min (31.25 μs)), the processing unit 11 determines the minimum communication cycle CT min (31.25μs) is set as the second period CT2.
[0082] The processing unit 11 determines the maximum allowable data size ADm div In this case, the main data is divided into divided data based on the maximum allowable data size ADm div According to formula (5), the maximum allowable data size ADm is 144.375 (= 5 + (31.25 - 17.1 - 3) × 100 / 8) bytes. div is larger than the data size Dm (80 bytes) of the main data. Therefore, the processing unit 11 generates the split frame F2 so that all the main data is transmitted in the split frame F21 without splitting the main data (i.e., only the split frame F21 includes the main data region D1, and the remaining split frames F22, ... F216 do not include the main data region D1).
[0083] Next, a case where the setting data for each slave 2 is the data shown in Table 2 below will be described.
[0084] [Table 2]
[0085] In this case, the total data size Ds of the sub-data is 220 (=40+20+160) bytes, and the frame size of the divided frame F2 including the header D100, the sub-data area D2, and the footer D101 is 1952 (=(12+220+12)×8) bits, so the minimum transmission time TTsf is calculated as 33.02 (=1952 / 100+3×4+1.5) μs according to formula (1). In this case, of all the communication cycles that the slaves 21, 22, and 23 can support, the communication cycles that the first slave 21 and the third slave 23 can support are the longest, so the minimum communication cycle CT min The minimum transmission time TTsf is 31.25μs. min Since the communication cycle is equal to or greater than 31.25 μs, the processing unit 11 adds "1" to the number of repetitions "m" whose initial value is "1" to obtain the minimum communication cycle CT min The value (62.5 μs) obtained by multiplying (31.25 μs) by the number of repetitions m (here, doubled) is set as the second cycle candidate CCT2. In this case, the division number β is 8 (=500 / 62.5) according to formula (2).
[0086] In addition, since the total data size Dm of the main data is 800 (= 320 + 320 + 160) bytes, the data size Dm of the divided data div is 100 (=800 / 8) bytes according to formula (3), and the frame size of the divided frame F2 including the header D100, the transmission area of the divided data, the sub-data area D2, and the footer D101 is 2752 (=(12+100+220+12)×8) bits. Therefore, the necessary transmission time TTf is calculated as 41.02 (=2752 / 100+3×4+1.5) μs according to formula (4). Since the necessary transmission time TTf is smaller than the second cycle candidate CCT2 (62.5 μs), the processing unit 11 sets the second cycle candidate CCT2 (62.5 μs) as the second cycle CT2.
[0087] The processing unit 11 determines the maximum allowable data size ADm div In this case, the main data is divided into divided data based on the maximum allowable data size ADm divAccording to formula (5), this becomes 331 (=100+(62.5-41.02-3)×100 / 8) bytes. For example, among the multiple (here, eight since the division number β=8) divided frames F21, F22, ..., F28, the processing unit 11 assigns 331 bytes of divided data of the main data with a total data size of 800 bytes to each of the divided frames F21 and F22, and assigns the remaining 138 (=800-331×2) bytes of divided data to the divided frame F23, thereby dividing the main data into main data pieces (divided data).
[0088] Hereinafter, the advantages of the communication device 1 of the present embodiment will be described with a comparison with a communication device of a comparative example. The communication device of the comparative example differs from the communication device 1 of the present embodiment in that it does not have a function for executing division processing and setting processing. FIG. 6 is an explanatory diagram of communication processing by the communication device of the comparative example. As shown in FIG. 6, the communication device of the comparative example transmits all main data from the communication device 1 or the slave 2 in one frame (main frame) F100 regardless of the data size Dm of the main data. Then, when transmitting sub-data different from the main data from the communication device 1 or the slave 2, another frame (sub-frame) F200 including the sub-data area D2 is transmitted in the free area CT10 excluding the main frame F100 in the first cycle CT1. However, in the communication device of the comparative example, the second cycle CT2 is not set, and the timing for transmitting the sub-frame F200 is not specified, so that the sub-data cannot be transmitted periodically. For this reason, it is difficult for the communication device of the comparative example to perform periodic communication of sub-data different from the main data that can withstand use in an industrial network.
[0089] On the other hand, in the communication device 1 of this embodiment, for example, the slave 2 to which the slot S0 is assigned by the setting process can periodically receive secondary data using the slot S0 for every second period CT2, separately from the main data transmitted in the first period CT1. For example, the slave 2 to which the slot S0 is assigned by the setting process can periodically transmit secondary data using the slot S0 for every second period CT2, separately from the main data. In other words, this embodiment has the advantage that the slave 2 connected to the communication device 1 can easily transmit, receive, or transmit and receive secondary data periodically. Therefore, this embodiment has the advantage that it is easy to perform periodic communication that can withstand use in an industrial network, not only for the main data but also for the secondary data.
[0090] In the communication device of the comparative example, when the data size of the main data is relatively large, there is a possibility that the transmission of the main data alone takes up more than half of the first cycle CT1 (i.e., the transmission of the main frame F100 alone takes more than half of the first cycle CT1). In that case, it is difficult to set the second cycle CT2 multiple times within the first cycle CT1. In contrast, in this embodiment, the frame F1 includes at least one slot S0 in the middle of the transmission period of the main data. Therefore, in the communication device 1 of this embodiment, for example, the slave 2 to which the slot S0 is assigned can periodically transmit, receive, or transmit / receive the sub-data in a cycle (second cycle CT2) shorter than the transmission time of the main data. Therefore, in this embodiment, there is an advantage that the slave 2 connected to the communication device 1 can easily transmit, receive, or transmit / receive the sub-data periodically in a cycle shorter than the time required for transmitting the main data. Therefore, in this embodiment, there is an advantage that it is easier to perform periodic communication that can withstand use in an industrial network not only for the main data but also for the sub-data.
[0091] (5) Variations The above-described embodiment is merely one of various embodiments of the present disclosure. The above-described embodiment can be modified in various ways depending on the design, etc., as long as the object of the present disclosure can be achieved. The same function as the communication device 1 may be embodied in a communication control method, a (computer) program, or a non-transitory recording medium on which a program is recorded, etc.
[0092] The communication control method according to one embodiment includes a communication step and a setting step. The communication step is a step of causing one or more slaves 2 connected to a communication device 1 to transmit a frame F1 including main data in a first cycle CT1. The setting step is a step of setting N second cycles CT2 (N is an integer equal to or greater than 2) within the first cycle CT1, and a slot S0 for communicating secondary data other than the main data for each second cycle CT2. The frame F1 includes at least one slot S0 in the middle of a transmission period of the main data. Furthermore, the program according to one embodiment causes one or more processors to execute the above communication control method.
[0093] Modifications of the above-described embodiment are listed below. The modifications described below can be applied in appropriate combination.
[0094] The communication device 1 in the present disclosure includes a computer system in the processing unit 11, for example. The computer system is mainly composed of a processor and a memory as hardware. The processor executes a program recorded in the memory of the computer system, thereby realizing the function of the processing unit 11 in the present disclosure. The program may be pre-recorded in the memory of the computer system, provided through an electric communication line, or provided by recording it in a non-transitory recording medium such as a memory card, an optical disk, or a hard disk drive that can be read by the computer system. The processor of the computer system is composed of one or more electronic circuits including a semiconductor integrated circuit (IC (Integrated Circuit)) or a large scale integrated circuit (LSI (Large Scale Integration)). The integrated circuits such as IC or LSI referred to here are called by different names depending on the degree of integration, and include integrated circuits called system LSI, VLSI (Very Large Scale Integration), or ULSI (Ultra Large Scale Integration). Furthermore, a field-programmable gate array (FPGA) that is programmed after the manufacture of the LSI, or a logic device that can reconfigure the connection relationship inside the LSI or the circuit partition inside the LSI, can also be adopted as a processor. The electronic circuits may be integrated in one chip or distributed among multiple chips. The chips may be integrated in one device or distributed among multiple devices. The computer system referred to here includes a microcontroller having one or more processors and one or more memories. Thus, the microcontroller is also composed of one or more electronic circuits including a semiconductor integrated circuit or a large-scale integrated circuit.
[0095] Moreover, it is not essential for the processing unit 11 that the multiple functions of the processing unit 11 are concentrated in one housing. The components of the processing unit 11 may be distributed across multiple housings. Furthermore, at least a part of the functions of the processing unit 11 may be realized by, for example, a server device and a cloud (cloud computing), etc. Conversely, as in the above-described embodiment, all of the functions of the processing unit 11 may be concentrated in one housing.
[0096] In one modified example, when a slave 2 with a relatively long communication cycle that can be supported by the setting process belongs to the communication system 100, the processing unit 11 of the communication device 1 may align the communication cycle that the slave 2 can support with the communication cycle that the other slaves 2 can support. In other words, the communication cycle that the slave 2 can support is a cycle that is necessary when executing a process with a relatively large processing load, such as a process of generating and transmitting data. Therefore, when executing a process with a relatively small processing load, such as a process of simply acquiring data, it is also possible to set the communication cycle that the slave 2 can support short. In this way, by aligning the communication cycle that the slave 2 can support with the communication cycle that the other slaves can support, the shortest communication cycle CT min In other words, it is possible to adjust the minimum communication cycle CT min may be arbitrarily settable.
[0097] In one modified example, the slot S0 may vary to a certain extent based on a predetermined time. In other words, it is preferable that the deviation of the slot S0 is within an allowable time that is shorter than at least the second cycle CT2. Specifically, in the second cycle CT2 in which the divided frame F2 including the main data region D1 is transmitted, the timing to start transmitting the slot S0 may be any timing as long as the slave 2 can complete reception of the slot S0 by the end of this second cycle CT2. For example, even if the end timing of the main data region D1 is later than the example shown in FIG. 2, the deviation of the timing to start transmitting the slot S0 is allowed as long as the reception of the slot S0 by each slave 2 is completed by the end of this second cycle CT2.
[0098] In one modified example, the order of the main data region D1 and the sub-data region D2 in the divided frame F2 is not limited to the case where the main data region D1 comes first, and the sub-data region D2 may come first.
[0099] In the setting process of the above embodiment, when there are multiple types of slaves 2 with mutually different compatible communication cycles, the second cycle CT2 is set to an integer multiple (m times the number of repetitions) of the least common multiple of the compatible communication cycles, but this is not limited to this. In one modified example, instead of all of the multiple types of slaves 2 being targets for allocation of slot S0, some of the slaves 2 may be excluded from being targeted for allocation of slot S0. For example, if only one type of slave 2 out of the multiple types of slaves 2 is targeted for allocation of slot S0, the second cycle CT2 is set to a communication cycle that this type of slave 2 can support.
[0100] In one modified example, the calculated second period CT2 may be set as the second period CT2 as is even if the calculated second period CT2 does not match an integer multiple of the communication period that can be supported by each slave 2. In this case, the first period CT1 may include a surplus period in addition to the N second periods CT2.
[0101] In one modified example, the slave 2 is not limited to a motor driving device, and may be other devices such as a sensor. In one modified example, the multiple slaves 2 do not need to include a motor driving device. For example, all the slaves 2 may be sensors.
[0102] In one modified example, the communication system 100 may have one slave 2. In this embodiment, the communication device 1 is capable of acquiring sub-data transmitted from the slave 2 in a second cycle CT2 while generating main data in each first cycle CT1.
[0103] In the above embodiment, the communication device 1 communicates with each slave 2 in a wired manner using a wired communication module, but this is not limited to the above. In one modified example, the communication device 1 may communicate with each slave 2 wirelessly using a wireless communication module.
[0104] In one modified example, the processing unit 201 of the slave 2 may use, for example, an empty area excluding the divided frame F2 in the second cycle CT2 to transmit other data other than the sub-data from the communication unit 202. As an example, the other data is data having a larger data size than the control data included in the main data, and may include images used for monitoring or managing the manufacturing process on a production line or in a factory. Unlike the main data and the sub-data, the other data does not need to be constant or real-time.
[0105] In the above embodiment, the processing unit 11 of the communication device 1 does not transmit sub-data to each slave 2 in the communication process, but may transmit sub-data to each slave 2. In other words, if the processing unit 11 has a margin in its processing performance, the processing unit 11 can execute the process of generating sub-data in parallel with the process of generating main data, and transmit the generated sub-data to each slave 2.
[0106] The method for updating the second cycle candidate CCT2 is to use the minimum communication cycle CT min and the number of repetitions m. In one modified example, an input of the second cycle candidate CCT2 may be accepted from a user, or a value twice the current second cycle candidate CCT2 may be used as the updated second cycle candidate CCT2.
[0107] In one modified example, the processing unit 11 may divide the main data into a plurality of divided data (main data pieces) in the division process, with the slave 2 as a unit. In one example, the processing unit 11 divides the main data into n divided data pieces, such as divided data pieces including the control data of the first slave 21, divided data pieces including the control data of the second slave 22, ..., divided data pieces including the control data of the n-th slave 2. In another example, the processing unit 11 divides the main data into n / 2 divided data pieces (n is an even number), such as divided data pieces including the control data of the first slave 21 and the control data of the second slave 22, divided data pieces including the control data of the third slave 23 and the control data of the fourth slave 24, ..., divided data pieces including the control data of the n-1th slave 2n-1 and the control data of the n-th slave 2n. In other words, each of the plurality of divided data pieces (main data pieces) may include control data for at least one slave 2. In this case, after adjusting the data size of the divided data (i.e., performing the division process) (step ST10), the transmission time of the divided frame F2 including the header D100, the transmission area of the divided data, the sub-data area D2, and the footer D101 may exceed the second cycle CT2 set in step ST9. In that case, the processing unit 11 may return to step ST11 and set (update) the second cycle CT2 again. Of course, the processing unit 11 may not use the slave 2 as a unit when dividing the main data into a plurality of main data pieces in the division process, as in the above-mentioned embodiment.
[0108] In one variant, if the main data is divided into a plurality of main data pieces in advance, the processing unit 11 does not need to perform the division process.
[0109] In one modified example, the processing unit 11 may not perform the process of readjusting the data size of the divided data (step ST10). For example, the processing unit 11 may readjust the data size Dm div The main data may be divided into divided data (main data pieces) based on the above.
[0110] In one modified example, the data size of each of the plurality of main data pieces may be arbitrarily set within a range that can be transmitted in the second cycle CT2. For example, in the division process, the processing unit 11 divides the main data into pieces of the maximum allowable data size ADm div Alternatively, the data may be divided into divided data pieces each having a smaller data size than the data size of the original data.
[0111] In one modified example, the multiple slaves 2 may not execute processes according to the main data in synchronization with each other. For example, in the example of Fig. 2, the first slave 21 and the second slave 22 may execute processes according to the main data upon completion of transmission of the divided frame F21, without waiting for transmission of the divided frame F22.
[0112] In one modification, the second periods CT2 may be set to different values for the different first periods CT1. That is, the second period CT2 may be variable for each first period CT1. However, it is preferable that each of the different second periods CT2 is obtained before the communication system 100 is operated.
[0113] In one example of a daisy chain connection, a first slave 21, a second slave 22, a third slave 23, ..., an n-th slave 2n may be connected in a line in this order to the communication device 1. In this case, a frame F1 transmitted from the communication device 1 is transmitted in the order of the first slave 21, the second slave 22, the third slave 23, ..., the n-th slave 2n.
[0114] (6) Description The following aspects are disclosed from the above-described embodiment and modified examples.
[0115] The communication device (1) of the first aspect includes a processing unit (11) and a communication unit (12). The communication unit (12) communicates with one or more slaves (2). The processing unit (11) has a function of executing a communication process and a setting process. The communication process includes causing the communication unit (12) to transmit a frame (F1) including main data to one or more slaves (2) in a first cycle (CT1). The setting process includes setting N (N is an integer of 2 or more) second cycles (CT2) within the first cycle (CT1). The setting process includes setting a slot (S0) in which communication of secondary data other than the main data is performed for each second cycle (CT2). The frame (F1) includes at least one slot (S0) in the middle of a transmission period of the main data.
[0116] According to this aspect, at least one of periodic transmission and reception of secondary data is possible in a cycle (second cycle (CT2)) shorter than the transmission time of the primary data. Therefore, this aspect has the advantage that secondary data can be easily transmitted or received periodically in a cycle shorter than the time required to transmit the primary data.
[0117] In the communication device (1) of the second aspect, in the first aspect, the setting process includes allocating a slot (S0) to at least one slave (2) of the one or more slaves (2) for each second cycle (CT2).
[0118] According to this embodiment, the slave (2) to which the slot (S0) is assigned can periodically transmit, receive, or transmit and receive secondary data using the slot (S0).
[0119] In the communication device (1) of the third aspect, in the first or second aspect, the frame (F1) includes data for controlling one or more slaves (2) in the first cycle (CT1).
[0120] According to this embodiment, it is possible to control the slave (2) every first cycle (CT1).
[0121] In the communication device (1) of the fourth aspect, in any one of the first to third aspects, the frame (F1) includes data for synchronizing the operations of one or more slaves (2).
[0122] According to this embodiment, it is possible to synchronize the operations of one or more slaves (2).
[0123] In the communication device (1) of the fifth aspect, in any one of the first to fourth aspects, one or more slaves (2) are daisy-chain connected to the communication device (1).
[0124] According to this embodiment, the communication device (1) needs to transmit the frame (F1) only to the slave (2) that is directly connected to the communication device (1) among the one or more slaves (2), which makes it easy to reduce the processing load of the communication device (1).
[0125] In the communication device (1) of the sixth aspect, in any one of the first to fifth aspects, the main data includes a plurality of main data fragments. In the communication process, the processing unit (11) divides the plurality of main data fragments at N second cycles (CT2) and transmits them.
[0126] According to this aspect, it becomes easier to transmit or receive the secondary data periodically, or transmit and receive the secondary data periodically, at a period shorter than the time required for transmitting the primary data.
[0127] In the communication device (1) of the seventh aspect, in the sixth aspect, the processing unit (11) further has a function of executing a division process for dividing the main data into a plurality of main data pieces.
[0128] According to this aspect, it is possible to divide the main data into a plurality of main data fragments and transmit these plurality of main data fragments by N second cycles (CT2), which facilitates the process of inserting a slot (S0) of the second cycle (CT2) in the middle of the transmission period of the frame (F1).
[0129] In the communication device (1) of the eighth aspect, in the seventh aspect, the data size of each of the plurality of main data pieces is set arbitrarily within a range that can be transmitted in the second cycle (CT2).
[0130] According to this aspect, the manner in which the main data fragments are divided can be set arbitrarily.
[0131] In a ninth aspect of the communication device (1), in any one of the sixth to eighth aspects, the processing unit (11) sets the second cycle (CT2) based on at least the first cycle (CT1), the data size (Dm) of the main data, and the data size (Ds) of the secondary data in the setting process.
[0132] According to this aspect, it is easy to set the number of times the second cycle (CT2) is included in the first cycle (CT1) to be large, and as a result, it is possible to increase the number of times that secondary data is transmitted, received, or transmitted and received in the first cycle (CT1).
[0133] In the communication device (1) of the 10th aspect, in any one of the 1st to 9th aspects, the processing unit (11) sets a period that is an integer multiple of a communication period that can be supported by one or more slaves (2) as the second period (CT2) in the setting process.
[0134] According to this embodiment, it is easy to achieve synchronization between the communication device (1) and one or more slaves (2).
[0135] In the communication device (1) of an eleventh aspect, in any one of the first to tenth aspects, at least one slave (2) of the one or more slaves (2) is a motor driving device that drives a motor.
[0136] According to this aspect, it is easy to periodically control the motor drive device using not only the main data but also the sub data.
[0137] A communication system (100) according to a twelfth aspect includes a communication device (1) according to any one of the first to eleventh aspects and one or more slaves (2). The one or more slaves (2) are connected to the communication device (1) and communicate with the communication device (1).
[0138] According to this aspect, it is possible to periodically transmit, receive, or transmit / receive secondary data different from the main data using the slot (S0). Therefore, according to this aspect, there is an advantage that the secondary data can be easily transmitted, received, or transmitted / received periodically in a period shorter than the time required for transmitting the main data.
[0139] A communication control method according to a thirteenth aspect includes a communication step and a setting step. The communication step includes causing one or more slaves (2) connected to a communication device (1) to transmit a frame (F1) including main data in a first cycle (CT1). The setting step includes setting N (N is an integer equal to or greater than 2) second cycles (CT2) within the first cycle (CT1). The setting step includes setting a slot (S0) for communicating secondary data other than the main data for each of the N second cycles (CT2). The frame (F1) includes at least one slot (S0) in the middle of a transmission period of the main data.
[0140] According to this aspect, it is possible to periodically transmit, receive, or transmit / receive the secondary data in a cycle (second cycle (CT2)) shorter than the transmission time of the primary data. Therefore, this aspect has the advantage that it is easy to periodically transmit, receive, or transmit / receive the secondary data in a cycle shorter than the time required to transmit the primary data.
[0141] A program according to a fourteenth aspect causes one or more processors to execute the communication control method of the thirteenth aspect.
[0142] According to this aspect, it is possible to periodically transmit, receive, or transmit / receive the secondary data in a cycle (second cycle (CT2)) shorter than the transmission time of the primary data. Therefore, this aspect has the advantage that it is easy to periodically transmit, receive, or transmit / receive the secondary data in a cycle shorter than the time required to transmit the primary data. [Industrial Applicability]
[0143] The present disclosure is suitable for a communication device, a communication system, a communication control method, and a program that need to transmit or receive secondary data within a predetermined time while periodically transmitting main data. [Explanation of symbols]
[0144] 1. Communications equipment 11 Processing section 12 Communications Department 2 Slave 100 Communication Systems CT1 1st cycle CT2 2nd cycle F1 Frame S0 Slot
Claims
1. A processing section; A communication unit for communicating with one or more slaves; Equipped with The processing unit includes: a communication process for causing the communication unit to transmit a frame including main data to the one or more slaves in a first cycle; a setting process for setting N second periods (N is an integer equal to or greater than 2) within the first period and a slot for communicating secondary data other than the primary data in each of the second periods; The function of carrying out the above is the frame includes at least one of the slots during a period during which the main data is transmitted; Communications equipment.
2. the setting process includes allocating the slot to at least one slave among the one or more slaves for each second period; The communication device according to claim 1 .
3. the frame includes data for controlling the one or more slaves in the first period; 3. A communication device according to claim 1 or 2.
4. the frame includes data for synchronizing operation of the one or more slaves; A communication device according to any one of claims 1 to 3.
5. the one or more slaves are daisy-chained to the communication device; A communication device according to any one of claims 1 to 4.
6. the primary data includes a plurality of primary data fragments; The processing unit, in the communication process, divides the plurality of main data pieces in the N second cycles and transmits the divided pieces. A communication device according to any one of claims 1 to 5.
7. The processing unit further has a function of executing a division process of dividing the main data into the plurality of main data pieces. The communication device according to claim 6.
8. a data size of each of the plurality of main data pieces is set within a range that can be transmitted in the second period; The communication device according to claim 7.
9. In the setting process, the processing unit sets the second cycle based on at least one of the first cycle, a data size of the main data, and a data size of the sub data. A communication device according to any one of claims 6 to 8.
10. The processing unit sets, in the setting process, a period that is an integer multiple of a communication period that can be supported by the one or more slaves as the second period. A communication device according to any one of claims 1 to 9.
11. At least one of the one or more slaves is a motor driving device that drives a motor. A communication device according to any one of claims 1 to 10.
12. A communication device according to any one of claims 1 to 11, the one or more slaves connected to the communication device for communicating with the communication device; Communication systems.
13. a communication step of causing one or more slaves connected to the communication device to transmit frames including main data in a first period; a setting step of setting N second periods (N is an integer equal to or greater than 2) within the first period, and a slot for communicating auxiliary data other than the main data in each of the second periods; Including, the frame includes at least one of the slots during a period during which the main data is transmitted; Communications control method.
14. A program causing one or more processors to execute the communication control method according to claim 13.
Citation Information
Patent Citations
Communication system
JP2014053741A
Communication device, control device, and communication method
JP2018064245A
Control device, control system, control method, and control program
JP2019139630A
Method and system for communicating information in a network
US6317415B1
