Controller, control method, and program

The controller optimizes transmission times based on data volume and buffer usage to enhance efficiency and reduce memory requirements in multi-unit systems.

JP2025114890AInactive Publication Date: 2025-08-06PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2022108560
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2025-08-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing controllers assign uniform transmission times to units regardless of data volume, leading to inefficiencies where devices with large data loads require multiple transmissions and devices with small loads have excess time, increasing memory needs and costs.

Method used

A controller with a communication unit, determination unit, and allocation unit dynamically allocates transmission times based on communication-related information, such as packet number or buffer usage, to optimize data transmission for each unit.

Benefits of technology

This approach ensures appropriate transmission times are set, reducing the need for excess memory capacity and lowering costs by efficiently utilizing transmission rights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025114890000001_ABST
    Figure 2025114890000001_ABST
Patent Text Reader

Abstract

To set an appropriate transmission permission time during communication.SOLUTION: A controller 10 is connected to a plurality of units. The controller 10 includes a communication unit 101, a determination unit 103, and an allocation unit 104. The communication unit 101 communicates with the plurality of units. The determination unit 103 determines a transmission permission time to be allocated when communicating with each of the plurality of units and the controller 10. The allocation unit 104 allocates the transmission permission time determined by the determination unit 103 for each of the plurality of units and the controller 10 to each of the plurality of units and the controller 10. The determination unit 103 also determines the transmission permission time allocated to each of the plurality of units and the controller 10 when performing communication on the basis of communication-related information regarding data in communication in each of the plurality of units and the controller 10.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure generally relates to a controller, a control method, and a program, and more particularly to a controller, a control method, and a program connected to a plurality of units. [Background technology]

[0002] Conventionally, a controller that is connected to a unit and communicates with the unit is known (for example, Patent Document 1).

[0003] In Patent Document 1, a device unit (unit) is connected to a controller unit (controller). The controller unit communicates with the device unit via a common bus line, and obtains information from an input device (external device) connected to the device unit via the common bus line. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Publication No. 2019-179436 Summary of the Invention [Problem to be solved by the invention]

[0005] Normally, when multiple units are connected to a controller, transmission rights are assigned individually to each unit and the controller to prevent collisions caused by two or more units simultaneously transmitting data to the controller. The time allowed for transmission (transmission time) assigned to a device (unit or controller) that has obtained a transmission right is the same regardless of the device. Therefore, a device that transmits a lot of data must obtain transmission rights multiple times to transmit, which takes time to transmit the data. Also, a device that transmits a small amount of data may have excess transmission time obtained from a single transmission right.

[0006] The present disclosure has been made in view of the above-mentioned problems, and aims to provide a controller, a control method, and a program that can set an appropriate transmission permission time during communication. [Means for solving the problem]

[0007] A controller according to one aspect of the present disclosure is a controller connected to a plurality of units. The controller includes a communication unit, a determination unit, and an allocation unit. The communication unit communicates with the plurality of units. The determination unit determines a permitted communication time to be allocated to each of the plurality of units and the controller when communicating. The allocation unit allocates the permitted communication time determined by the determination unit for each of the plurality of units and the controller to each of the plurality of units and the controller. The determination unit determines the permitted communication time to be allocated to each of the plurality of units and the controller when communicating, based on communication-related information related to data in communication between each of the plurality of units and the controller.

[0008] A controller according to one aspect of the present disclosure is a controller connected to a plurality of units. The controller includes a communication unit, a determination unit, and an allocation unit. The communication unit communicates with the plurality of units. The determination unit determines a permitted communication time to be allocated to each of the plurality of units and the controller when communicating. The allocation unit allocates the permitted communication time determined by the determination unit for each of the plurality of units and the controller to each of the plurality of units and the controller. Each of the plurality of units is connectable to one or more external devices. The determination unit determines the permitted communication time to be allocated to each of the plurality of units and the controller when communicating, based on at least one of the number of external devices connected to each of the plurality of units and external communication information related to communication with external devices.

[0009] A control method according to one aspect of the present disclosure is a control method used in a controller that is connected to a plurality of units and has a communication unit that communicates with the plurality of units. The control method includes a determining step and an allocating step. The determining step determines a permitted communication time to be allocated to each of the plurality of units and the controller when communicating with the plurality of units. The allocating step allocates the permitted communication time determined for each of the plurality of units and the controller in the determining step to each of the plurality of units and the controller. The determining step determines the permitted communication time to be allocated to each of the plurality of units and the controller when communicating with the plurality of units and the controller based on communication-related information related to data in communication between the plurality of units and the controller.

[0010] A control method according to one aspect of the present disclosure is a control method used in a controller connected to a plurality of units, each of which is connectable to one or more external devices, and including a communication unit that communicates with the plurality of units. The control method includes a determination step and an allocation step. The determination step determines a permitted communication time to be allocated to each of the plurality of units and the controller when communicating. The allocation step allocates the permitted communication time determined for each of the plurality of units and the controller in the determination step to each of the plurality of units and the controller. The determination step determines the permitted communication time to be allocated to each of the plurality of units and the controller when communicating, based on at least one of the number of external devices connected to each of the plurality of units and external communication information related to communication with the external devices.

[0011] A program according to one aspect of the present disclosure is a program for causing a computer system to execute any one of the above control methods. [Effects of the Invention]

[0012] According to the present disclosure, an appropriate transmission permission time can be set during communication. [Brief explanation of the drawings]

[0013] [Figure 1] FIG. 1 is a diagram showing the system configuration of a control system including a controller according to the first embodiment. [Figure 2] FIG. 2 is a block diagram showing the configuration of the controller of the above embodiment. [Figure 3] FIG. 3 is a block diagram showing the configuration of a unit connected to the controller of the above embodiment. [Figure 4] FIG. 4 is a sequence diagram showing an example of the operation of the controller in the embodiment. [Figure 5] 5 is a sequence diagram showing an example of the operation of the control system of the embodiment. [Figure 6] 6 is a sequence diagram showing an example of the operation of the control system of the embodiment, continued from FIG. [Figure 7] FIG. 7 is a diagram showing the system configuration of a control system including a controller according to the second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0014] The embodiments and modifications described below are merely examples of the present disclosure, and the present disclosure is not limited to the embodiments and modifications. Various modifications other than the embodiments and modifications are possible depending on the design, etc., as long as they do not deviate from the technical idea of the present disclosure.

[0015] (Embodiment 1) The controller 10 according to the first embodiment will be described below with reference to FIGS.

[0016] (1) Overview The controller 10 according to the first embodiment is provided in a control system 1. In other words, the control system 1 includes the controller 10. Furthermore, the control system 1 includes a plurality of units 20. That is, as shown in FIG. 1 , the control system 1 includes the controller 10, a plurality of units 20 (three in the illustrated example), and a terminal unit 30.

[0017] The controller 10 is connected to a plurality of units 20. In the control system 1, the controller 10 is used as a reference and the controller 10, the plurality of units 20, and the termination unit 30 are connected in this order. The controller 10 and the plurality of units 20 are connected via LVDS (Low Voltage Differential Signaling).

[0018] The unit 20 is an add-on unit that can be added to the controller 10, such as a communication unit. The unit 20 is configured to be connectable to an external device 50. The unit 20 transmits data to the external device 50 connected to the unit 20 based on a command received from the controller 10. The unit 20 also receives data from the external device 50 and outputs it to the controller. The external device 50 is a device that drives a sensor or a motor to perform a desired operation, etc. Each unit 20 transmits and receives data to the connected external device 50 via serial communication, Ethernet (registered trademark), or the like. When describing each unit 20 individually, they will be referred to as unit 20a, unit 20b, and unit 20c.

[0019] The terminal unit 30 is connected to the unit 20c located at the end of the plurality of units 20.

[0020] 2, the controller 10 includes a communication unit 101, a determination unit 103, and an allocation unit 104. The communication unit 101 communicates with a plurality of (here, three) units 20. The determination unit 103 determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10 when communication is performed. The allocation unit 104 allocates the permitted communication time determined by the determination unit 103 for each of the plurality of units 20 and the controller 10 to each of the plurality of units 20 and the controller 10. The determination unit 103 determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10 when communication is performed, based on communication-related information related to data in communication between each of the plurality of units 20 and the controller 10.

[0021] With this configuration, the communication permission time is determined for each of the plurality of units 20 and the controller 10 based on the communication-related information of each of the plurality of units 20 and the controller 10, so that an appropriate transmission permission time can be set during communication.

[0022] In the first embodiment, the controller 10 and the multiple units 20 communicate using a token passing method. That is, one of the multiple units 20 and the controller 10 that has obtained the transmission right transmits data to another device of the multiple units 20 and the controller 10 that has obtained the transmission right.

[0023] (2) Composition (2.1) Controller The controller 10 is a programmable controller. The controller 10 is connected to a plurality of units 20 and is configured to be able to communicate with the plurality of units 20. The controller 10 and the plurality of units 20 communicate with each other via a bus 40.

[0024] As shown in FIG. 2, the controller 10 includes a connector 11, a control unit 12, and a storage unit 13.

[0025] The controller 10 includes, for example, a computer system having a processor and a memory. The processor executes a program stored in the memory, causing the computer system to function as the control unit 12. The program executed by the processor is pre-recorded in the memory of the computer system here, but may also be provided by being recorded on a non-transitory recording medium such as a memory card, or via a telecommunications line such as the Internet.

[0026] The connector 11 connects to the units 20 and extends the bus. That is, communication between the controller 10 and each unit 20 is performed via a bus 40 connected via the connector 11. The connector 11 outputs data output from the control unit 12 of the controller 10 to the unit 20, and outputs data output from the unit 20 to the control unit 12 of the controller 10.

[0027] The control unit 12 is configured with, for example, a field-programmable gate array (FPGA) that is a programmable logic controller (PLC). Note that the control unit 12 is not limited to a PLC.

[0028] As shown in FIG. 2, the control unit 12 includes a communication unit 101, a measurement unit 102, a determination unit 103, and an allocation unit 104.

[0029] The communication unit 101 is connected to a plurality of units 20 via a bus 40. The communication unit 101 transmits and receives data to and from the units 20 with which it communicates via the connector 11 and the bus 40. As shown in FIG. 2 , the communication unit 101 includes a transmission function unit 111, a reception function unit 112, and a buffer 113.

[0030] When the transmitting function unit 111 acquires the transmission right by the token passing method, it transmits data to the unit 20 with which it is to communicate via the bus 40. The transmitting function unit 111 releases the transmission right when either the maximum time allocated when the transmission right was acquired has elapsed or the data transmission is completed. When transmitting data, the transmitting function unit 111 divides the data into one or more packets and transmits them. In other words, the transmitting function unit 111 packetizes the data and transmits it.

[0031] The receiving function unit 112 receives data via the bus 40 from a unit 20 that has acquired the transmission right by the token passing method among the plurality of units 20 .

[0032] The buffer 113 holds data to be transmitted to the unit 20 as a communication target, etc. The buffer 113 holds data received from the unit 20. Since the data transmitted from the unit 20 is packetized, the receiving function unit 112 combines the packetized data held in the buffer 113 when the receiving function unit 112 has completed receiving the data from the unit 20.

[0033] The measuring unit 102 measures the number of packets during communication for each of the multiple units 20 and the controller 10. The measuring unit 102 measures the number of packets transmitted for each unit 20 in a predetermined period (e.g., one second). The measuring unit 102 also measures the number of packets received by the controller 10 from each of the multiple units 20 in a predetermined period as the number of packets transmitted from the controller 10 to the unit 20 in a predetermined period (e.g., one second).

[0034] The determination unit 103 determines the allowable communication time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed. Specifically, the determination unit 103 determines the allowable communication time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed, based on communication-related information related to data in communication between each of the multiple units 20 and the controller 10. More specifically, the determination unit 103 determines the allowable communication time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed, using information including measurement results by the measurement unit 102 as communication-related information. Here, the determination unit 103 determines the allowable communication time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed, based on the number of packets of each of the multiple units 20 and the controller 10 measured by the measurement unit 102. That is, when one of the multiple units 20 and the controller 10 has a larger number of packets than the other devices, the determination unit 103 determines a longer allowable communication time for the one device than for the other devices. For example, the determination unit 103 determines a longer communication allowable time for a device that transmits the largest number of packets in a predetermined period of time among the multiple units 20 and the controller 10 than for other devices. The determination unit 103 determines a shorter communication allowable time for a device that transmits the fewest number of packets in a predetermined period of time among the multiple units 20 and the controller 10 than for other devices. The determination unit 103 determines the communication allowable time for the multiple units 20 and the controller 10 so that the fewer the number of packets in a predetermined period of time, the shorter the communication allowable time becomes.

[0035] Here, the communication permission time in the first embodiment corresponds to the maximum number of times (maximum period) that transmission can be performed with the acquired transmission right. For example, the command communication band used when transmitting a command has a fixed time required for one transmission. The time required for one transmission is, for example, 60 us. The determination unit 103 determines the maximum period as the communication permission time, so that the controller 10 or unit 20 that has acquired the transmission right can secure a time of "60 us x maximum period" for communication.

[0036] The allocating unit 104 allocates the permitted communication time determined by the determining unit 103 for each of the plurality of units 20 and the controller 10 to each of the plurality of units 20 and the controller 10. For example, the measuring unit 102 periodically measures the number of packets communicated by each of the plurality of units 20 and the controller 10 in a predetermined time period, thereby enabling the allocating unit 104 to dynamically change the permitted communication time allocated to each of the plurality of units 20 and the controller 10.

[0037] The storage unit 13 is configured with a device selected from a ROM (Read Only Memory), a RAM (Random Access Memory), an EEPROM (Electrically Erasable Programmable Read Only Memory), etc. The storage unit 13 stores data to be transmitted to the unit 20 and data received from the unit 20.

[0038] (2.2) Unit The unit 20 is connected to the controller 10 directly or via another unit 20, and is configured to be able to communicate with the controller 10. As described above, the controller 10 and the unit 20 communicate via the bus 40 using a token passing method. As described above, the unit 20 is an add-on unit, such as a communication unit.

[0039] As shown in FIG. 3, the unit 20 includes two connectors 21 and 22 and a control unit .

[0040] The unit 20 includes, for example, a computer system having a processor and a memory. The processor executes a program stored in the memory, causing the computer system to function as the control unit 23. The program executed by the processor is pre-recorded in the memory of the computer system here, but may also be provided by being recorded on a non-transitory recording medium such as a memory card, or via a telecommunications line such as the Internet.

[0041] The connectors 21 and 22 are connected to the controller 10 or the units 20 and extend the bus. For example, the connector 21 of the unit 20a is connected to the connector 11 of the controller 10, and the connector 22 of the unit 20a is connected to the connector 21 of the unit 20b. The connector 22 of the unit 20b is connected to the connector 21 of the unit 20c. The connector 22 of the unit 20c is connected to the connector 31 of the terminating unit 30.

[0042] The connector 21 receives data output from the control unit 12 of the controller 10 and outputs data addressed to the controller. The connector 22 receives data output from another unit 20 and outputs data output from the controller 10 addressed to the other unit 20.

[0043] The connector 21 of the unit 20a receives data output from the control unit 12 of the controller 10. If the received data is addressed to the unit 20a, the unit 20a holds the data. If the received data is not addressed to the unit 20a, that is, if the received data is addressed to the unit 20b or the unit 20c, the unit 20a outputs the data to another unit 20 via the connector 22.

[0044] As shown in FIG. 3, the control unit 23 includes a communication unit 201.

[0045] The communication unit 201 transmits and receives data to and from the controller 10 via the bus 40 and the connector 21. The communication unit 201 transmits and receives data to and from other units 20 via the bus 40 and the connector 22. As shown in FIG. 3 , the communication unit 201 includes a transmitting function unit 211, a receiving function unit 212, and a buffer 213.

[0046] When the transmitting function unit 211 acquires the transmission right by the token passing method, it transmits data to the controller 10 via the bus 40. The transmitting function unit 211 releases the transmission right when either the maximum time allocated when the transmission right was acquired has elapsed or the data transmission is completed. When transmitting data, the transmitting function unit 211 divides the data into one or more packets and transmits them. In other words, the transmitting function unit 211 packetizes the data and transmits it.

[0047] The receiving function unit 212 receives data from the controller 10 that has acquired the transmission right by the token passing method via the bus 40. When the receiving function unit 212 receives data addressed to another unit 20, it outputs the received data from the connector 22 to the other unit 20 without performing any processing.

[0048] The buffer 213 holds data to be transmitted to the controller 10. The buffer 213 holds data addressed to the unit 20 that is received from the controller 10. Since the data transmitted from the controller 10 is packetized, the receiving function unit 212 combines the packetized data held in the buffer 213 when data transmission from the unit 20 is completed.

[0049] The unit 20 transmits the received data to the external device 50 based on the content of the data received from the controller 10 by the receiving function unit 212. The unit 20 also transmits the data received from the external device 50 to the controller 10 by the transmitting function unit 211.

[0050] (3) Operation (3.1) Controller operation Here, the operation of the controller 10 to determine the communication permission time to be allocated to the plurality of units 20 and the controller 10 will be described with reference to FIG.

[0051] The determination unit 103 of the controller 10 performs a determination process (step S1). Specifically, the determination unit 103 determines the permitted communication time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed, based on communication-related information in the communication between each of the multiple units 20 and the controller 10. More specifically, the determination unit 103 determines the permitted communication time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed, based on the number of packets of each of the multiple units 20 and the controller 10 measured by the measurement unit 102.

[0052] The allocating unit 104 of the controller 10 performs an allocation process (step S2). Specifically, the allocating unit 104 allocates the communication allowable time determined for each of the plurality of units 20 and the controller 10 by the determining unit 103 to each of the plurality of units 20 and the controller 10.

[0053] The controller 10 periodically performs the above operation. For example, the above operation is periodically performed by the measuring unit 102 periodically measuring the number of packets in communication within a predetermined time period for each of the multiple units 20 and the controller 10. In other words, by performing the above operation, the controller 10 can dynamically change the permitted communication time allocated to each of the multiple units 20 and the controller 10.

[0054] (3.2) Operation of Control System 1 An example of the operation of the control system 1 during communication will now be described with reference to Figures 5 and 6. Different identifiers are assigned to the controller 10 and each of the multiple units 20. Here, the controller 10 is assigned the identifier "0." Unit 20a is assigned the identifier "1," unit 20b is assigned the identifier "2," and unit 20c is assigned the identifier "3."

[0055] Furthermore, the communication permission time determined by the determination unit 103 of the controller 10 is allocated by the allocation unit 104 to each of the plurality of units 20 and the controller 10 .

[0056] If there is no need to perform communication, the controller 10 transmits a command to the unit 20a whose identifier is ID1 to the effect that the transmission right has not been acquired (step S11).

[0057] When unit 20a receives a command from controller 10 indicating that the transmission right has not been acquired, if there is no need to communicate, unit 20a transmits a command indicating that the transmission right has not been acquired to unit 20b whose identifier is ID2 (step S12).

[0058] When unit 20b receives a command from unit 20a indicating that the transmission right has not been acquired, if there is no need for communication, unit 20b transmits a command indicating that the transmission right has not been acquired to unit 20c whose identifier is ID3 (step S13).

[0059] When unit 20c receives a command from unit 20b indicating that the transmission right has not been acquired, if there is no need to perform communication, unit 20c transmits a command indicating that the transmission right has not been acquired to controller 10 whose identifier is ID0 (step S14).

[0060] The controller 10 receives a transmission start event from the outside (step S15). For example, the controller 10 receives a transmission start event indicating that data is to be transmitted to the external device 50 via the unit 20c.

[0061] The controller 10 acquires the transmission right and transmits the data to the unit 20c (step S16). At this time, the controller 10 holds the transmission right until the communication permission time allocated to the controller 10 has elapsed or until the data transmission is completed.

[0062] When the allocated communication permission time has elapsed or when data transmission is completed, the controller 10 transmits a command to the unit 20a with the identifier ID1 to the effect that the transmission right has been released (step S17).

[0063] When unit 20a receives a command from controller 10 indicating that the transmission right has been released, if there is no need to perform communication, unit 20a transmits a command to unit 20b with identifier ID2 indicating that the transmission right has not been acquired (step S18).

[0064] When unit 20b receives a command from unit 20a indicating that the transmission right has not been acquired, if there is no need for communication, unit 20b transmits a command indicating that the transmission right has not been acquired to unit 20c whose identifier is ID3 (step S19).

[0065] When the unit 20c receives data to be transmitted to the controller 10 from the external device 50, it acquires the transmission right and transmits the data to the controller 10 (step S20). At this time, the unit 20c holds the transmission right until the communication permission time allocated to the unit 20c has elapsed or until the transmission of the data is completed.

[0066] When the allocated communication permission time has elapsed or when data transmission is completed, the unit 20c transmits a command to the controller 10 with the identifier ID0 to the effect that the transmission right has been released (step S21).

[0067] In the control system 1, as described above, the transmission right is transferred, and the device (controller 10 or unit 20) that has acquired the transmission right transmits data. The control system 1 repeats this operation. While the above operation is being repeated, the measurement unit 102 of the controller 10 measures the number of packets during communication for each of the multiple units 20 and the controller 10. Then, the determination unit 103 determines the permitted communication time for each of the multiple units 20 and the controller 10 based on the measurement results for each of the multiple units 20 and the controller 10. Once the permitted communication time for each of the multiple units 20 and the controller 10 has been determined, the allocation unit 104 allocates the determined permitted communication time for each of the multiple units 20 and the controller 10 to each of the multiple units 20 and the controller 10.

[0068] (4) Advantages The controller 10 according to the first embodiment is connected to a plurality of units 20. The controller 10 includes a communication unit 101, a determination unit 103, and an allocation unit 104. The communication unit 101 communicates with the plurality of units 20. The determination unit 103 determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10 when communication is performed. The allocation unit 104 allocates the permitted communication time determined by the determination unit 103 for each of the plurality of units 20 and the controller 10 to each of the plurality of units 20 and the controller 10. The determination unit 103 determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10 when communication is performed, based on communication-related information related to data in communication between each of the plurality of units 20 and the controller 10.

[0069] According to this configuration, the communication permission time is determined for each of the multiple units 20 and the controller 10 based on the communication-related information of each of the multiple units 20 and the controller 10, so that an appropriate transmission permission time can be set during communication.

[0070] Furthermore, when a conventional controller (hereinafter referred to as the controller of the comparative example) transmits a larger amount of data to an external device via a unit, the controller of the comparative example may not be able to transmit all of the data with the one transmission right it acquires. In this case, the unit must buffer the data until the controller of the comparative example acquires the next transmission right. Therefore, the unit requires more memory for buffering. For example, it is possible to increase the memory capacity in advance, but this increases costs.

[0071] Therefore, as explained in the first embodiment, by setting an appropriate transmission permission time during communication, the controller 10 is more likely to transmit all data with a single transmission right acquired. If the unit 20 receives all data with a single transmission right acquired by the controller 10, the unit 20 does not need to buffer the data. Therefore, there is no need to increase the memory capacity more than necessary, which makes it possible to suppress increases in costs.

[0072] (5) Variations (5.1) Variation 1 The measurement unit 102 may measure the data size. For example, the measurement unit 102 measures the size of data transmitted to each of the plurality of units 20 and the controller 10. When the data size of one of the plurality of units 20 and the controller 10 is larger than that of the other devices, the determination unit 103 determines, for the one device, a longer communication allowable time than for the other devices.

[0073] The measuring unit 102 may also measure both the number of packets and the data size. That is, the measuring unit 102 measures at least one of the number of packets and the data size during communication for each of the multiple units 20 and the controller 10.

[0074] In the first modification, the controller 10 of the first modification can also set an appropriate transmission permission time during communication for each of the multiple units 20 and the controller 10 of the first modification. Furthermore, since an appropriate transmission permission time during communication is set, there is no need to increase the memory capacity more than necessary, which makes it possible to suppress an increase in costs.

[0075] (5.2) Variation 2 The measuring unit 102 may measure the usage of the buffers 113, 213 for each of the multiple units 20 and the controller 10. For example, the measuring unit 102 measures the buffer capacity in the buffer 113 in which data to be transmitted to the unit 20 with which communication is being performed is held. The measuring unit 102 measures the buffer capacity in the buffer 213 in which data to be transmitted to the controller 10 is held.

[0076] The determination unit 103 determines the communication permission time to be allocated to each of the multiple units 20 and the controller 10 when communication is performed, using the measurement results by the measurement unit 102, i.e., information including the usage amounts of each of the buffers 113, 213, as communication-related information.

[0077] Specifically, when the buffer usage is high, the determining unit 103 determines the longest communication time for the corresponding unit 20 or controller 10 among the plurality of units 20 and controller 10 as the permitted communication time.

[0078] In the second modification, the controller 10 of the second modification can also set an appropriate transmission permission time during communication for each of the multiple units 20 and the controller 10 of the second modification. Furthermore, since an appropriate transmission permission time during communication is set, there is no need to increase the memory capacity more than necessary, which makes it possible to suppress an increase in costs.

[0079] (5.3) Variation 3 The controller 10 may store in advance a plurality of different ranges of the number of packets in one-to-one correspondence with a plurality of candidate allowed times. For example, the controller 10 stores in advance three different ranges of the number of packets (first range, second range, third range) in one-to-one correspondence with a plurality of candidate allowed times (first candidate allowed time, second candidate allowed time, third candidate allowed time). The maximum value of the first range is smaller than the minimum value of the second range, and the maximum value of the second range is smaller than the minimum value of the third range. The first candidate allowed time is smaller than the second candidate allowed time, and the second candidate allowed time is smaller than the third candidate allowed time.

[0080] The determination unit 103 determines which of a plurality of pre-stored ranges the range to which the number of packets of one of the plurality of units 20 and the controller 10 belongs. The determination unit 103 determines the candidate allowed time corresponding to the range to which the number of packets of the one device belongs as the allowed communication time for the one device. In other words, if one of the plurality of units 20 and the controller 10 has a larger number of packets than the other devices and the range to which the number of packets of the one device belongs is different from the range to which the number of packets of the other devices belong, the determination unit 103 determines for the one device a time that is longer than the allowed communication time for the other devices.

[0081] In the third modification, the controller 10 of the third modification can also set an appropriate transmission permission time during communication for each of the multiple units 20 and the controller 10 of the third modification. Furthermore, since an appropriate transmission permission time during communication is set, there is no need to increase the memory capacity more than necessary, which makes it possible to suppress increases in costs.

[0082] (5.4) Variation 4 Furthermore, Modification 3 may be applied to Modification 1. In this case, the controller 10 pre-stores a plurality of different ranges of data size and a plurality of candidate allowed times in one-to-one correspondence. For example, the controller 10 pre-stores three different ranges of data size (first range, second range, third range) and a plurality of candidate allowed times (first candidate allowed time, second candidate allowed time, third candidate allowed time) in one-to-one correspondence. The maximum value of the first range is smaller than the minimum value of the second range, and the maximum value of the second range is smaller than the minimum value of the third range. The first candidate allowed time is smaller than the second candidate allowed time, and the second candidate allowed time is smaller than the third candidate allowed time.

[0083] The determination unit 103 determines which of a plurality of pre-stored ranges the data size of one of the plurality of units 20 and the controller 10 belongs to. The determination unit 103 determines the candidate allowable time corresponding to the range to which the data size of the one device belongs as the allowable communication time for the one device. In other words, when the data size of one of the plurality of units 20 and the controller 10 is larger than that of the other devices and the range to which the data size of the one device belongs is different from the range to which the data size of the other devices belongs, the determination unit 103 determines the allowable communication time for the one device to be a time that is longer than that of the other devices.

[0084] In this case as well, the same effects as those of the first embodiment and other modifications can be obtained.

[0085] (5.5) Variation 5 Furthermore, Modification 3 may be applied to Modification 2. In this case, the controller 10 pre-stores a plurality of different ranges for the usage amounts of the buffers 113 and 213 in one-to-one correspondence with a plurality of candidate allowed times. For example, the controller 10 pre-stores three different ranges (first range, second range, third range) for the buffers 113 and 213 in one-to-one correspondence with a plurality of candidate allowed times (first candidate allowed time, second candidate allowed time, third candidate allowed time). The maximum value of the first range is smaller than the minimum value of the second range, and the maximum value of the second range is smaller than the minimum value of the third range. The first candidate allowed time is smaller than the second candidate allowed time, and the second candidate allowed time is smaller than the third candidate allowed time.

[0086] The determination unit 103 determines which of a plurality of pre-stored ranges the buffer usage of one of the plurality of units 20 and the controller 10 belongs to. The determination unit 103 determines the candidate allowable time corresponding to the range to which the buffer usage of the one device belongs as the allowable communication time for the one device. In other words, if one of the plurality of units 20 and the controller 10 has a larger buffer usage than the other devices and the range to which the buffer usage of the one device belongs is different from the range to which the buffer usage of the other devices belongs, the determination unit 103 determines the allowable communication time for the one device to be a time that is longer than the communication time for the other devices.

[0087] In this case as well, the same effects as those of the first embodiment and other modifications can be obtained.

[0088] (5.6) Variation 6 An upper limit may be defined for the permitted communication time. For example, when the result (number of packets) measured by the measuring unit 102 is equal to or greater than a predetermined value, the determining unit 103 may determine the upper limit of the permitted communication time as the permitted communication time for the unit 20 or controller 10 to be measured. That is, when the number of packets measured by the measuring unit 102 is equal to or greater than a predetermined value, the determining unit 103 may determine a predetermined upper limit (upper limit number of times) as the maximum number of times (maximum period) that transmission can be performed with the acquired transmission right for the unit 20 or controller 10 to be measured.

[0089] In this case as well, the same effects as those of the first embodiment and other modifications can be obtained.

[0090] (5.7) Variation 7 Although the token passing method has been used as an example of a communication method between the controller 10 and the multiple units 20, the communication method is not limited to this. Any communication method may be used as long as one of the multiple units 20 and the controller 10 can communicate data.

[0091] In this case as well, the same effects as those of the first embodiment and other modifications can be obtained.

[0092] (5.8) Variation 8 The above-described first embodiment is merely one of various embodiments of the present disclosure. The above-described first embodiment can be modified in various ways depending on the design and the like, as long as the object of the present disclosure can be achieved.

[0093] Furthermore, functions similar to those of the controller 10 may be embodied as a control method, a computer program, a non-transitory recording medium on which a program is recorded, or the like. A control method according to one aspect is a control method used by a controller 10 connected to a plurality of units 20. The controller 10 includes a communication unit 101 that communicates with the plurality of units 20. The control method includes a determination step and an allocation step. The determination step determines a permitted communication time to be allocated to each of the plurality of units 20 and the controller 10 when communicating. The allocation step allocates the permitted communication time determined for each of the plurality of units 20 and the controller 10 in the determination step to each of the plurality of units 20 and the controller 10. The determination step determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10 when communicating, based on communication-related information related to data in communication between the plurality of units 20 and the controller 10. A program according to one aspect is a program for causing a computer system to function as the above-described control method.

[0094] The controller 10 in the present disclosure includes a computer system. The computer system is primarily composed of a processor and memory as hardware. The functions of the controller 10 in the present disclosure are realized by the processor executing a program stored in the memory of the computer system. The program may be pre-stored in the memory of the computer system, provided via a telecommunications line, or provided in a non-transitory recording medium readable by the computer system, such as a memory card, optical disk, or hard disk drive. The processor of the computer system is composed of one or more electronic circuits, including a semiconductor integrated circuit (IC) or a large-scale integrated circuit (LSI). The integrated circuits, such as ICs and LSIs, are referred to by different names depending on the degree of integration, and include integrated circuits called system LSIs, very large-scale integrations (VLSIs), and ultra-large-scale integrations (ULSIs). Furthermore, logic devices that can be programmed after the LSI is manufactured and that can reconfigure the connections within the LSI or the circuit partitions within the LSI can also be used as processors. Multiple electronic circuits may be integrated into a single chip or distributed across multiple chips. The multiple chips may be integrated into one device or distributed across multiple devices. The computer system referred to here includes a microcontroller having one or more processors and one or more memories. Therefore, the microcontroller also comprises one or more electronic circuits, including semiconductor integrated circuits or large-scale integrated circuits.

[0095] (Embodiment 2) In the second embodiment, the method of determining the communication permission time is different from that in the first embodiment. The following description will focus on the differences from the first embodiment. Note that the same components as those in the first embodiment are given the same reference numerals, and the description thereof will be omitted as appropriate.

[0096] (1) Composition The controller 10A according to the second embodiment is provided in the control system 1A. In other words, the control system 1A includes the controller 10A. Furthermore, the control system 1A includes a plurality of units 20. That is, as shown in FIG. 7, the control system 1A includes the controller 10A, a plurality of units 20 (three in the illustrated example), and a terminal unit 30.

[0097] Each unit 20 according to the second embodiment is configured to be connectable to one or more external devices 50. In Fig. 7, unit 20a is connected to one external device 50, unit 20b is connected to four external devices 50, and unit 20c is connected to two external devices 50.

[0098] The controller 10A is a programmable controller, similar to the controller 10 of the first embodiment. The controller 10A is connected to a plurality of units 20 and is configured to be able to communicate with the plurality of units 20. The controller 10A and the plurality of units 20 communicate with each other via a bus 40. Here, the controller 10A and the plurality of units 20 communicate with each other using a token passing method.

[0099] 7, the controller 10A includes a connector 11, a control unit 12A, and a storage unit 13. The connector 11 and storage unit 13 of the second embodiment are similar to the connector 11 and storage unit 13 of the first embodiment, and therefore will not be described here.

[0100] The controller 10A includes, for example, a computer system having a processor and a memory. The processor executes a program stored in the memory, causing the computer system to function as the control unit 12A. The program executed by the processor is pre-recorded in the memory of the computer system here, but may also be provided by being recorded on a non-transitory recording medium such as a memory card, or via a telecommunications line such as the Internet.

[0101] The control unit 12A is configured with, for example, an FPGA that is a PLC, but the control unit 12A is not limited to a PLC.

[0102] As shown in FIG. 7, the control unit 12A includes a communication unit 101, a determination unit 103A, and an allocation unit 104A.

[0103] The communication unit 101 of the second embodiment is similar to the communication unit 101 of the first embodiment, and therefore a description thereof will be omitted here.

[0104] The determination unit 103A determines the permitted communication time to be allocated when communication is performed for each of the multiple units 20 and the controller 10A. The determination unit 103A determines the permitted communication time to be allocated when communication is performed for each of the multiple units 20 and the controller 10A, based on the number of external devices 50 connected to each of the multiple units 20.

[0105] For example, the determination unit 103A acquires, for each of the multiple units 20, the number of external devices 50 connected to the unit 20 through a user input operation. The determination unit 103A determines the permitted communication time to be allocated to each of the multiple units 20 and the controller 10A when communication is performed, based on the number of external devices 50 connected to each of the multiple units 20 acquired by the determination unit 103A through a user input operation. More specifically, when determining the permitted communication time based on the number of external devices 50, if one of the multiple units 20 has a greater number of connected external devices 50 than the other units 20, the determination unit 103A determines a longer communication time than the other units 20 as the permitted communication time for the one unit 20. Furthermore, the determination unit 103A determines the longest permitted communication time of the multiple permitted communication times determined for each of the multiple units 20 as the permitted communication time for the controller 10A.

[0106] Here, the permitted communication time in the second embodiment corresponds to the maximum number of times (maximum period) that transmission can be performed with the acquired transmission right, similar to the permitted communication time in the first embodiment.

[0107] The allocating unit 104A allocates the permitted communication time determined by the determining unit 103A for each of the multiple units 20 and the controller 10A to each of the multiple units 20 and the controller 10A. For example, when a unit 20 is newly connected to the controller 10A, the determining unit 103A acquires the number of external devices 50 connected to the unit 20 newly connected to the controller 10A, thereby allowing the allocating unit 104A to allocate the permitted communication time to each of the multiple units 20 and the controller 10A. Alternatively, when the number of external devices 50 connected to a unit 20 already connected to the controller 10A is changed, the determining unit 103A acquires the number of external devices 50 connected to the unit 20 whose number of external devices 50 has been changed, thereby allowing the allocating unit 104A to allocate the permitted communication time to each of the multiple units 20 and the controller 10A.

[0108] (2) Operation Here, an operation of determining the communication permission time that the controller 10A allocates to the multiple units 20 and the controller 10A will be described.

[0109] 4, the determination unit 103A of the controller 10A performs a determination process based on the number of external devices 50 connected to each of the multiple units 20, instead of the communication-related information. Specifically, the determination unit 103A acquires the number of external devices 50 connected to each of the multiple units 20. Based on the number of external devices 50 acquired for each of the multiple units, the determination unit 103A determines the communication allowance time to be allocated when communication is performed for each of the multiple units 20 and the controller 10A.

[0110] The allocation unit 104A of the controller 10A performs allocation processing in the same manner as in step S2 shown in FIG.

[0111] The above operation is performed when a new unit 20 is connected to the controller 10A, or when the number of external devices 50 connected to a unit 20 already connected to the controller 10A is changed.

[0112] The operation of the control system 1A during communication is the same as the operation shown in FIGS. 5 and 6 described in the first embodiment, and therefore will not be described here.

[0113] (3) Advantages A controller 10A according to the second embodiment is connected to a plurality of units 20. The controller 10A includes a communication unit 101, a determination unit 103A, and an allocation unit 104A. The communication unit 101 communicates with the plurality of units 20. The determination unit 103A determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10A when communication is performed. The allocation unit 104A allocates the permitted communication time determined by the determination unit 103A for each of the plurality of units 20 and the controller 10A to each of the plurality of units 20 and the controller 10A. Each of the plurality of units 20 is connectable to one or more external devices 50. The determination unit 103A determines the permitted communication time to be allocated to each of the plurality of units 20 and the controller 10A when communication is performed, based on the number of external devices 50 connected to each of the plurality of units 20.

[0114] According to this configuration, the communication permission time for each of the multiple units 20 and the controller 10A is determined based on the number of external devices 50 connected to each of the multiple units 20, so that an appropriate transmission permission time can be set during communication.

[0115] (4) Variations (4.1) Variation 1 The determination unit 103A may determine the permitted communication time to be allocated to each of the multiple units and the controller when communication is performed, based on external communication information regarding communication between the unit 20 and the external device 50. The external communication information includes, for example, a baud rate representing the communication speed. When determining the permitted communication time based on the external communication information, if the communication speed represented by the baud rate set for communication with the external device 50 of one of the multiple units 20 is faster than that of the other units 20, the determination unit 103A determines a longer permitted communication time for the one unit 20 than for the other units 20. For example, the determination unit 103A acquires the baud rate with the external device 50 for each unit 20 through a user input operation. The determination unit 103A determines the permitted communication time to be allocated to each of the multiple units 20 and the controller 10A when communication is performed, based on the baud rates of each of the multiple units 20 acquired by the determination unit 103A through a user input operation. Furthermore, the determining unit 103A determines the longest communication allowable time out of the plurality of communication allowable times determined for the plurality of units 20 as the communication allowable time for the controller 10A.

[0116] Alternatively, the determination unit 103A may determine the communication permission time to be allocated to each of the multiple units 20 and the controller 10A when communicating, based on both the number of external devices 50 connected to each of the multiple units 20 and external communication information regarding communication with the external devices 50.

[0117] That is, the determination unit 103A determines the communication permission time to be allocated to each of the multiple units 20 and the controller 10A when communicating, based on at least one of the number of external devices 50 connected to each of the multiple units 20 and the external communication information related to communication with the external devices 50.

[0118] In variant 1, the controller 10A of variant 1 also determines the communication permission time for each of the multiple units 20 and the controller 10A of variant 1 based on the number of external devices 50 connected to each of the multiple units 20, so that an appropriate transmission permission time can be set during communication.

[0119] (4.2) Variation 2 The controller 10A may be configured to be connectable to one or more external devices 50. That is, in the control system 1A, each of the multiple units 20 and the controller 10A may be configured to be connectable to one or more external devices 50.

[0120] In variant example 2 as well, the controller 10A of variant example 2 determines the communication permission time for each of the multiple units 20 and the controller 10A of variant example 2 based on the number of external devices 50 connected to each of the multiple units 20, and therefore can set an appropriate transmission permission time during communication.

[0121] (4.3) Variation 3 The controller 10A may store in advance a plurality of different ranges related to the number of connected external devices 50 and a plurality of candidate allowed times in one-to-one correspondence. For example, the controller 10A stores in advance three different ranges related to the number of connected external devices 50 (first range, second range, third range) and a plurality of candidate allowed times (first candidate allowed time, second candidate allowed time, third candidate allowed time) in one-to-one correspondence. The maximum value of the first range is smaller than the minimum value of the second range, and the maximum value of the second range is smaller than the minimum value of the third range. The first candidate allowed time is smaller than the second candidate allowed time, and the second candidate allowed time is smaller than the third candidate allowed time.

[0122] The determination unit 103A determines which of a plurality of pre-stored ranges the range to which the number of connected external devices 50 in one unit 20 of the plurality of units 20 belongs. The determination unit 103A determines the candidate permitted time corresponding to the range to which the number of connected external devices 50 in one unit 20 belongs as the permitted communication time for the one device. That is, when a predetermined condition is satisfied, the determination unit 103A determines a time for which the communication time for the one unit 20 is longer than that for the other units 20 as the permitted communication time. The predetermined condition includes that the number of connected external devices 50 in one unit 20 is greater than that of the other units 20, and that the range to which the number of connected external devices 50 in the one unit 20 belongs is different from the range to which the number of connected external devices 50 in the other devices belongs.

[0123] In variant example 3, the controller 10A of variant example 3 determines the communication permission time for each of the multiple units 20 and the controller 10A of variant example 3 based on the number of external devices 50 connected to each of the multiple units 20, so that an appropriate transmission permission time can be set during communication.

[0124] (4.4) Variation 4 Furthermore, Modification 3 may be applied to Modification 1. In this case, controller 10A pre-stores a plurality of different baud rate ranges and a plurality of candidate allowable times in one-to-one correspondence. For example, controller 10A pre-stores three different baud rate ranges (first range, second range, third range) and a plurality of candidate allowable times (first candidate allowable time, second candidate allowable time, third candidate allowable time) in one-to-one correspondence with each other for the communication speed represented by the baud rate. The maximum value of the first range is smaller than the minimum value of the second range, and the maximum value of the second range is smaller than the minimum value of the third range. The first candidate allowable time is smaller than the second candidate allowable time, and the second candidate allowable time is smaller than the third candidate allowable time.

[0125] The determination unit 103A determines which of a plurality of pre-stored ranges the range to which the communication speed represented by the baud rate of one of the plurality of units 20 belongs. The determination unit 103A determines the candidate allowable time corresponding to the range to which the communication speed represented by the baud rate of the one unit 20 belongs as the communication allowable time for the one device. That is, when a predetermined condition is satisfied, the determination unit 103A determines a time for the one unit 20 that is longer than the communication time for the other units 20 as the communication allowable time. The predetermined condition includes that the communication speed represented by the baud rate of the one unit 20 among the plurality of units 20 is higher than that of the other units 20, and that the range to which the communication speed represented by the baud rate of the one unit 20 belongs is different from the range to which the communication speed represented by the baud rate of the other devices belongs.

[0126] In this case as well, the same effects as those of the second embodiment and other modifications can be obtained.

[0127] (4.5) Variation 5 The above-described second embodiment is merely one of various embodiments of the present disclosure. The above-described second embodiment can be modified in various ways depending on the design and the like, as long as the object of the present disclosure can be achieved.

[0128] Furthermore, functions similar to those of the controller 10A may be embodied as a control method, a computer program, a non-transitory recording medium on which a program is recorded, or the like. A control method according to one embodiment is a control method used by a controller 10A connected to multiple units 20. The controller 10A includes a communication unit 101 that communicates with the multiple units 20. The control method includes a determination step and an allocation step. The determination step determines a permitted communication time to be allocated to each of the multiple units 20 and the controller 10A when performing communication. The allocation step allocates the permitted communication time determined for each of the multiple units 20 and the controller 10A in the determination step to each of the multiple units 20 and the controller 10A. Each of the multiple units 20 can be connected to one or more external devices. The determination step determines the permitted communication time to be allocated to each of the multiple units 20 and the controller 10A when performing communication based on at least one of the number of external devices 50 connected to each of the multiple units 20 and external communication information related to communication with the external devices 50. A program according to one embodiment causes a computer system to function as the above-described control method.

[0129] The controller 10A in the present disclosure includes a computer system. The computer system is primarily composed of a processor and memory as hardware. The functions of the controller 10A in the present disclosure are realized by the processor executing a program stored in the memory of the computer system. The program may be pre-stored in the memory of the computer system, provided via a telecommunications line, or provided in a non-transitory recording medium readable by the computer system, such as a memory card, optical disk, or hard disk drive. The processor of the computer system is composed of one or more electronic circuits, including a semiconductor integrated circuit (IC) or a large-scale integrated circuit (LSI). The integrated circuits, such as ICs and LSIs, are referred to by different names depending on the degree of integration, and include integrated circuits called system LSIs, VLSIs, or ULSIs. Furthermore, logic devices that are programmed after the LSI is manufactured and can reconfigure the connections within the LSI or the circuit partitions within the LSI can also be used as processors. Multiple electronic circuits may be integrated into a single chip or distributed across multiple chips. Multiple chips may be integrated into a single device or distributed across multiple devices. The computer system referred to here includes a microcontroller having one or more processors and one or more memories. Therefore, the microcontroller is also composed of one or more electronic circuits including semiconductor integrated circuits or large-scale integrated circuits.

[0130] (4.6) Variation 6 Modification 6 of Embodiment 1 may be applied to Embodiment 2. Modification 7 of Embodiment 1 may be applied to Embodiment 2.

[0131] In these cases, the same effects as those of the first embodiment and other modifications can be obtained.

[0132] (summary) A controller (10) of a first aspect is connected to a plurality of units (20). The controller (10) includes a communication unit (101), a determination unit (103), and an allocation unit (104). The communication unit (101) communicates with the plurality of units (20). The determination unit (103) determines a permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when the communication is performed. The allocation unit (104) allocates the permitted communication time determined by the determination unit (103) for each of the plurality of units (20) and the controller (10) to each of the plurality of units (20) and the controller (10). The determination unit (103) determines the permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when the communication is performed, based on communication-related information related to data in communication between the plurality of units (20) and the controller (10).

[0133] According to this embodiment, the communication permission time is determined for each of the plurality of units (20) and the controller (10) based on the communication-related information of each of the plurality of units (20) and the controller (10), so that an appropriate transmission permission time can be set during communication.

[0134] A controller (10A) of a second aspect is connected to a plurality of units (20). The controller (10A) includes a communication unit (101), a determination unit (103A), and an allocation unit (104A). The communication unit (101) communicates with the plurality of units (20). The determination unit (103A) determines a permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when communication is performed. The allocation unit (104A) allocates the permitted communication time determined by the determination unit (103A) for each of the plurality of units (20) and the controller (10A) to each of the plurality of units (20) and the controller (10A). Each of the plurality of units (20) is connectable to one or more external devices (50). The determination unit (103A) determines the communication permission time to be allocated to each of the plurality of units (20) and the controller (10) when communication is performed, based on at least one of the number of external devices (50) connected to each of the plurality of units (20) and external communication information related to communication with the external devices (50).

[0135] According to this embodiment, the communication permission time of each of the plurality of units (20) and the controller (10) is determined based on at least one of the number of external devices (50) connected to each of the plurality of units (20) and the external communication information, so that an appropriate transmission permission time can be set during communication.

[0136] The controller (10) of the third aspect is the same as that of the first aspect, but further includes a measurement unit (102). The measurement unit (102) measures at least one of the number of packets and the data size during communication for each of the plurality of units (20) and the controller (10). The determination unit (103) determines the permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when they communicate, using information including the measurement result by the measurement unit (102) as communication-related information.

[0137] According to this aspect, an appropriate transmission permitted time during communication can be set according to at least one of the number of packets and the data size during communication.

[0138] In the controller (10) of the fourth aspect, in the third aspect, when one of the multiple units (20) and the controller (10) has a larger number of packets or a larger data size than the other devices, the determination unit (103) determines a longer communication allowance time for the one device than for the other devices.

[0139] According to this aspect, an appropriate transmission permission time during communication can be set depending on the number of packets during communication or the size of the data.

[0140] In the controller (10) of the fifth aspect, in the first aspect, a measurement unit (102) is further provided. The measurement unit (102) measures the usage of the buffers (113, 213) for each of the plurality of units (20) and the controller (10). The determination unit (103) determines the permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when they communicate, using information including the measurement result by the measurement unit (102) as communication-related information.

[0141] According to this embodiment, an appropriate transmission permitted time during communication can be set according to the amount of buffer usage.

[0142] In the controller (10) of the sixth aspect, in the fifth aspect, when the usage of the buffer (113, 213) is high, the determination unit (103) determines the time with the longest communication time as the communication permission time for the corresponding unit (20) or controller (10) among the multiple units (20) and controller (10).

[0143] According to this embodiment, an appropriate transmission permitted time during communication can be set depending on the amount of buffer usage.

[0144] In the controller (10A) of the seventh aspect, in the second aspect, when determining the communication allowance time based on the number of external devices (50), if one of the multiple units (20) has a larger number of connected external devices (50) than the other units (20), the determination unit (103A) determines the communication allowance time for the one unit (20) to be a time that is longer than the communication time for the other units (20).

[0145] According to this embodiment, the communication permission time of each of the plurality of units (20) and the controller (10) is determined based on the number of external devices (50) connected to each of the plurality of units (20), so that an appropriate transmission permission time can be set during communication.

[0146] In the controller (10A) of the eighth aspect, in the second aspect, the external communication information includes a baud rate representing a communication speed. When determining the communication allowance time based on the external communication information, if one of the multiple units (20) has a higher communication speed represented by a baud rate set in communication with the external device (50) than the other units (20), the determination unit (103A) determines the communication allowance time for the one unit (20) to be a time that is longer than the communication time for the other units (20).

[0147] According to this embodiment, the communication permission time for each of the plurality of units (20) and the controller (10) is determined based on the baud rate of each of the plurality of units (20), so that an appropriate transmission permission time can be set during communication.

[0148] In the controller (10, 10A) of the ninth aspect, in any one of the first to eighth aspects, communication between the plurality of units (20) and the controller (10, 10A) is performed using a token passing method. One of the plurality of units (20) and the controller (10, 10A) that has acquired a transmission right transmits data to another one of the plurality of units (20) and the controller (10, 10A) that has acquired the transmission right.

[0149] According to this embodiment, in communication by the token passing method, it is possible to set an appropriate transmission permission time for each of the multiple units (20) and the controller (10) during communication.

[0150] In the controller (10, 10A) of the tenth aspect, in any one of the first to ninth aspects, the communication section (101) is connected to the plurality of units (20) via a bus (40).

[0151] According to this embodiment, it is possible to set an appropriate transmission permission time during communication between each of the plurality of units (20) and the controller (10) via bus communication.

[0152] The control method of an eleventh aspect is a control method used in a controller (10) connected to a plurality of units (20). The controller (10) includes a communication unit (101) that communicates with the plurality of units (20). The control method includes a determination step and an allocation step. The determination step determines a permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when they communicate. The allocation step allocates the permitted communication time determined for each of the plurality of units (20) and the controller (10) in the determination step to each of the plurality of units (20) and the controller (10). The determination step determines the permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when they communicate, based on communication-related information related to data in communication between the plurality of units (20) and the controller (10).

[0153] According to this embodiment, an appropriate transmission permission time can be set during communication.

[0154] A control method according to a twelfth aspect is a control method used in a controller (10) connected to a plurality of units (20). The controller (10) includes a communication unit (101) that communicates with the plurality of units (20). Each of the plurality of units is connectable to one or more external devices. The control method includes a determination step and an allocation step. The determination step determines a permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when they communicate. The allocation step allocates the permitted communication time determined for each of the plurality of units (20) and the controller (10) in the determination step to each of the plurality of units (20) and the controller (10). The determination step determines the permitted communication time to be allocated to each of the plurality of units (20) and the controller (10) when they communicate, based on communication-related information related to data in communication between the plurality of units (20) and the controller (10).

[0155] According to this embodiment, an appropriate transmission permission time can be set during communication.

[0156] A program according to a thirteenth aspect is a program for causing a computer system to execute the control method according to the eleventh or twelfth aspect.

[0157] According to this aspect, the communication permission time to be allocated when communication is performed is determined. [Explanation of symbols]

[0158] 1,1A Control System 10,10A controller 20, 20a, 20b, 20c units 40 Bus 50 External device 101 Communications Department 102 Measurement section 103,103A Decision section 104,104A Allocation Department 113 buffers 213 buffer

Claims

1. A controller connected to a plurality of units, a communication unit that communicates with the plurality of units; a determination unit that determines a communication permission time to be allocated to each of the plurality of units and the controller when performing communication; an allocating unit that allocates the communication allowable times determined for the plurality of units and the controller by the determining unit to the plurality of units and the controller, respectively; the determination unit determines a communication permission time to be allocated to each of the plurality of units and the controller when performing communication, based on communication-related information related to data in communication between the plurality of units and the controller. controller.

2. A controller connected to a plurality of units, a communication unit that communicates with the plurality of units; a determination unit that determines a communication permission time to be allocated to each of the plurality of units and the controller when performing communication; an allocating unit that allocates the communication allowable times determined for the plurality of units and the controller by the determining unit to the plurality of units and the controller, respectively; each of the plurality of units is connectable to one or more external devices; the determination unit determines a communication permission time to be allocated to each of the plurality of units and the controller when performing communication, based on at least one of the number of external devices connected to each of the plurality of units and external communication information related to communication with the external devices. controller.

3. a measuring unit configured to measure at least one of the number of packets and the data size during communication for each of the plurality of units and the controller; the determination unit determines, as the communication-related information, information including the measurement result by the measurement unit, a communication allowable time to be allocated to each of the plurality of units and the controller when performing communication. The controller of claim 1 .

4. The determination unit When the number of packets is larger or the data size is larger in one of the plurality of units and the controller than in the other devices, a communication allowance time is determined for the one device to be a time longer than that for the other devices. The controller of claim 3 .

5. a measuring unit that measures a buffer usage amount for each of the plurality of units and the controller, the determination unit determines, as the communication-related information, information including the measurement result by the measurement unit, a communication allowable time to be allocated to each of the plurality of units and the controller when performing communication. The controller of claim 1 .

6. The determination unit When the usage amount of the buffer is large, a time in which communication time is long is determined as the communication permitted time for the corresponding unit or the corresponding controller among the plurality of units and the controller. The controller of claim 5 .

7. The determination unit When determining the communication allowance time based on the number of the external devices, if one of the plurality of units has a larger number of connected external devices than the other units, a communication time longer than that of the other units is determined as the communication allowance time for the one unit. The controller of claim 2 .

8. the external communication information includes a baud rate representing a communication speed; The determination unit When determining the communication allowance time based on the external communication information, if the communication speed represented by the baud rate set in communication with the external device is higher for one of the plurality of units than for the other units, a communication time longer for the one unit than for the other units is determined as the communication allowance time. The controller of claim 2 .

9. communication between the plurality of units and the controller is by a token passing system; a device among the plurality of units and the controller that has obtained the transmission right transmits data to a device among the plurality of units and the controller that is different from the device that has obtained the transmission right; 3. The controller according to claim 1 or 2.

10. The communication unit is connected to the plurality of units via a bus.

3. The controller according to claim 1 or 2.

11. A control method used in a controller having a communication unit that is connected to a plurality of units and communicates with the plurality of units, a determination step of determining a communication permission time to be allocated to each of the plurality of units and the controller when performing communication; an allocating step of allocating the communication allowable times determined for the plurality of units and the controller in the determining step to the plurality of units and the controller, respectively; In the determining step, a communication permission time to be allocated to each of the plurality of units and the controller when performing communication is determined based on communication-related information related to data in communication between each of the plurality of units and the controller. Control method.

12. A control method used in a controller that is connected to a plurality of units, each of which is connectable to one or more external devices, and that has a communication unit that communicates with the plurality of units, comprising: a determination step of determining a communication permission time to be allocated to each of the plurality of units and the controller when performing communication; an allocating step of allocating the communication allowable times determined for the plurality of units and the controller in the determining step to the plurality of units and the controller, respectively; In the determination step, a communication permission time to be allocated to each of the plurality of units and the controller when performing communication is determined based on at least one of the number of external devices connected to each of the plurality of units and external communication information related to communication with the external devices. Control method.

13. A program for causing a computer system to execute the control method according to claim 11 or 12.

Citation Information

Patent Citations

  • Multi-controller system and controller unit

    JP2019179436A