Communication method
By using expansion modules and CPU modules in the system and using the switching and separation circuit of the serial bus, the problems of insufficient I/O expansion and communication efficiency of the bus connection system in the prior art are solved, and high-speed communication and efficient input and output response are achieved.
Patent Information
- Application Number
- CN202510424354.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-06-30
- Filing Date
- 2021-06-25
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, systems with multiple modules connected via bus have shortcomings in I/O scalability and communication efficiency with external devices, especially in the case of high and low communications of high and low priority, and the scheduling management is complicated.
The expansion module and the CPU module are used to communicate through the first and second serial buses. The expansion module has a switching function to reduce communication competition. The separation circuit is used to separate the bus, the computing circuit is used to process input and output, and the bus is integrated to improve communication speed.
It improves the I/O scalability and communication efficiency of the system, reduces the waiting time during communication competition, and achieves the improvement of high-speed input and output response and communication speed.
Smart Images

Figure CN120469290A_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with the application date of June 25, 2021 and application number 202110709373.6 and the invention name and invention name are “Expansion module, CPU module, system and communication method”. Technical Field
[0002] The present invention relates to an expansion module, a CPU module, a system and a communication method. Background Art
[0003] Conventionally, systems such as PLCs (Programmable Logic Controllers) are known that include multiple modules communicatively connected via a bus. For example, Patent Document 1 discloses a PLC that is composed of a PLC module and an option module, and transmits data from the option module to a control device via fixed-cycle communication.
[0004] Prior art literature
[0005] Patent Literature
[0006] Patent Document 1: Japanese Patent Application Laid-Open No. 2003-202907 Summary of the Invention
[0007] Problems to be solved by the invention
[0008] In a system including a plurality of modules communicatively connected via a bus, there is a demand for performance improvement, such as improvement in I / O scalability with external devices such as field devices.
[0009] The present disclosure has been made in view of this situation, and an object of the present disclosure is to improve the performance of a system including a plurality of modules communicably connected via a bus.
[0010] Means for solving problems
[0011] An expansion module according to some embodiments is an expansion module connected to multiple serial buses, comprising: an interface for inputting and outputting external signals; and a communication circuit for communicating via a first serial bus and a second serial bus, wherein the communication circuit has a first slave communication function for communicating via the first serial bus, a second slave communication function for communicating via the second serial bus, a third slave communication function for integrating communications between the first and second serial buses, and a master communication function for communicating via the second serial bus, in a manner that can be switched between being valid and invalid. The first slave communication function and the third slave communication function respectively include functions of returning a response to a command received from a CPU module and addressed to a local station, and relaying commands received from the CPU module and addressed to other stations, and relaying responses received from other stations. The second slave communication function includes functions of returning a response to a command received from the CPU module or other stations and addressed to the local station, and relaying commands received from the CPU module or other stations and addressed to other stations, and relaying responses received from other stations. The master communication function includes functions of sending commands to other stations and receiving responses from the other stations. According to the expansion module according to some embodiments, in a system using the expansion module, performance is improved in terms of improved I / O scalability with external devices.
[0012] In one embodiment, the expansion module may further include a separation circuit for separating the second serial bus. Thus, when the second serial bus is separated, data flowing through one of the separated buses does not flow into the other bus, thereby reducing latency during communication contention and accelerating input and output responses.
[0013] In one embodiment, the communication circuit may disable the other two functions when any one of the second slave communication function, the third slave communication function, and the master communication function is enabled. Thus, when one of the multiple functions using the second serial bus is enabled, the other functions are disabled, thereby reducing the possibility of problems such as failure to communicate via the second serial bus due to incorrect settings.
[0014] In one embodiment, the expansion module may further include a program-executing arithmetic circuit. When the primary communication function is enabled, the arithmetic circuit performs arithmetic processing on responses received from other stations serving as command destinations and determines an output value. Thus, by including the arithmetic circuit in the expansion module, processing such as input and output responses can be performed without a CPU module.
[0015] In one embodiment, when the main communication function is enabled, the communication circuit may transmit the output value to another station via the second serial bus. Thus, by transmitting the output value to another station, the communication circuit can output an output signal including the output value to an external device via an interface of the other station, thereby improving I / O scalability with external devices.
[0016] Some embodiments involve a CPU module connected to multiple serial buses and having a communication circuit for communicating via a first serial bus and a second serial bus. The communication circuit includes a first main communication function for communicating via the first serial bus, a second main communication function for communicating via the second serial bus, and a third main communication function for integrating the first and second serial buses, each capable of being switched between active and inactive. The first, second, and third main communication functions each include functions for sending commands to other stations and receiving responses from the other stations. According to some embodiments, the CPU module can easily change how the multiple serial buses are used simply by switching the configuration of the communication circuit, thereby improving the performance of a system using the CPU module.
[0017] Some embodiments involve a system comprising a first serial bus, a second serial bus, a CPU module, and multiple expansion modules, wherein the CPU module and the multiple expansion modules are connected to the first serial bus and the second serial bus, respectively. The system according to some embodiments can utilize multiple serial buses, thereby improving system performance compared to, for example, a configuration that can utilize only a single serial bus.
[0018] In one embodiment, the communication method executed by the above-mentioned system may also include: a step of splitting the second serial bus into two by one of the expansion modules; a step of the CPU module communicating with the plurality of expansion modules via the first serial bus; a step of the CPU module communicating with the expansion modules connected to the split second serial bus via the split second serial bus; and a step of two or more expansion modules connected to the split second serial bus communicating with each other via the split second serial bus. In this manner, when the second serial bus is split, data flowing through the split bus does not enter the other bus, thereby reducing latency when communication contention occurs and accelerating input and output responses.
[0019] In one embodiment, the communication method executed by the above system may also include: integrating the first serial bus and the second serial bus between the CPU module and the plurality of expansion modules; and communicating between the CPU module and the plurality of expansion modules via the integrated first serial bus and the second serial bus. In this manner, since communication is performed via the integrated plurality of serial buses, the communication speed is increased compared to, for example, a configuration in which communication is performed via a single serial bus.
[0020] Effects of the Invention
[0021] According to the present disclosure, it is possible to improve the performance of a system including a plurality of modules communicatively connected via a bus. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is a block diagram showing a first example of a PLC according to a comparative example.
[0023] Figure 2 This is a block diagram showing a second example of the PLC according to the comparative example.
[0024] Figure 3 This is a block diagram showing a third example of the PLC according to the comparative example.
[0025] Figure 4 It is a diagram showing an example of communication scheduling of a PLC according to a comparative example.
[0026] Figure 5 This is a block diagram showing a configuration example of a system according to one embodiment of the present disclosure.
[0027] Figure 6 This is a diagram showing an example of a configuration of an inter-extension module communication mode of a system according to an embodiment of the present disclosure.
[0028] Figure 7 This is a flowchart showing an operation example in which the system according to one embodiment of the present disclosure is set to the inter-extension module communication mode and starts communication.
[0029] Figure 8 This is a flowchart showing an example of operations of communication between extension modules of a system according to an embodiment of the present disclosure.
[0030] Figure 9 This is a flowchart showing an example of normal communication or high-speed communication operations in the system according to one embodiment of the present disclosure.
[0031] Figure 10 This is a diagram showing an example of the configuration of a high-speed communication mode of a system according to one embodiment of the present disclosure.
[0032] Figure 11 This is a flowchart showing an example of operation in which the system according to one embodiment of the present disclosure is set to high-speed communication mode and starts communication.
[0033] Figure 12 This is a diagram showing another example of the configuration of the I / O communication mode of the system according to one embodiment of the present disclosure.
[0034] Figure 13 It is a diagram showing a modified example of the configuration of the system according to one embodiment of the present disclosure.
[0035] Description of Reference Numerals
[0036] A system
[0037] 1.2 Serial bus
[0038] 1a, 2a down
[0039] 1b, 2b uplink
[0040] 10 CPU modules
[0041] 11 Operational Circuit
[0042] 12 Main communication circuit
[0043] 13 Main communication function[0]
[0044] 14 Main communication functions[1]
[0045] 15 Main communication function [0,1]
[0046] 20 to 60 expansion modules
[0047] 21~61 external interfaces
[0048] 22~62 operation circuit
[0049] 23~63 master / slave communication circuit
[0050] 24 to 64 slave communication functions[0]
[0051] 25~65 from communication function[1]
[0052] 26~66 slave communication function [0,1]
[0053] 27~67 main communication functions[1]
[0054] 28~68 separation circuit DETAILED DESCRIPTION
[0055] (Comparative Example)
[0056] First, a PLC according to a comparative example will be described, and its problems will be discussed.
[0057] PLC buses are generally classified into two categories. Figure 1 The parallel bus type shown and Figure 2 In addition, as a PLC expansion module, in addition to the general modules, such as Figure 3 As shown in Figure 1, special expansion modules with dedicated external interfaces and dedicated arithmetic circuits are sometimes used. Special expansion modules can be used in both parallel bus and serial bus types.
[0058] Parallel bus type
[0059] like Figure 1 As shown in the figure, in a parallel bus type, the CPU module and expansion modules are generally mounted on a base module. Each module is connected via a parallel bus wired to the base module. The CPU module acts as the communication master, accessing and reading data from / writing data to the expansion modules via the parallel bus. The parallel bus is capable of bidirectional communication.
[0060] Serial bus type
[0061] like Figure 2 As shown, in a serial bus type, a base module is generally not required, and adjacent modules are connected via a serial bus. The CPU module acts as the communication master, sending commands to the expansion modules. Upon receiving a command addressed to its own station, the expansion module returns a response to the CPU module. A serial bus is a unidirectional bus; commands and responses are transmitted in a predetermined direction. When each expansion module receives a command or response addressed to another station, it forwards it to the next expansion module. This completes the transmission of commands and responses.
[0062] Special extension modules
[0063] Typically, input and output response processing is performed by the CPU module reading input values from the input module, processing them in the CPU module, and writing output values to the output module. On the other hand, in certain high-speed applications, such as conventional methods using general-purpose expansion modules, response time requirements may not be met. In such cases, Figure 3 As shown, a special expansion module equipped with a dedicated external interface and a dedicated arithmetic circuit is used to process input and output responses within the special expansion module instead of through the CPU module, thereby achieving faster response time.
[0064] (Problems of Comparative Example)
[0065] Parallel bus type
[0066] The parallel bus uses a multi-point circuit topology. Therefore, the entire bus is occupied during an access, and the next access cannot begin until the previous one completes. Furthermore, as the number of modules connected to the parallel bus increases, the signal waveform becomes more distorted, making it difficult to increase transfer speeds.
[0067] Serial bus type
[0068] A serial bus is a point-to-point circuit topology. Therefore, a stable signal waveform can be obtained regardless of the number of modules connected to the serial bus, making it easy to increase forwarding speed. Furthermore, compared to a parallel bus, the number of forwarded signals is also smaller. For these reasons, there has been a trend toward adopting serial buses in recent years. Furthermore, unlike a parallel bus, the entire bus is not occupied during access. Therefore, by sending and receiving multiple commands and responses at once on a serial bus, bus utilization efficiency can be improved compared to a parallel bus.
[0069] However, even if the bus usage efficiency is improved, for example, in the case of a mixture of high-priority communications and low-priority communications, the time requirement of the high-priority communications may sometimes not be met. Figure 4 As shown, a method of dividing time periods for each priority by scheduling communication (ie, time division) can be used, but this may cause disadvantages such as complicated scheduling management in the CPU module.
[0070] Special extension modules
[0071] The only I / O that can be used for input / output processing within a special expansion module is the I / O connected to the dedicated external interface of the special expansion module itself. Therefore, if you want to increase the number of I / O, you need to develop a new dedicated special expansion module, which lacks I / O scalability with external devices.
[0072] (System of the present disclosure)
[0073] In view of the above problems, the present disclosure aims to improve the I / O scalability with external devices in a system including a plurality of modules communicatively connected via a bus.
[0074] like Figure 5As shown, system A includes multiple serial buses 1 and 2, a CPU module 10, and multiple expansion modules 20, 30, 40, 50, and 60. System A may have two or more serial buses. Furthermore, system A may have one or more expansion modules. The CPU module 10 and the multiple expansion modules 20 to 60 are connected to a first serial bus 1 and a second serial bus 2. System A functions as, for example, a PLC or a data logger.
[0075] The serial bus 1 includes a downstream 1 a and an upstream 1 b .
[0076] The serial bus 2 includes a downstream bus 2a and an upstream bus 2b.
[0077] The CPU module 10 includes a calculation circuit 11 and a main communication circuit 12 .
[0078] The arithmetic circuit 11 may also include a processor that executes any control program and memory accessible by the processor. Examples of the processor include, but are not limited to, an MCU (microcontroller unit) or an MPU (microprocessor unit). Alternatively, the arithmetic circuit 11 may include a logic circuit such as an ASIC (application-specific integrated circuit) or an FPGA (field-programmable gate array).
[0079] The main communication circuit 12 includes a communication circuit for communicating via serial buses 1 and 2. Specifically, the main communication circuit 12 includes a communication circuit for reading and writing to the expansion modules 20 to 60 via serial buses 1 and 2. In this embodiment, the main communication circuit 12 includes a main communication function [0] 13, a main communication function [1] 14, and a main communication function [0, 1] 15, each of which can be switched to active / inactive.
[0080] The main communication function [0] 13 is a function of reading and writing to the expansion modules 20 to 60 in a channel using the serial bus 1 .
[0081] Specifically, the main communication function [0] 13 includes a function of communicating via a channel using the serial bus 1, a function of sending a command to another station, and a function of receiving a response from another station.
[0082] The main communication function [1] 14 is a function for communicating via a channel using the serial bus 2 .
[0083] Specifically, the main communication function [1] 14 includes a function of communicating via a channel using the serial bus 2, a function of sending commands to other stations, and a function of receiving responses from other stations.
[0084] The main communication function [0, 1] 15 is a function for reading and writing to the expansion modules 20 to 60 in the channel integrating the serial buses 1 and 2 .
[0085] Specifically, the main communication function [0, 1] 15 includes a function of communicating via a channel integrating the serial buses 1 and 2 , a function of sending commands to other stations, and a function of receiving responses from other stations.
[0086] The expansion module 20 may be, for example, a basic digital input module, digital output module, analog input module, analog output module, or a high-function module typically used in a PLC (Programmable Logic Controller) (e.g., a sub-CPU module, communication module, or positioning module), but is not limited to these. The expansion module 20 includes an external interface 21, a calculation circuit 22, a master / slave communication circuit 23, and a separation circuit 28.
[0087] The external interface 21 includes an interface for inputting and outputting signals to and from external devices such as field devices. In addition to simple input and output signals, external communication signals can be input and output via the external interface 21.
[0088] The arithmetic circuit 22 may also include a processor that executes arbitrary programs to perform operations within the expansion module 20, and memory accessible by the processor. The processor may be, for example, an MCU or an MPU, but is not limited to these. Alternatively, the arithmetic circuit 22 may include a logic circuit such as an ASIC or an FPGA.
[0089] The master / slave communication circuit 23 includes a communication circuit for communicating with the CPU module or other expansion modules 30 to 60. The master / slave communication circuit 23 includes a slave communication function [0] 24, a slave communication function [1] 25, a slave communication function [0, 1] 26, and a master communication function [1] 27, each of which can be switched between valid and invalid.
[0090] The slave communication function [0] 24 is a function for transmitting commands and responses to other stations to the next module in response to read / write requests from the CPU module 10 to the own station in the channel using the serial bus 1.
[0091] Specifically, the slave communication function [0] 24 includes a function of communicating via a channel using the serial bus 1, a function of returning a response to a command received from the CPU module 10 and sent to this station, a function of relaying a command received from the CPU module 10 and sent to other stations, and a function of relaying a response received from other stations.
[0092] The slave communication function [1] 25 is a function that sends commands and responses to other stations to the next module in response to read and write requests from the CPU module 10 or other expansion modules 30 to 60 to this station in the channel using the serial bus 2.
[0093] Specifically, the slave communication function [1] 25 includes a function of communicating via a channel using the serial bus 2, a function of returning a response to a command received from the CPU module 10 or other stations and sent to this station, a function of relaying a command received from the CPU module 10 or other stations and sent to other stations, and a function of relaying a response received from other stations.
[0094] The slave communication function [0,1] 26 is a function for transmitting commands and responses to other stations to the next module in response to read and write operations sent from the CPU module 10 to the own station in the channel integrating the serial buses 1 and 2 .
[0095] Specifically, the slave communication function [0,1]26 includes a function of communicating via a channel integrating serial buses 1 and 2, a function of returning a response to a command received from the CPU module 10 and sent to this station, a function of relaying a command received from the CPU module 10 and sent to other stations, and a function of relaying a response received from other stations.
[0096] The main communication function [1] 27 is a function for reading and writing to other expansion modules 30 to 60 in a channel using the serial bus 2.
[0097] Specifically, the main communication function [1] 27 includes a function of communicating via a channel using the serial bus 2, a function of sending commands to other stations, and a function of receiving responses from other stations.
[0098] Furthermore, the master / slave communication circuit 23 is controlled so that multiple functions common to the serial bus used for communication, among the four functions described above, are not simultaneously active. For example, when the master / slave communication circuit 23 activates either the slave communication function [0] 24 or the slave communication function [0,1] 26 for communication using serial bus 1, the other functions are disabled. For another example, when the master / slave communication circuit 23 activates either the slave communication function [1] 25, the slave communication function [0,1] 26, or the master communication function [1] 27 for communication using serial bus 2, the other functions are disabled.
[0099] Alternatively, the master / slave communication circuit 23 may disable other functions when the slave communication function [0] 24 and the slave communication function [1] 25 are enabled. Furthermore, the master / slave communication circuit 23 may disable other functions when the slave communication function [0] 24 and the master communication function [1] 27 are enabled. Furthermore, the master / slave communication circuit 23 may disable other functions when the slave communication function [0, 1] 26 is enabled.
[0100] The separation circuit 28 includes a circuit for logically separating the serial bus 2 from an adjacent module. In this embodiment, if the separation circuit 28 is turned on, the upstream side ( Figure 5 The serial bus 2 is logically separated on the CPU module 10 side. In this state, the expansion module 20 and the other modules ( Figure 5 On the other hand, if the separation circuit 28 is disconnected, the serial bus 2 is logically connected on the upstream side of the expansion module 20. In addition, the separation circuit 28 can also realize the communication between the downstream side (CPU module 10). Figure 5 The serial bus is logically separated / connected on the side opposite to the CPU module 10 rather than on the upstream side of the expansion module 20.
[0101] Expansion modules 30 through 60 each have the same structure and functions as expansion module 20. These identical structures and functions are given the same names as those of expansion module 20, but are labeled with different reference numbers. For example, the "external interfaces" of expansion modules 30, 40, 50, and 60 are labeled external interfaces 31, 41, 51, and 61, respectively.
[0102] Next, the operation of system A according to one embodiment of the present disclosure will be described. System A according to one embodiment of the present disclosure can operate in multiple modes, including an expansion module communication mode and a high-speed communication mode. Each mode will be described below.
[0103] (Extension module communication mode)
[0104] First, the inter-expansion module communication mode is explained. In inter-expansion module communication mode, serial bus 1 is used for normal communication, one of the two split serial buses 2 is used for normal communication, and the other is used for inter-expansion module communication. In normal communication, the CPU module 10 is the master, and the other modules are slaves. In inter-expansion module communication, a specific expansion module is the master, and the other expansion modules are slaves.
[0105] Reference Figure 6 This section describes an example configuration for operating system A in inter-expansion module communication mode. In this example, expansion module 50 serves as the master, and expansion modules 40 and 60 serve as slaves. Expansion module 40 receives input signals from external devices, while expansion module 60 outputs output signals to external devices.
[0106] Configuration of the main communication circuit of the CPU module
[0107] The main communication circuit 12 of the CPU module 10 enables the main communication function [0] 13 and the main communication function [1] 14, and disables other functions (main communication function [0, 1] 15). Figure 6 In order to simplify the description, illustrations of disabled functions are omitted.
[0108] Configuration of master / slave communication circuit of expansion module
[0109] The master / slave communication circuit 53 of the expansion module 50 enables the slave communication function [0] 54 and the master communication function [1] 57, and disables the other functions (slave communication function [1] 55 and slave communication function [0,1] 56). In addition, the master / slave communication circuits 23, 33, 43, and 63 of the other expansion modules 20, 30, 40, and 60 respectively enable the slave communication functions [0] 24, 34, 44, and 64, and the slave communication functions [1] 25, 35, 45, and 65, and disable the other functions (slave communication functions [0,1] 26, 36, 46, and 66, and master communication functions [1] 27, 37, 47, and 67). Figure 6 In order to simplify the description, illustrations of disabled functions are omitted.
[0110] Configuration of separation circuits for expansion modules
[0111] The separation circuit 48 of the expansion module 40 sets the operating state to ON and logically separates the serial bus 2 between the expansion modules 30 and 40. In addition, the separation circuits 28, 38, 58, and 68 of the other expansion modules 20, 30, 50, and 60 set the operating state to OFF and are connected to the serial bus 2 respectively. Figure 6 In the figure, for simplicity of description, the separation circuits 28, 38, 58 and 68 in the closed state are omitted.
[0112] Through the above configuration, a channel for normal communication is formed using the serial bus 1. The channel for normal communication using the serial bus 1 can be used independently of the serial bus 2. In addition, a channel for normal communication is formed using one of the separated serial buses 2 (here, the portion from the CPU module 10 to the expansion module 30). The channel for normal communication using one of the separated serial buses 2 can be used independently of the serial bus 1. In addition, a channel for communication between expansion modules is formed using another one of the separated serial buses 2 (here, the portion from the expansion modules 40 to 60). The channel for communication between expansion modules using another one of the separated serial buses 2 can be used independently of the channel for normal communication.
[0113] Reference Figure 7 , an operation example of setting system A to the expansion inter-module communication mode and starting communication is described.
[0114] Step S100: The main communication circuit 12 of the CPU module 10 is configured. Figure 6 In the example shown, the main communication circuit 12 enables the main communication function [0] 13 and the main communication function [1] 14 and disables the other functions (main communication functions [0, 1] 15).
[0115] Step S101: The master / slave communication circuits 23-63 of the expansion modules 20-60 are configured respectively. Figure 6 In the example shown, the master / slave communication circuit 53 of the expansion module 50 enables the slave communication function [0] 54 and the master communication function [1] 57, and disables the other functions (slave communication function [1] 55 and slave communication function [0, 1] 56). In addition, the master / slave communication circuits 23, 33, 43, and 63 of the other expansion modules 20, 30, 40, and 60 respectively enable the slave communication functions [0] 24, 34, 44, and 64, and the slave communication functions [1] 25, 35, 45, and 65, and disable the other functions (slave communication functions [0, 1] 26, 36, 46, and 66, and master communication functions [1] 27, 37, 47, and 67).
[0116] Step S102: The separation circuits 28 to 68 of the expansion modules 20 to 60 are configured respectively. Figure 6 In the example shown, the separation circuit 48 of the expansion module 40 is set to the open state, and the serial bus 2 is logically separated between the expansion modules 30 and 40. In addition, the separation circuits 28, 38, 58, and 68 of the other expansion modules 20, 30, 50, and 60 are set to the closed state and connected to the serial bus 2, respectively.
[0117] Step S103: System A starts normal communication using serial bus 1, normal communication using one of the separated serial buses 2 (here, the part from CPU module 10 to expansion module 30), and inter-extension module communication using another separated serial bus 2 (here, the part from expansion modules 40 to 60).
[0118] Reference Figure 8 , an example of the inter-extension module communication operation of system A in the inter-extension module communication mode is described.
[0119] Step S200: Figure 6 In the example shown, the expansion module 40 obtains an input value from an input signal 49 input via the external interface 41 .
[0120] Step S201: The expansion module 50 reads the input value from the expansion module 40. Specifically, Figure 6 In the example shown, the master / slave communication circuit 53 of the expansion module 50 transmits a command 74 read via the upstream 2b of the serial bus 2 to the expansion module 40 via the master communication function [1] 57. The master / slave communication circuit 43 of the expansion module 40 returns a response 75 via the downstream 2a of the serial bus 2 via the slave communication function [1] 45.
[0121] Step S202 : The expansion module 50 performs input / output response processing calculations through the calculation circuit 52 and determines an output value.
[0122] Step S203: The expansion module 50 writes the output value to the expansion module 60. Specifically, Figure 6 In the example shown, the master / slave communication circuit 53 of the expansion module 50 transmits a command 76 written via the downstream 2a of the serial bus 2 to the expansion module 60 via the master communication function [1] 57. The master / slave communication circuit 63 of the expansion module 60 returns a response 77 via the upstream 2b of the serial bus 2 via the slave communication function [1] 65.
[0123] Step S204: The expansion module 60 outputs an output signal 69 (see Figure 6 ).
[0124] Reference Figure 9 , an example of normal communication operation of system A in the expansion module inter-communication mode is described.
[0125] Step S300: The CPU module 10 sends a command to the expansion module. Figure 6In the example shown, the main communication circuit 12 of the CPU module 10 transmits a command 70 to the expansion module 40 via the downstream line 1a of the serial bus 1 through the main communication function [0] 13. Furthermore, the main communication circuit 12 transmits a command 72 to the expansion module 30 via the downstream line 2a of the serial bus 2 through the main communication function [1] 14.
[0126] Step S301: The expansion module that receives the command returns a response. Figure 6 In the example shown, the master / slave communication circuit 43 of the expansion module 40 returns a response 71 via the upstream 1b of the serial bus 1 through the slave communication function [0] 44. Furthermore, the master / slave communication circuit 33 of the expansion module 30 returns a response 73 via the upstream 2b of the serial bus 2 through the slave communication function [1] 35.
[0127] (High-speed communication mode)
[0128] Next, the high-speed communication mode is described. In high-speed communication mode, high-speed communication is performed via a channel that integrates serial buses 1 and 2. Specifically, the downstream channel 1a of serial bus 1 and the downstream channel 2a of serial bus 2 are used as the downstream channel of the integrated serial buses 1 and 2. The upstream channel 1b of serial bus 1 and the upstream channel 2b of serial bus 2 are used as the upstream channel of the integrated serial buses 1 and 2. Therefore, in high-speed communication, the bit width of each downstream and upstream channel is doubled compared to the normal communication described above. In high-speed communication, the CPU module 10 serves as the master, and the other modules serve as slaves.
[0129] Reference Figure 10 Next, an example of a configuration for operating the system A in high-speed communication mode will be described. In this example, the CPU module 10 serves as the master, and the expansion modules 20 to 60 serve as slaves.
[0130] Configuration of the main communication circuit of the CPU module
[0131] The main communication circuit 12 of the CPU module 10 enables the main communication function [0, 1] 15 and disables other functions (main communication function [0] 13 and main communication function [1] 14). Figure 10 In order to simplify the description, illustrations of disabled functions are omitted.
[0132] Configuration of master / slave communication circuit of expansion module
[0133] The master / slave communication circuits 23 to 63 of the expansion modules 20 to 60 respectively enable the slave communication functions [0, 1] 26 to 66 and respectively disable the other functions (slave communication functions [0] 24 to 64, slave communication functions [1] 25 to 65, and master communication functions [1] 27 to 67). Figure 10 In order to simplify the description, illustrations of disabled functions are omitted.
[0134] Configuration of separation circuits for expansion modules
[0135] The separation circuits 28 to 68 of the expansion modules 20 to 60 are set to the closed state and are connected to the serial bus 2 respectively. Figure 10 In the figure, for simplicity of description, the separation circuits 28 to 68 whose operation state is closed are omitted.
[0136] With the above configuration, the serial buses 1 and 2 are integrated to form a channel for high-speed communication.
[0137] Reference Figure 11 , an example of setting system A to high-speed communication mode and starting communication is described.
[0138] Step S400: The main communication circuit 12 of the CPU module 10 is configured. Figure 10 In the example shown, the main communication circuit 12 enables the main communication function [0, 1] 15 and disables the other functions (main communication function [0] 13 and main communication function [1] 14).
[0139] Step S401: The master / slave communication circuits 23-63 of the expansion modules 20-60 are configured respectively. Figure 10 In the example shown, the master / slave communication circuits 23 to 63 respectively enable the slave communication functions [0, 1] 26 to 66 and respectively disable the other functions (slave communication functions [0] 24 to 64, slave communication functions [1] 25 to 65, and master communication functions [1] 27 to 67).
[0140] The operations in steps S400 and S401 are, in other words, operations in which the CPU module 10 and the expansion modules 20 to 60 integrate the serial buses 1 and 2 to form a high-speed communication channel.
[0141] Step S402: The separation circuits 28 to 68 of the expansion modules 20 to 60 are configured respectively. Figure 10 In the example shown, the separation circuits 28 to 68 of the expansion modules 20 to 60 are respectively set to the OFF state and connected to the serial bus 2 .
[0142] Step S403 : System A starts high-speed communication via the channel integrating serial buses 1 and 2 .
[0143] Next, we will explain the high-speed communication operation example of system A in high-speed communication mode. In high-speed communication, the configuration details and the channels used in communication are different from those in normal communication described above, but the operation flow is the same. Therefore, for the high-speed communication operation example, refer to the above-mentioned Figure 9 Provide explanation.
[0144] Step S300: The CPU module 10 sends a command to the expansion module. Figure 10 In the example shown, the main communication circuit 12 of the CPU module 10 transmits a command 80 to the expansion module 40 via the downstream lines 1a and 2a of the serial buses 1 and 2 via the main communication function [0,1] 15. Furthermore, the main communication circuit 12 transmits a command 82 to the expansion module 60 via the downstream lines 1a and 2a of the serial buses 1 and 2 via the main communication function [0,1] 15.
[0145] Step S301: The expansion module that receives the command returns a response. Figure 10 In the example shown, the master / slave communication circuit 43 of the expansion module 40 returns a response 81 via the upstream 1b and 2b of the serial buses 1 and 2 via the slave communication function [0,1] 46. Furthermore, the master / slave communication circuit 63 of the expansion module 60 returns a response 83 via the upstream 1b and 2b of the serial buses 1 and 2 via the slave communication function [0,1] 66.
[0146] Effects of extending inter-module communication mode
[0147] exist Figure 6 In the example of FIG, the expansion module 50 that functions as the master in the communication between the expansion modules can directly read and write to the expansion modules 40 and 60 that function as the master. As a result, the expansion module 50 can use the arithmetic circuit 52 to perform high-speed and intelligent input and output response processing without the CPU module 10. In addition, since the external interface of any expansion module can be used according to the configuration, it is similar to, for example, using Figure 3 Compared with the structure of the special expansion module shown, it can make up for the lack of I / O number.
[0148] Furthermore, by separating the serial bus 2 using a separation circuit, a dedicated channel for communication between expansion modules can be ensured.
[0149] For example, with Figure 6 Compared to the embodiment shown, Figure 12The difference in the example shown is that the separation circuit 48 is closed (that is, the serial bus 2 is not separated). In this comparative example, command 90 is a broadcast command sent from the CPU module 10 to all expansion modules 20 to 60 at the same time. This broadcast communication can be regarded as part of normal communication. In this case, when the timing of broadcast communication and communication between expansion modules is repeated, contention occurs and the input and output response time becomes longer. In addition, command 91 is an erroneous communication command sent from the expansion module 50. Erroneous communication of commands may occur, for example, during the development of the device. In this case, the erroneous command will enter the channel on the side that has not been separated (the uplink side), and unnecessary error processing will occur.
[0150] In this regard, Figure 6 As shown in the example, in this embodiment, commands other than those for communication between expansion modules do not enter the channel on the separated side (downstream side), thereby reducing the waiting time when communication contention occurs. This can speed up input and output responses. In addition, even in the channel on the unseparated side (upstream side), it is possible to prevent unnecessary commands or responses from the channel on the separated side from entering.
[0151] Effects of high-speed communication mode
[0152] exist Figure 10 In the example shown, serial buses 1 and 2 are combined into a single high-speed communication channel, enabling communication at twice the speed of normal communication. Therefore, high-speed communication mode is effective in applications such as high-speed data collection, where the data volume is large or the requested transfer time is short.
[0153] Configuration effect
[0154] like Figure 6 as well as Figure 10 As shown in the example, according to this embodiment, the use of the serial bus can be changed simply by changing the configuration of the master communication circuit 12 of the CPU module 10 and the master / slave communication circuits 23 to 63 and separation circuits 28 to 68 of the expansion modules 20 to 60.
[0155] It should be noted that although the present disclosure is described based on the various figures and embodiments, those skilled in the art may also make various variations and modifications based on the present disclosure. Therefore, it should be noted that such variations and modifications are included in the scope of the present disclosure. For example, the functions included in each structure or step may be reorganized without logical conflict, and multiple structures or steps may be combined into one or divided.
[0156] (Serial Bus Applications / Variations)
[0157] For example, the downlink and uplink signals of a serial bus are not limited to 1 bit and can be 2 bits or more. Furthermore, the number of serial buses is not limited to two and can be three or more. Furthermore, the roles of serial buses 1 and 2 can be interchanged.
[0158] (Application / Variation of the Communication Mode between Extension Modules)
[0159] The number of expansion modules can be one or more. Furthermore, the number of expansion modules that serve as masters for inter-extension module communication can be two or more. Furthermore, separation circuits 28 to 68 allow the serial bus to be separated not only at one location but also at multiple locations. Furthermore, the number of separable serial buses can be two or more.
[0160] (Application / Transformation of High-Speed Communication Mode)
[0161] The number of expansion modules may be one or more. In addition, the number of integrated serial buses may be two or more.
[0162] (Application / Transformation of Extension Modules)
[0163] Some of the expansion modules of system A may not have external interfaces. In addition, some of the expansion modules may not have arithmetic circuits. In addition, some of the expansion modules may not have separation circuits. In addition, some of the expansion modules may not have main communication functions [1].
[0164] (Application / Transformation of Configuration)
[0165] Figure 13 The configuration and operation example when communication between expansion modules is not performed are shown as Figure 6 A variation of .
[0166] Configuration of the main communication circuit of the CPU module
[0167] The main communication circuit 12 of the CPU module 10 enables the main communication function [0] 13 and the main communication function [1] 14, and disables other functions (main communication function [0, 1] 15). Figure 13 In order to simplify the description, illustrations of disabled functions are omitted.
[0168] Configuration of master / slave communication circuit of expansion module
[0169] The master / slave communication circuits 23 to 63 of the expansion modules 20 to 60 respectively enable the slave communication functions [0] 24 to 64 and the slave communication functions [1] 25 to 65, and disable the other functions (slave communication functions [0, 1] 26 to 66 and master communication functions [1] 27 to 67). Figure 13In order to simplify the description, illustrations of disabled functions are omitted.
[0170] Configuration of separation circuits for expansion modules
[0171] The separation circuits 28 to 68 of the expansion modules 20 to 60 are set to the closed state and are connected to the serial bus 2. Figure 13 In the figure, for simplicity of description, the separation circuits 28 to 68 whose operation state is closed are omitted.
[0172] Actions in the Modification
[0173] With this configuration, all communications become normal communications only. In this case, the CPU module 10 becomes the master, and all expansion modules 20 to 60 become slaves. The CPU module 10 sends a command to the destination expansion module, and the expansion module that receives the command returns a response to the CPU module 10. The normal communication channel using serial bus 1 and the normal communication channel using serial bus 2 can be used independently of each other.
[0174] Example of normal communication on serial bus 1
[0175] exist Figure 13 In the example shown, the master communication circuit 12 of the CPU module 10 transmits a command 70 to the expansion module 40 via the downstream line 1a of the serial bus 1 using the master communication function [0] 13. The master / slave communication circuit 43 of the expansion module 40 returns a response 71 via the upstream line 1b of the serial bus 1 using the slave communication function [0] 44.
[0176] Example of normal communication on serial bus 2
[0177] exist Figure 13 In the example shown, the master communication circuit 12 of the CPU module 10 transmits a command 78 to the expansion module 60 via the downstream 2a of the serial bus 2 via the master communication function [1] 14. The master / slave communication circuit 63 of the expansion module 60 returns a response 79 via the upstream 2b of the serial bus 2 via the slave communication function [1] 65.
[0178] Effects of the Modification
[0179] In this variation, the normal communication channel using serial bus 1 and the normal communication channel using serial bus 2 can be used independently of each other. This configuration is effective, for example, when it is desired to simultaneously control an external device and collect data. For example, by allocating serial bus 1 for control and serial bus 2 for data collection, it is possible to simultaneously control external devices and collect data without affecting the control cycle.
Claims
1. A communication method for a system comprising a first serial bus, a second serial bus, a CPU module, and a plurality of expansion modules, wherein the CPU module and the plurality of expansion modules are connected to the first serial bus and the second serial bus, respectively, comprising: a step of the expansion module separating the second serial bus into two; The CPU module communicates with the plurality of expansion modules via the first serial bus; The CPU module communicates with the expansion module connected to the second serial bus via the separated second serial bus; as well as A step of allowing two or more expansion modules connected to the separated second serial bus to communicate with each other via the separated second serial bus.
2. A communication method for a system comprising a first serial bus, a second serial bus, a CPU module, and a plurality of expansion modules, wherein the CPU module and the plurality of expansion modules are connected to the first serial bus and the second serial bus, respectively, comprising: The CPU module and the plurality of expansion modules integrate the first serial bus and the second serial bus; and The CPU module and the plurality of expansion modules communicate via the integrated first serial bus and the second serial bus.
Citation Information
Patent Citations
Method for synchronizing plc module with option module
JP2003202907A