Relay device and relay program
The relay device prioritizes communications from a first master over a second master using distinct ports and a priority relay function, preventing delays in critical communications.
Patent Information
- Application Number
- JP2024158706
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2026-02-19
- Estimated Expiration
- 2044-09-13
AI Technical Summary
Existing communication relay systems prioritize all communications equally, leading to potential delays in higher priority communications.
A relay device with a control unit that prioritizes communications from a first master over those from a second master by using distinct communication ports and a priority relay function to ensure timely completion of critical communications.
Prevents delays in higher priority communications by ensuring they are relayed ahead of lower priority communications, maintaining communication integrity.
Smart Images

Figure 0007817610000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a relay device and a relay program. [Background technology]
[0002] As disclosed in Patent Document 1 (Japanese Patent No. 6321393), there is a technique for relaying communications between a plurality of masters and a plurality of slaves. Summary of the Invention [Problem to be solved by the invention]
[0003] In Patent Document 1, each communication is relayed with the same priority, which causes a problem that communication by a master performing communication with a higher priority may be delayed. [Means for solving the problem]
[0004] A relay device according to a first aspect connects a first master and a second master to a single-master / multi-slave network. The relay device relays communications between the first and second masters and multiple slaves. The relay device includes a first communication port, a second communication port, a third communication port, and a control unit. The first communication port is connected to the first master. The second communication port is connected to the second master. The third communication port is connected to multiple slaves. The control unit relays first communications between the first master and the multiple slaves. The control unit relays second communications between the second master and the multiple slaves. The control unit relays the first communications with priority over the second communications.
[0005] In the relay device according to the first aspect, the control unit relays the first communication with priority over the second communication, and as a result, the relay device can prevent delays in communication by the first master, which has a higher priority.
[0006] A relay device according to a second aspect is the relay device according to the first aspect, wherein in communication between a first master and a second master and a plurality of slaves, the first master and the second master transmit requests to slaves included in the plurality of slaves, and the control unit determines whether the communication having the request is a first communication or a second communication based on the communication port through which the request is received.
[0007] A third aspect of the relay device is the relay device of the first aspect, wherein in communication between a first master and a second master and a plurality of slaves, the first master and the second master transmit requests to slaves included in the plurality of slaves. The requests include device information of the first master or the second master that is the sender of the requests. The control unit determines whether the communication including the request is a first communication or a second communication based on the device information.
[0008] A fourth aspect of the relay device is the relay device of any one of the first aspect to the third aspect, wherein the plurality of slaves includes a first slave and a second slave. The first communication is completed when the first master transmits a first request to the first slave and the first master receives a first response to the first request from the first slave. The second communication is completed when the second master transmits a second request to the second slave and the second master receives a second response to the second request from the second slave. When relaying the first communication and relaying the second communication overlap, the control unit relays the first request and first response to complete the first communication before relaying the second request and second response.
[0009] A fifth aspect of the relay device is a relay device of the fourth aspect, in which the relaying of the first communication and the relaying of the second communication overlap when the first request is received while the second request is being received, when the second response is received while the first request is being received, or when the first response is received while the second request is being received.
[0010] A sixth aspect of the relay device is the relay device of any one of the first to fifth aspects, further comprising a switching circuit. The switching circuit connects the first communication port and the third communication port. If the control unit cannot relay the first communication or the second communication due to an abnormality in the relay device, the first communication is performed through the switching circuit.
[0011] With this configuration, the relay device according to the sixth aspect can maintain communication by the first master, which has a higher priority, even if an abnormality occurs in the relay device.
[0012] A relay program according to a seventh aspect relays communications between a first master and a second master and a plurality of slaves in a relay device. The relay device connects the first master and the second master to a single-master / multi-slave network. The relay device has a first communication port, a second communication port, a third communication port, and a control unit. The first communication port is connected to the first master. The second communication port is connected to the second master. The third communication port is connected to the plurality of slaves. The relay program causes the relay device to function as a means comprising a first step, a second step, and a third step. The first step relays first communications between the first master and the plurality of slaves. The second step relays second communications between the second master and the plurality of slaves. The third step relays the first communications with priority over the second communications. [Brief explanation of the drawings]
[0013] [Figure 1] FIG. 1 is a diagram illustrating a communication system having a single-master / multi-slave network. [Figure 2] FIG. 10 is a diagram illustrating a communication system provided with a second master and a relay device. [Figure 3] FIG. 2 is a functional block diagram of a relay device. [Figure 4] FIG. 10 is a flow diagram illustrating a priority relay function of a relay device. [Figure 5] FIG. 10 is a flow diagram illustrating a priority relay function of a relay device. [Figure 6] FIG. 10 is a flow diagram illustrating a priority relay function of a relay device. DETAILED DESCRIPTION OF THE INVENTION
[0014] (1) Overall structure Fig. 1 is a diagram showing a communication system 80 having a single-master / multi-slave network. As shown in Fig. 1, the communication system 80 has a first master M1 and multiple slave SLGs. The first master M1 and the multiple slave SLGs are daisy-chain connected by a communication line 90 so as to be able to communicate with each other.
[0015] Hereinafter, the slaves SL included in the plurality of slaves SLG may be referred to as a first slave SL1 and a second slave SL2. The first slave SL1 and the second slave SL2 may be the same device or different devices. In FIG. 1, the first slave SL1 and the second slave SL2 are depicted as different devices.
[0016] The first master M1 controls the first slave SL1. On the other hand, there are cases where it is desired to add control over the second slave SL2 while maintaining the first master M1's control over the first slave SL1. In such a case, it is conceivable to provide a communication system 80 with a second master M2 that performs additional control over the second slave SL2 and a relay device 1 that connects the first master M1 and the second master M2 to a single-master / multi-slave network. FIG. 2 is a diagram showing a communication system 81 in which the second master M2 and the relay device 1 are provided in the communication system 80. As shown in FIG. 2, the first master M1 and the relay device 1 are communicatively connected by a communication line 91. The second master M2 and the relay device 1 are communicatively connected by a communication line 92. The relay device 1 and multiple slaves SL are communicatively daisy-chained by a communication line 93.
[0017] The relay device 1 relays communications between the first master M1 and the second master M2 and multiple slaves SLG. However, if the relay device 1 relays the communications between the first master M1 and the first slave SL1 and the communications between the second master M2 and the second slave SL2 with the same priority, there is a risk that the communications between the first master M1 and the first slave SL1, which should be maintained (should be prioritized), will be delayed.
[0018] Therefore, in this embodiment, the relay device 1 is configured to relay communication between the first master M1 and the first slave SL1 with priority over communication between the second master M2 and the second slave SL2.
[0019] (2) Detailed configuration (2-1) Slave The slave SL is controlled by the first master M1 or the second master M2. The slave SL is, for example, an air conditioner, a low-temperature showcase, or the like.
[0020] For example, if the slave SL is an air conditioner, the slave SL configures a vapor compression refrigeration cycle and performs air conditioning of a target space in a building. The slave SL has an indoor unit and an outdoor unit.
[0021] The indoor unit is installed, for example, on the ceiling of the target space. The indoor unit mainly includes an indoor heat exchanger, an indoor fan, an indoor expansion valve, an indoor control unit, and various sensors. The indoor heat exchanger exchanges heat between the refrigerant flowing through it and the air in the target space. The indoor fan draws air from the target space into the indoor unit, exchanges heat with the refrigerant in the indoor heat exchanger, and supplies the air to the target space. The indoor expansion valve is a mechanism for regulating the pressure and flow rate of the refrigerant flowing through the refrigerant circuit. The indoor control unit controls the operation of each component of the indoor unit. The indoor control unit is communicatively connected to the indoor fan, the indoor expansion valve, and the various sensors. The indoor control unit includes a control and arithmetic device and a storage device. The control and arithmetic device is a processor such as a CPU or a GPU. The storage device is a storage medium such as a RAM, a ROM, or a flash memory. The control and arithmetic device reads a program stored in the storage device and performs predetermined arithmetic processing in accordance with the program to control the operation of each component of the indoor unit. The control and arithmetic unit can write the calculation results to the storage device and read the information stored in the storage device according to the program. The indoor control unit exchanges various information, such as control signals, signals related to measurements by various sensors, and signals related to various settings, with the outdoor control unit of the outdoor unit via communication lines.
[0022] The outdoor unit is installed, for example, on the roof of a building. The outdoor unit mainly includes a compressor, a flow path switching valve, an outdoor heat exchanger, an outdoor expansion valve, an outdoor fan, an outdoor control unit, and various sensors. The compressor draws low-pressure refrigerant through a suction pipe, compresses the refrigerant using a compression mechanism, and discharges the compressed refrigerant to a discharge pipe. The flow path switching valve is a mechanism that switches the refrigerant flow path between a first state and a second state. During cooling operation, the flow path switching valve sets the refrigerant flow path to the first state. At this time, the refrigerant discharged from the compressor flows through the refrigerant circuit in the following order: outdoor heat exchanger, outdoor expansion valve, indoor expansion valve, indoor heat exchanger, and then returns to the compressor. In the first state, the outdoor heat exchanger functions as a condenser, and the indoor heat exchanger functions as an evaporator. During heating operation, the flow path switching valve sets the refrigerant flow path to the second state. At this time, the refrigerant discharged from the compressor flows through the refrigerant circuit in the following order: indoor heat exchanger, indoor expansion valve, outdoor expansion valve, outdoor heat exchanger, and then returns to the compressor. In the second state, the outdoor heat exchanger functions as an evaporator, and the indoor heat exchanger functions as a condenser. The outdoor heat exchanger exchanges heat between the refrigerant flowing through it and the air outside the building. The outdoor expansion valve is a mechanism for regulating the pressure and flow rate of the refrigerant flowing through the refrigerant circuit. The outdoor fan supplies air outside the building to the outdoor heat exchanger. The outdoor control unit controls the operation of each component of the outdoor unit. The outdoor control unit is communicatively connected to the compressor, the flow path switching valve, the outdoor expansion valve, the outdoor fan, and various sensors. The outdoor control unit has a control and arithmetic unit and a storage device. The control and arithmetic unit is a processor such as a CPU or a GPU. The storage device is a storage medium such as a RAM, a ROM, or a flash memory. The control and arithmetic device reads out the program stored in the storage device and performs predetermined arithmetic processing in accordance with the program to control the operation of each component of the outdoor unit. The control and arithmetic device can also write the calculation results to the storage device and read out information stored in the storage device in accordance with the program. The outdoor control unit exchanges various information, such as control signals, signals related to measurements by various sensors, and signals related to various settings, with the indoor control unit of the indoor unit via communication lines.The outdoor control unit also exchanges various types of information, such as control signals, signals related to measurements by various sensors, and signals related to various settings, with the first master M1 or the second master M2 via a communication line 93.
[0023] (2-2) Master The first master M1 controls the first slave SL1. The second master M2 controls the second slave SL2. The first master M1 and the second master M2 each have a control and arithmetic device and a storage device. The control and arithmetic device is a processor such as a CPU or a GPU. The storage device is a storage medium such as a RAM, a ROM, or a flash memory. The control and arithmetic device reads a program stored in the storage device and performs predetermined arithmetic processing in accordance with the program, thereby controlling the operation of each component constituting the outdoor unit. The control and arithmetic device can also write arithmetic results to the storage device and read information stored in the storage device in accordance with the program. For example, if the first slave SL1 is an air conditioner, the first master M1 exchanges various information, such as control signals, signals related to measurements by various sensors, and signals related to various settings, with the outdoor control unit of the outdoor unit via a communication line 93.
[0024] A first communication is performed between the first master M1 and the first slave SL1. The first communication is completed when the first master M1 transmits a first request REQ1 to the first slave SL1 and the first master M1 receives a first response RES1 to the first request REQ1 from the first slave SL1.
[0025] For example, if the first slave SL1 is an air conditioner, the first master M1 requests operating data from the first slave SL1 as a first request REQ1. The operating data includes, for example, the indoor fan rotation speed, the opening of the indoor expansion valve, the compressor rotation speed, the opening of the outdoor expansion valve, the outdoor fan rotation speed, and measurement values of various sensors. When the first slave SL1 receives the first request REQ1, the indoor control unit and the outdoor control unit of the first slave SL1 cooperate to acquire the operating data. The first slave SL1 transmits the acquired operating data to the first master M1 as a first response RES1.
[0026] For example, if the first slave SL1 is an air conditioner, the first master M1 transmits a target temperature for the target space to the first slave SL1 as a first request REQ1. When the first slave SL1 receives the first request REQ1, the first slave SL1 transmits an ACK (ACKnowledgement) to the first master M1 as a first response RES1. The indoor control unit and outdoor control unit of the first slave SL1 cooperate to adjust the rotation speed of the indoor fan, the opening of the indoor expansion valve, the rotation speed of the compressor, the opening of the outdoor expansion valve, the rotation speed of the outdoor fan, etc. so that the temperature of the target space becomes the target temperature included in the first request REQ1.
[0027] Similarly, a second communication is performed between the second master M2 and the second slave SL2. The second communication is completed when the second master M2 transmits a second request REQ2 to the second slave SL2 and the second master M2 receives a second response RES2 to the second request REQ2 from the second slave SL2.
[0028] (2-3) Relay device 3 is a functional block diagram of the relay device 1. As shown in FIG. 3, the relay device 1 mainly includes a storage unit 11, a first communication unit 141 to a third communication unit 143, and a control unit 19.
[0029] (2-3-1) Storage section The storage unit 11 is a storage medium such as a RAM, a ROM, a flash memory, etc. The storage unit 11 stores programs executed by the control unit 19, data necessary for executing the programs, and the like.
[0030] (2-3-2) Communications Department The first communication unit 141 is a network interface device having a first communication port P1. The first communication port P1 is connected to the first master M1 via a communication line 91. The second communication unit 142 is a network interface device having a second communication port P2. The second communication port P2 is connected to the second master M2 via a communication line 92. The third communication unit 143 is a network interface device having a third communication port P3. The third communication port P3 is connected to multiple slave SLGs via a communication line 93.
[0031] (2-3-3) Control Unit The control unit 19 is a processor such as a CPU or a GPU. The control unit 19 reads and executes programs such as a relay program stored in the storage unit 11 to realize various functions of the relay device 1. The control unit 19 can also write calculation results to the storage unit 11 and read information stored in the storage unit 11 according to the programs such as the relay program.
[0032] The control unit 19 relays the first communication and the second communication. In particular, the control unit 19 has a priority relay function for relaying the first communication with priority over the second communication.
[0033] (2-3-3-1) Priority relay function When relaying the first communication and relaying the second communication overlap, the control unit 19 relays the first request REQ1 and the first response RES1 to complete the first communication before relaying the second request REQ2 and the second response RES2. When relaying the first communication and relaying the second communication overlap, the control unit 19 receives the first request REQ1 while receiving the second request REQ2, when the control unit 19 receives the second response RES2 while receiving the first request REQ1, or when the control unit 19 receives the first response RES1 while receiving the second request REQ2.
[0034] The control unit 19 determines whether the communication containing the request is the first communication or the second communication based on the communication port through which the request was received. Specifically, when the control unit 19 receives the request through the first communication port P1, it determines that the communication containing the request is the first communication (the request is the first request REQ1). When the control unit 19 receives the request through the second communication port P2, it determines that the communication containing the request is the second communication (the request is the second request REQ2).
[0035] Below, the processing of the priority relay function will be explained for each of three cases in which the relay of the first communication and the relay of the second communication overlap, using the flow diagrams in Figures 4 to 6. In Figures 4 to 6, the flow of the first request REQ1 and the first response RES1 is depicted by solid lines, and the flow of the second request REQ2 and the second response RES2 is depicted by dashed lines. Also, for simplicity, it is assumed that the first request REQ1, the first response RES1, the second request REQ2, and the second response RES2 each have an information volume of 8 bytes. This corresponds to the fact that, for example, the first request REQ1 in Figures 4 to 6 is composed of 8 blocks.
[0036] (2-3-3-1-1) When the first request is received while the second request is being received The processing of the priority relay function when the first request REQ1 is received while the second request REQ2 is being received will be described with reference to the flow diagram of FIG.
[0037] As shown in step S11, the second master M2 transmits a second request REQ2 to the second slave SL2.
[0038] While the second master M2 is transmitting the second request REQ2 to the second slave SL2 in step S11, the first master M1 transmits the first request REQ1 to the first slave SL1 as shown in step S12.
[0039] As a result of steps S11 and S12, as shown in step S13, the relay device 1 receives the first request REQ1 from the first master M1 while receiving the second request REQ2 from the second master M2.
[0040] After completing step S13, as shown in step S14, the relay device 1 transmits the received first request REQ1 to the first slave SL1 (relaying the first request REQ1 with priority).
[0041] After completing step S14, as shown in step S15, the relay device 1 receives the first response RES1 from the first slave SL1 and transmits the received first response RES1 to the first master M1 (relaying the first response RES1 with priority).
[0042] After completing step S15, the relay device 1 transmits the received second request REQ2 to the second slave SL2 (relays the second request REQ2) as shown in step S16.
[0043] After completing step S16, as shown in step S17, the relay device 1 receives the second response RES2 from the second slave SL2 and transmits the received second response RES2 to the second master M2 (relays the second response RES2).
[0044] (2-3-3-1-2) When the second response is received while the first request is being received The processing of the priority relay function when a second response RES2 is received while a first request REQ1 is being received will be described with reference to the flow diagram of FIG.
[0045] As shown in step S21, the second master M2 transmits a second request REQ2 to the second slave SL2.
[0046] After completing step S21, as shown in step S22, the relay device 1 receives the second request REQ2 from the second master M2 and transmits the received second request REQ2 to the second slave SL2 (relays the second request REQ2).
[0047] After completing step S22, the first master M1 transmits a first request REQ1 to the first slave SL1 as shown in step S23.
[0048] While the relay device 1 is receiving the first request REQ1 from the first master M1 in step S23, the relay device 1 receives a second response RES2 from the second slave SL2 as shown in step S24.
[0049] After completing steps S23 and S24, the relay device 1 transmits the received first request REQ1 to the first slave SL1 (relaying the first request REQ1 with priority), as shown in step S25.
[0050] After completing step S25, as shown in step S26, the relay device 1 receives the first response RES1 from the first slave SL1 and transmits the received first response RES1 to the first master M1 (relaying the first response RES1 with priority).
[0051] After completing step S26, as shown in step S27, the relay device 1 transmits the second response RES2 received from the second slave SL2 to the second master M2 (relays the second response RES2).
[0052] (2-3-3-1-3) When the first response is received while the second request is being received The processing of the priority relay function when the first response RES1 is received while the second request REQ2 is being received will be described with reference to the flow diagram of FIG.
[0053] As shown in step S31, the first master M1 transmits a first request REQ1 to the first slave SL1.
[0054] After step S31, the relay device 1 transmits the received first request REQ1 to the first slave SL1 (relays the first request REQ1) as shown in step S32.
[0055] After completing step S32, the second master M2 transmits a second request REQ2 to the second slave SL2 as shown in step S33.
[0056] While the relay device 1 is receiving the second request REQ2 from the second master M2 in step S33, the relay device 1 receives the first response RES1 from the first slave SL1 as shown in step S34.
[0057] After completing steps S33 and S34, the relay device 1 transmits the first response RES1 received from the first slave SL1 to the first master M1 (relaying the first response RES1 with priority), as shown in step S35.
[0058] After step S35, the relay device 1 transmits the received second request REQ2 to the second slave SL2 (relays the second request REQ2) as shown in step S36.
[0059] After completing step S36, as shown in step S37, the relay device 1 receives the second response RES2 from the second slave SL2 and transmits the received second response RES2 to the second master M2 (relays the second response RES2).
[0060] (3) Features (3-1) Conventionally, there is a technology for relaying communications between multiple masters and multiple slaves. However, in the conventional technology, each communication is relayed with the same priority, which has the problem that communication by a master performing a communication with a higher priority may be delayed.
[0061] The relay device 1 of this embodiment connects a first master M1 and a second master M2 to a single-master / multi-slave network. The relay device 1 relays communications between the first master M1 and the second master M2 and multiple slaves SL. The relay device 1 includes a first communication port P1, a second communication port P2, a third communication port P3, and a control unit 19. The first communication port P1 is connected to the first master M1. The second communication port P2 is connected to the second master M2. The third communication port P3 is connected to multiple slaves SL. The control unit 19 relays first communications between the first master M1 and the multiple slaves SL. The control unit 19 relays second communications between the second master M2 and the multiple slaves SL. The control unit 19 relays the first communications with priority over the second communications.
[0062] In the relay device 1 of this embodiment, the control unit 19 relays the first communication with priority over the second communication. As a result, the relay device 1 can prevent delays in the communication by the first master M1, which has a higher priority.
[0063] (3-2) In the relay device 1 of this embodiment, in communications between the first master M1 and the second master M2 and multiple slave SLGs, the first master M1 and the second master M2 transmit requests to slaves SL included in the multiple slave SLGs. The control unit 19 determines whether the communication containing the request is a first communication or a second communication based on the communication port through which the request is received.
[0064] (3-3) In the relay device 1 of this embodiment, the multiple slaves SLG include a first slave SL1 and a second slave SL2. The first communication is completed when the first master M1 transmits a first request REQ1 to the first slave SL1 and the first master M1 receives a first response RES1 to the first request REQ1 from the first slave SL1. The second communication is completed when the second master M2 transmits a second request REQ2 to the second slave SL2 and the second master M2 receives a second response RES2 to the second request REQ2 from the second slave SL2. If the relay of the first communication and the relay of the second communication overlap, the control unit 19 relays the first request REQ1 and the first response RES1 to complete the first communication before relaying the second request REQ2 and the second response RES2.
[0065] (3-4) In the relay device 1 of this embodiment, the relaying of the first communication and the relaying of the second communication overlap when the first request REQ1 is received while the second request REQ2 is being received, when the second response RES2 is received while the first request REQ1 is being received, or when the first response RES1 is received while the second request REQ2 is being received.
[0066] (3-5) The relay program of this embodiment causes the relay device 1 to relay communications between a first master M1 and a second master M2 and multiple slaves SL. The relay device 1 connects the first master M1 and the second master M2 to a single-master / multi-slave network. The relay device 1 has a first communication port P1, a second communication port P2, a third communication port P3, and a control unit 19. The first communication port P1 is connected to the first master M1. The second communication port P2 is connected to the second master M2. The third communication port P3 is connected to multiple slaves SL. The relay program causes the relay device 1 to function as a means comprising a first step, a second step, and a third step. The first step relays first communications between the first master M1 and the multiple slaves SL. The second step relays second communications between the second master M2 and the multiple slaves SL. The third step relays the first communications with priority over the second communications.
[0067] In the relay program of this embodiment, the third step relays the first communication with priority over the second communication, thereby preventing delays in the communication by the first master M1, which has a higher priority.
[0068] (4) Variations (4-1) Variation 1A In this embodiment, the control unit 19 determines whether the communication containing the request is the first communication or the second communication based on the communication port through which the request was received. However, the control unit 19 may also determine whether the communication containing the request is the first communication or the second communication based on the device information of the first master M1 or the second master M2 that is the sender of the request, which is included in the request.
[0069] The device information of the first master M1 or the second master M2 is, for example, the identifier (ID, MAC address, etc.) of the first master M1 or the second master M2, the model name of the first master M1 or the second master M2, etc.
[0070] (4-2) Variation 1B In preparation for the case where an abnormality occurs in the relay device 1 or the slave SL, the relay device 1 may further include a switching circuit 18 and first to third display units 151 to 153, as shown in FIG.
[0071] The switching circuit 18 connects the first communication port P1 to the third communication port P3.
[0072] The first to third display units 151 to 153 are provided near the first to third communication ports P1 to P3, respectively. In this modification, the first to third display units 151 to 153 are displays. The first to third display units 151 to 153 may be LEDs (Light Emitting Diodes) or the like.
[0073] (4-2-1) When an abnormality occurs in the relay device Possible abnormalities in the relay device 1 include a power cutoff of the relay device 1 and a fault in the control unit 19. Furthermore, possible faults in the control unit 19 include a hardware fault, a memory management fault, and a bus fault.
[0074] A memory management fault occurs when noise on the communication lines 91 to 93 causes the relay device 1 to receive a frame larger than the expected number of bytes, and the received frame no longer fits into the frame variable inside the relay device 1. A bus fault occurs when the control unit 19 is no longer able to process internal data or commands due to aging or external impact. A hard fault is a fault in the control unit 19 other than a memory management fault or a bus fault.
[0075] If the control unit 19 cannot relay the first communication or the second communication due to an abnormality in the relay device 1, the first communication is performed through the switching circuit 18. In other words, if the control unit 19 cannot relay the first communication or the second communication due to an abnormality in the relay device 1, the control unit 19 enables the switching circuit 18 to relay only the first communication. At this time, the control unit 19 may display on each of the first display unit 151 to the third display unit 153 that an abnormality has occurred in the relay device 1. The control unit 19 may also notify the administrator of the communication system 81 by email or the like that an abnormality has occurred in the relay device 1.
[0076] As a result, even if an abnormality occurs in the relay device 1, the relay device 1 can maintain communication via the first master M1, which has a higher priority.
[0077] If the abnormality in the relay device 1 is a power outage of the relay device 1, the control unit 19 periodically checks whether the power has been restored. If the power has been restored, the control unit 19 disables the switching circuit 18 and resumes relaying the first communication and the second communication.
[0078] If the abnormality in relay device 1 is a memory management fault, control unit 19 periodically checks whether it is possible to relay the first and second communications. If it is possible to relay the first and second communications, control unit 19 disables switching circuit 18 and resumes relaying the first and second communications.
[0079] If the abnormality in the relay device 1 is a hard fault or a bus fault, the hard fault and the bus fault are internal failures and it is not expected that the relaying of the first communication and the second communication will resume, so the control unit 19 maintains the switching circuit 18 in an enabled state.
[0080] (4-2-2) When an abnormality occurs in the slave When the control unit 19 does not receive a response from a specific slave SL, or when it receives an abnormal response from the specific slave SL multiple times in succession, it determines that an abnormality has occurred in the specific slave SL.
[0081] When the control unit 19 determines that an abnormality has occurred in a specific slave SL, it stops relaying to the specific slave SL. At this time, the control unit 19 may display on the third display unit 153 that an abnormality has occurred in the specific slave SL. The control unit 19 may also notify the administrator of the communication system 81 by email or the like that an abnormality has occurred in the specific slave SL.
[0082] The control unit 19 periodically transmits a request to a specific slave SL to check whether the abnormality of the specific slave SL has been resolved. When the abnormality of the specific slave SL has been resolved, the control unit 19 resumes relaying to the specific slave SL.
[0083] (4-3) Although the embodiments of the present disclosure have been described above, it will be understood that various changes in form and details can be made without departing from the spirit and scope of the present disclosure as defined in the claims. [Explanation of symbols]
[0084] 1. Relay device 18 Switching Circuits M1, M2 First master, second master P1~P3 1st communication port ~ 3rd communication port REQ1,REQ2 First request, second request RES1, RES2 First response, second response SL,SL1,SL2 Slave, 1st slave, 2nd slave SLG Multiple Slaves [Prior art documents] [Patent documents]
[0085] [Patent Document 1] Patent No. 6321393
Claims
1. A relay device (1) for connecting a first master (M1) and a second master (M2) to a single-master / multi-slave network and relaying communications between the first master and the second master and a plurality of slaves (SLG), a first communication port (P1) connected to the first master; a second communication port (P2) connected to the second master; a third communication port (P3) connected to the plurality of slaves; A control unit; Equipped with The control unit relaying a first communication between the first master and the plurality of slaves; relaying second communications between the second master and the plurality of slaves; relaying the first communication with priority over the second communication; the plurality of slaves include a first slave (SL1) and a second slave (SL2); the first communication is completed by the first master transmitting a first request (REQ1) to the first slave and the first master receiving a first response (RES1) to the first request from the first slave; the second communication is completed by the second master transmitting a second request (REQ2) to the second slave and the second master receiving a second response (RES2) to the second request from the second slave; when relaying the first communication and relaying the second communication overlap, the control unit relays the first request and the first response to complete the first communication before relaying the second request; When the relay of the first communication and the relay of the second communication overlap, The first request is received while the second request is being received, or the first response is received while the second request is being received; Relay device (1).
2. In the communication between the first master and the second master and the plurality of slaves, the first master and the second master transmit requests to slaves (SL) included in the plurality of slaves; the control unit determines whether the communication including the request is the first communication or the second communication based on the communication port through which the request is received. A relay device (1) according to claim 1.
3. In the communication between the first master and the second master and the plurality of slaves, the first master and the second master transmit requests to slaves (SL) included in the plurality of slaves; the request includes device information of the first master or the second master that is a sender of the request, the control unit determines, based on the device information, whether the communication including the request is the first communication or the second communication. A relay device (1) according to claim 1.
4. a switching circuit (18) connecting the first communication port and the third communication port; Furthermore, When the control unit cannot relay the first communication or the second communication due to an abnormality in the relay device, the first communication is performed through the switching circuit. A relay device (1) according to any one of claims 1 to 3.
5. A relay device (1) that connects a first master (M1) and a second master (M2) to a single-master / multi-slave network, the relay program for relaying communications between the first master and the second master and a plurality of slaves (SLG), The relay device a first communication port (P1) connected to the first master; a second communication port (P2) connected to the second master; a third communication port (P3) connected to the plurality of slaves; A control unit; and The relay device, a first step of relaying a first communication between the first master and the plurality of slaves; a second step of relaying second communications between the second master and the plurality of slaves; a third step of relaying the first communication with priority over the second communication; and function as a means of providing the plurality of slaves include a first slave (SL1) and a second slave (SL2); the first communication is completed by the first master transmitting a first request (REQ1) to the first slave and the first master receiving a first response (RES1) to the first request from the first slave; the second communication is completed by the second master transmitting a second request (REQ2) to the second slave and the second master receiving a second response (RES2) to the second request from the second slave; when relaying the first communication and relaying the second communication overlap, relaying the first request and the first response to complete the first communication before relaying the second request; When the relay of the first communication and the relay of the second communication overlap, The first request is received while the second request is being received, or the first response is received while the second request is being received; Broadcast program.
Citation Information
Patent Citations
Deadlock condition avoidance in a data processing system with a shared slave
US20220035761A1
Fuel pump device
JP1988021393A