Control system, control method, programmable logic controller, and I / O module
The control system with redundant I/O modules automatically manages field devices by transmitting status information, ensuring continuous operation and reliability by switching to standby modules when necessary.
Patent Information
- Application Number
- JP2025100945
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-11-26
- Estimated Expiration
- 2045-06-17
AI Technical Summary
Conventional control systems require identification of the operational I/O module to control field devices, which can lead to inefficiencies and potential failures when modules fail.
A control system with redundant I/O modules that transmit status information to a programmable logic controller, allowing the controller to manage field devices without identifying specific operational modules, using a storage unit for input and output data and a control unit to process this data.
Enables seamless control of field devices by automatically switching to standby modules in case of failures, maintaining system reliability and efficiency.
Smart Images

Figure 0007776039000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a technique for providing redundancy to a control system that includes a programmable logic controller and an I / O module. [Background technology]
[0002] In a control system for a plant or the like, an I / O module is sometimes provided to control the transmission and reception of signals between a control device such as a programmable logic controller and a controlled device (also called a field device) such as a motor or a pump. In order to increase the reliability of such a control system, a configuration in which the I / O modules are duplicated is known (for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2020-123309 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in the conventional technology, a memory area is allocated to each I / O module in the control device, and the control program implemented in the control device is written to reference the memory area corresponding to the I / O module in operation. Therefore, the control device constantly monitors which I / O modules are in operation, identifies the memory area to reference, and controls the field device.
[0005] An object of one aspect of the present invention is to provide a configuration in a control system in which I / O modules are redundant, in which a control device can control a field device without identifying which I / O module is in operation. [Means for solving the problem]
[0006] According to one aspect of the present invention, a control system includes a programmable logic controller for controlling a control target and a plurality of I / O modules that are redundantly connected between the programmable logic controller and the control target. Each of the I / O modules includes a transmitter that transmits input data acquired from the control target and status information indicating whether the I / O module is operating to the programmable logic controller, and a receiver that receives output data for controlling the control target from the programmable logic controller. The programmable logic controller includes a storage unit that includes a first memory area for storing the input data and a second memory area for storing the output data, and a control unit that executes an input process that writes the input data transmitted from an I / O module among the plurality of I / O modules that indicates that the status information indicates that the I / O module is operating to the first memory area, and an output process that reads the output data from the second memory area and transmits the output data to the plurality of I / O modules. [Effects of the Invention]
[0007] According to the above-described aspect, in a control system in which I / O modules are made redundant, the control device can control the field device without identifying which I / O module is in operation. [Brief explanation of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram illustrating an example of a control system according to an embodiment of the present invention. [Figure 2] FIG. 1 is a diagram illustrating an example of a hardware configuration of a PLC. [Figure 3] FIG. 2 is a diagram illustrating an example of a functional configuration of a PLC. [Figure 4] FIG. 2 is a diagram illustrating an example of a control process cycle executed by a PLC. [Figure 5] FIG. 2 is a diagram illustrating an example of a hardware configuration of a PC. [Figure 6]FIG. 2 illustrates an example of a hardware configuration of an I / O module. [Figure 7] FIG. 2 illustrates an example of a functional configuration of an I / O module. [Figure 8] FIG. 10 is a diagram illustrating an example of a functional configuration of a support tool that supports the setting of a control system. [Figure 9] FIG. 10 is a diagram illustrating an example of a data format of a user IQ area. [Figure 10] FIG. 2 is a diagram illustrating an example of a data format of a system configuration definition file. [Figure 11] 10 is a flowchart illustrating an example of processing for expanding a system definition file. [Figure 12] FIG. 10 is a diagram illustrating an example of the format of an I / O refresh table. [Figure 13] FIG. 10 is a diagram illustrating an example of an I / O refresh table. [Figure 14] FIG. 10 is a diagram illustrating an example of setting information of an I / O module. [Figure 15] 10 is a diagram illustrating an example of a format of a communication frame transmitted between a PLC and an I / O module. FIG. [Figure 16] FIG. 10 is a diagram illustrating an example of input / output refresh data stored in a communication frame. [Figure 17] 10 is a flowchart illustrating an example of a refresh process performed by an I / O module. [Figure 18] FIG. 10 is a diagram illustrating the operation of an I / O module involved in a refresh process. [Figure 19] 10 is a flowchart illustrating an example of a refresh process performed by a PLC. [Figure 20] 10 is a flowchart illustrating an example of a process for updating refresh management information in accordance with the operating state of an I / O module. [Figure 21] 10 is a flowchart illustrating an example of a process for copying input data stored in a frame buffer of a PLC to a user IQ area. [Figure 22]FIG. 1 is a diagram (part 1) illustrating a schematic diagram of the operation of the PLC in input refresh processing. [Figure 23] FIG. 2 is a diagram (part 2) schematically illustrating the operation of the PLC in the input refresh process. [Figure 24] 10 is a flowchart illustrating an example of a process for copying output data stored in a frame buffer of a PLC to a communication frame. DETAILED DESCRIPTION OF THE INVENTION
[0009] <Control system configuration> 1 shows an example of a control system according to an embodiment of the present invention. The control system 8 according to the embodiment of the present invention includes a PLC (programmable logic controller) 1, a PC (personal computer) 2, a plurality of redundant I / O modules 3 (3a, 3b), and a field device 4. The PLC 1 and the PC 2 are communicatively connected to each other via a communication cable 5. The PLC 1 and each I / O module 3 are communicatively connected to each other via a communication cable 6. The I / O modules 3 and the field device 4 are communicatively connected to each other via a communication cable 7. Note that a wireless link may be set up instead of the communication cables 5, 6, and 7.
[0010] The PLC 1 is an example of a control device, and for example, comprehensively controls various devices (field devices 4 in FIG. 1 ) for achieving factory automation. A control program related to the control of the control system 8 is implemented in the PLC 1. In the following description, the control program implemented in the PLC 1 may be referred to as a "user program." The user program may be created using, for example, a ladder language conforming to IEC (International Electrotechnical Commission) 61131-3. The user program may be created using a graphical programming language such as a motion program in a flowchart format, such as a sequential function chart (SFC). The user program may be created using a high-level programming language, such as C.
[0011] The PC2 functions as a support tool to support the PLC 1. The PC2 is also used to edit user programs implemented in the PLC 1. Furthermore, the PC2 also provides a function to set up the I / O module 3.
[0012] The I / O module 3 is provided between the PLC 1 and the field device 4. It transmits input data from the field device 4 to the PLC 1 and transmits output data generated by the PLC 1 to the field device 4. At this time, the I / O module 3 may convert the signal format as necessary. The I / O module 3 may process digital signals or analog signals. In the example shown in FIG. 1, redundancy is achieved between the PLC 1 and the field device 4 by two I / O modules 3 (3a, 3b), but redundancy may be achieved by three or more I / O modules 3. In the example shown in FIG. 1, the control system 8 includes one set of redundant I / O modules, but may include two or more sets of redundant I / O modules.
[0013] The field device 4 is an example of a controlled object controlled by the PLC 1 and is various devices for realizing factory automation. For example, the field device 4 is a servo amplifier, an encoder, or a sensor. In this case, the PLC 1 may control the servo amplifier and / or the encoder via the I / O module 3. Also, the PLC 1 may acquire data representing the states of the servo amplifier and / or the encoder and / or sensor data via the I / O module 3.
[0014] In the control system 8 having the above configuration, one I / O module 3 (for example, the I / O module 3a) among the plurality of redundant I / O modules 3 is set to the operating state, and the other I / O modules 3 (for example, the I / O module 3b) are set to the standby state. In this case, the PLC 1 collects information from the field device 4 via the I / O module 3a and controls the field device 4 via the I / O module 3a. When a failure occurs in the I / O module 3a, the operating state of the I / O module 3b switches from the standby state to the operating state. Thereafter, the PLC 1 collects information from the field device 4 via the I / O module 3b and controls the field device 4 via the I / O module 3b.
[0015] <Configuration and Functions of PLC 1> FIG. 2 shows an example of the hardware configuration of the PLC 1. As shown in FIG. 2, the PLC 1 includes a communication I / F 11, a CPU (Central Processing Unit) 12, a bus controller 13, and a memory 14. All of these components 11 to 14 are hardware and can exchange data with each other. Specifically, the communication I / F 11 and the CPU 12 are connected to each other by an internal bus 15. The CPU 12, the bus controller 13, and the memory 14 are connected to each other by an internal bus 16. "I / F" is an abbreviation for interface. The CPU 12 is sometimes called a processor.
[0016] The communication I / F 11 is connected to the PC 1 via a communication cable 5 and manages the exchange of various data with the PC 1. The CPU 12 executes various programs, such as a system program for managing the operation of the PLC 1 itself and a user program for controlling the control system 8. The bus controller 13 is connected to the communication cable 6 and manages the exchange of various data with the I / O module 3. The memory 14 is, for example, a semiconductor memory and includes a RAM (Random Access Memory) area and a ROM (Read Only Memory) area. The RAM area is used as a storage area for temporarily storing various data when the CPU 12 executes various programs. The ROM area is an area where various programs and data are saved and is realized by, for example, a non-volatile memory.
[0017] Fig. 3 shows an example of the functional configuration of PLC 1. PLC 1 includes a control unit 110 and a storage unit 120. The control unit 110 includes an input processing unit 111, a program execution processing unit 112, an output processing unit 113, and a system processing unit 114. Note that the control unit 110 may further include other functions not shown in Fig. 3.
[0018] Fig. 4 shows an example of a control processing cycle executed by PLC 1. As shown in Fig. 4, PLC 1 repeatedly executes control processing including input processing, program execution processing, output processing, and system processing at a predetermined control cycle. The input processing, program execution processing, output processing, and system processing are executed by an input processing unit 111, a program execution processing unit 112, an output processing unit 113, and a system processing unit 114, respectively. The control processing may also include other processing not shown in Fig. 4.
[0019] The input process takes in the input data received from the I / O module 3 into the PLC 1. The program execution process executes the user program created by the user. In the execution of the user program, the input data taken in by the input process may be used. The output process controls the I / O module 3 (and the field device 4) by outputting the execution result of the user program. That is, the execution result of the user program is reflected in the output of the I / O module 3. The system process maintains the proper operation of the PLC 1 by managing the operation of the PLC 1.
[0020] The storage unit 120 includes the user IQ area 121. In the user IQ area 121, the input data and output data of the I / O module 3 are temporarily stored. Specifically, the input data received from the I / O module 3 is stored in the user IQ area 121, and the user program can use the input data. Also, the execution result by the user program is stored in the user IQ area 121 as output data and is transmitted to the I / O module 3 by the communication frame described later.
[0021] <Configuration of PC 2> FIG. shows an example of the hardware configuration of the PC 2. As shown in FIG. , the PC 2 includes a CPU 21, a memory 22, an input device 23, a display device 24, an auxiliary storage device 25, and a communication I / F 26. These components are all hardware and are connected to the internal bus 27 and can transmit data to each other.
[0022] The CPU 21 provides functions such as a function to set the PLC 1 (including the function to edit the user program) by executing a program using the memory 22, for example. The input device 23 is, for example, a keyboard and / or a pointing device and is used for input of instructions or information from the user. The display device 24 displays inquiries to the user, instructions to the user, and processing results, for example.
[0023] The auxiliary storage device 25 is realized by, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a hard disk drive, or a flash memory. The PC 2 can store programs and data in the auxiliary storage device 25 and use them by loading them into the memory 22. The communication I / F 26 is connected to the communication cable 5 and communicates with the PLC 1.
[0024] 6 shows an example of the hardware configuration of the I / O module 3. The configuration of each I / O module 3 (3a, 3b) is substantially the same. Therefore, in the description of FIG. 6, the I / O modules 3a and 3b may be collectively referred to as the I / O module 3.
[0025] 6, the I / O module 3 includes a bus I / F 31, a memory 32, a reference oscillator 33, an FPGA (Field Programmable Gate Array) 34, an input / output circuit 35, a redundant communication unit 36, and a changeover switch 37. The bus I / F 31, the memory 32, the reference oscillator 33, and the FPGA 34 are connected to each other via an internal bus 38.
[0026] The bus I / F 31 is connected to the communication cable 6 and controls various data including input data / output data of the I / O module 3 between the PLC 1 and the I / O module 3. The memory 32 includes a memory space for storing output data sent from the PLC 1. The memory 32 may also include a memory space for storing input data acquired from the field device 4. The memory 32 is a computer-readable recording medium and may be composed of at least one of a ROM (Read Only Memory), an EPROM (Erasable Programmable ROM), an EEPROM (Electrically EPROM), a RAM (Random Access Memory), or other appropriate recording medium. The memory 32 may also be called a register, a cache, a main memory (primary storage device), etc.
[0027] The reference oscillator 33 is, for example, a crystal oscillator, and outputs a reference clock used by the FPGA 34. Note that, although the reference oscillator 33 is provided outside the FPGA 34 in the example shown in FIG. 6, it may be built into the FPGA 34.
[0028] The FPGA 34 is a hardware circuit whose logic can be changed, and provides the functions described below. Note that the I / O module 3 may be configured to include a microcomputer or the like that executes software processing instead of the FPGA 34.
[0029] The input / output circuit 35 controls the output data output from the I / O module 3 to the field device 4. The input / output circuit 35 also controls the input data received from the field device 4.
[0030] The redundancy communication unit 36 transmits and receives redundancy control signals to and from other I / O modules. The redundancy control signal may be, for example, abnormality level data indicating the abnormality level of the I / O module. In this case, the FPGA 34 may determine the operating state (operating state or standby state) of the I / O module based on the abnormality level data. The changeover switch 37 is provided between the input / output circuit 35 and the field device 4 and processes data depending on whether the I / O module is operating or standby.
[0031] 7 shows an example of the functional configuration of the FPGA 34 (or microcomputer) implemented in the I / O module 3. Here, it is assumed that the FPGA 34 is implemented in the I / O module 3. The FPGA 34 includes an input processing unit 301, an output processing unit 302, an abnormality level detection unit 303, a redundancy switching processing unit 304, and a system processing unit 305.
[0032] The input processing unit 301 processes input data acquired from the field device 4. The input processing unit 301 may convert the input signal received from the field device 4 into numerical data and then store it in a frame buffer (described later). The input processing unit 301 may also operate as a transmitting unit that transmits the input data acquired from the field device 4 and status information indicating whether the I / O module is in operation to the PLC 1.
[0033] The output processing unit 302 outputs the output data generated by the PLC 1 to the field device 4. At this time, the output processing unit 302 may convert numerical data stored in a frame buffer (described later) into an output signal and output it to the field device 4. The output processing unit 302 may also operate as a receiving unit that receives output data for controlling the field device 4 from the PLC 1.
[0034] The abnormality level detection unit 303 detects an abnormality in the I / O module and determines the abnormality level. The abnormality level detection unit 303 also transmits abnormality level data to other I / O modules via the redundant communication unit 36. The abnormality level data may be, for example, composed of two bits and represent the abnormality level in four stages. Alternatively, the abnormality level data may be composed of one bit and represent "no abnormality (0)" or "abnormality (1)."
[0035] The redundancy switching processor 304 determines the operating state of the I / O module based on the abnormality level data transmitted to and received from other I / O modules. For example, in the control system 8 shown in FIG. 1 , the redundancy switching processor 304 installed in the I / O module 3a determines whether to set the operating state of the I / O module 3a to "operating state" or "standby state" based on the abnormality level data transmitted to and received from the I / O module 3b. Specifically, the redundancy switching processor 304 installed in the I / O module 3a sets the I / O module 3a to the operating state when the abnormality level of the I / O module 3a is lower than the abnormality level of the I / O module 3b, sets the I / O module 3a to the standby state when the abnormality level of the I / O module 3a is higher than the abnormality level of the I / O module 3b, and maintains the current operating state when the abnormality level of the I / O module 3a is the same as the abnormality level of the I / O module 3b.
[0036] The system processing unit 305 manages the operation of the I / O module to maintain an appropriate operating state. The system processing unit 305 may also update the frame buffer of the I / O module using a communication frame received from PLC 1, and may also create a communication frame to be sent to PLC 1 according to the data / information stored in the frame buffer.
[0037] <Support tools> Fig. 8 shows an example of the functional configuration of a support tool that supports the setting of the control system 8. The support tool 210 that supports the setting of the PLC 1 includes a user program section 211 and a setting section 212. Note that the support tool 210 may further include other functions not shown in Fig. 8. In the control system 8 shown in Fig. 1, the support tool 210 is realized by the PC 2.
[0038] The user program unit 211 provides a function for creating and editing a user program. The setting unit 212 receives information indicating the configuration of the control system 8 and information related to settings for operating the control system 8 from the user. The setting unit 212 then notifies the PLC 1 and the I / O module 3 of this information. At this time, the setting unit 212 may convert this information into a data format that can be interpreted by the control system 8, as necessary.
[0039] The input data / output data of the I / O module 3 connected to the PLC 1 is stored in a user IQ area 121 shown in Fig. 3 and provided to the user. By using the user IQ area 121, the user can edit a user program that controls the control system 8 using input data acquired from the field devices 4 and output data to be given to the field devices 4.
[0040] FIG. 9 shows an example of the data format of the user IQ area 121. Input data / output data of an I / O module 3 is stored at a corresponding address in the user IQ area 121. In this embodiment, an address in the user IQ area 121 is specified by three elements. The first element identifies the input data or output data (I or Q). The second element represents a unique number assigned to each PLC 1. The third element represents a station number identifying each I / O module 3. In this case, for example, input data acquired by a PLC 1 identified by "1" from an I / O module 3 having station number "1" is stored at address "I_1,1" in the user IQ area 121. Output data to be provided by a PLC 1 identified by "1" to an I / O module 3 having station number "2" is stored at address "Q_1,2" in the user IQ area 121.
[0041] The setting unit 212 of the support tool 210 displays a screen on the display device 24 of the PC 2 requesting setting information for the control system 8. In response to this, the user inputs setting information for the control system 8. The setting information for the control system 8 includes information specifying the configuration of the control system 8 and information for operating the control system 8. The setting unit 212 then creates various definition files, such as a system configuration definition file and an I / O refresh definition file, based on the setting information input by the user. The setting unit 212 then transmits these definition files to the PLC 1 and each I / O module 3.
[0042] 10 shows an example of the data format of a system configuration definition file 401. The system configuration definition file 401 includes information indicating the number of I / O modules and individual information for each I / O module.
[0043] The number of I / O modules indicates the number of I / O modules 3 used in the control system 8. For example, in the control system 8 shown in FIG. 1, I / O modules 3a and 3b are used, so the number of I / O modules is "2."
[0044] The individual information of the I / O module is created for each I / O module 3 used in the control system 8, and includes the address of the user IQ area, module type, input refresh data size, output refresh data size, redundancy setting information, redundancy pair station information, and default operation setting information. Each I / O module 3 used in the control system 8 is assigned unique station number information, and the address of the user IQ area 121 is determined corresponding to the station number information. The address of the user IQ area represents the address of the user IQ area 121 that stores the input data / output data of the I / O module 3.
[0045] The module type indicates a name that identifies the I / O module 3. The input refresh data size indicates the size of input data sent from the I / O module 3 to the PLC 1 in the input refresh process. The output refresh data size indicates the size of output data sent from the PLC 1 to the I / O module 3 in the output refresh process. Note that if the input refresh data size and output refresh data size are uniquely determined for each module type, there is no need to request the user to set these values.
[0046] The redundancy setting information indicates whether the I / O module 3 is made redundant or not; for example, if the I / O module is made redundant, "1" is set, and if the I / O module is not made redundant, "0" is set. The redundancy pair station number information indicates which I / O module has station number information to pair with when making the I / O module redundant; for example, "2" is set when pairing with an I / O module having station number information of "2." The default operation setting information indicates whether the I / O module operates in an active state or a standby state when the control system 8 is started for the first time when making the I / O module redundant. For example, if the initial setting of the control system 8 is to have I / O module 3a operating and I / O module 3b on standby, the default operation setting information of I / O module 3a is set to "active state," and the default operation setting information of I / O module 3b is set to "standby state."
[0047] Although not shown, the I / O refresh definition file includes general setting information (such as the setting value of the control period shown in FIG. 4) related to the I / O refresh process controlled by the PLC 1. In the following description, the system configuration definition file 401 and the I / O refresh definition file may be collectively referred to as the "system definition file."
[0048] 11 is a flowchart showing an example of processing for expanding a system definition file. In the following description, the processing shown in this flowchart may be referred to as the initial processing of the control system 8.
[0049] In S1, the PLC 1 receives a system definition file created using the support tool 210. The system definition file includes the system configuration definition file 401 described with reference to Fig. 10 and an I / O refresh definition file (not shown).
[0050] In S2, the PLC 1 creates an I / O refresh table, which determines to which position in the user IQ area 121 the input data / output data of the I / O module 3 is to be allocated.
[0051] 12 shows an example of the format of the I / O refresh table. The I / O refresh table 411 includes information indicating the number of pieces of management information and refresh management information for each I / O module. Note that, because refresh management information is set for each I / O module, the number of pieces of management information is the same as the number of I / O modules 3 used in the control system 8. The refresh management information includes the address of the user IQ area, the data size of the input refresh, and the data size of the output refresh.
[0052] 13 shows an example of the I / O refresh table 411. In this embodiment, as shown in FIG. 1, a pair of redundant I / O modules 3a and 3b are connected under the control of PLC 1. The station numbers of I / O module 3a and I / O module 3b are "1" and "2," respectively. Also, it is assumed that the default operation setting information sets I / O module 3a to an operating state and I / O module 3b to a standby state.
[0053] 13A shows an example of the I / O refresh table 411 in a case where the input refresh process is made redundant. In the refresh management information of each I / O module 3, the address of the user IQ area 121 is set to a value that is uniquely determined for the I / O module that is set to an operating state by the default operating setting information. In this example, since the I / O module 3a is set to an operating state by the default operating setting information, the address value "I_1,1" that is uniquely determined for the input data acquired by the I / O module 3a is set in common for the I / O modules 3a and 3b.
[0054] Also, assume that the size of the input data sent from the I / O module 3 to the PLC 1 in the input refresh process is "2." In this case, the refresh management information for the I / O module 3a in the active state sets the data size of the input refresh to "2." In contrast, the input data for the I / O module in the standby state is not taken in by the PLC 1, as will be described later, and therefore the refresh management information for the I / O module 3b sets the data size of the input refresh to "0."
[0055] 13B shows an example of the I / O refresh table 411 in the case where the output refresh process is made redundant. In the refresh management information of each I / O module 3, the address of the user IQ area 121 is set to a value that is uniquely determined for the I / O module that is set to an operating state by the default operating setting information. In this example, since the I / O module 3a is set to an operating state by the default operating setting information, the unique address value "Q_1,1" for the output data to be sent to the I / O module 3a is set in common for the I / O modules 3a and 3b.
[0056] Also, assume that the size of the output data sent from PLC 1 to I / O module 3 in the output refresh process is "2." As will be described later, PLC 1 sends output data to multiple redundant I / O modules 3. Therefore, "2" is set as the data size for output refresh in the refresh management information of both I / O modules 3a and 3b.
[0057] Returning to the explanation of Fig. 11, in S3, the PLC 1 creates a communication frame to be transmitted between the PLC 1 and the I / O module 3 based on the system configuration definition file 401 shown in Fig. 10. This communication frame is used to exchange data for the I / O refresh process. The format and an example of the communication frame will be described later.
[0058] In S4, the PLC 1 creates setting information for the I / O modules 3 by referring to the system configuration definition file 401 shown in Fig. 10. Then, the PLC 1 distributes the created setting information to each I / O module 3 via the communication cable 6.
[0059] 14 shows an example of the setting information of an I / O module 3. The setting information 421 of the I / O module 3 is created for each I / O module 3 used in the control system 8. Specifically, the setting information 421 is created for each individual piece of information registered in the system configuration definition file 401 shown in FIG. 10. In this case, the setting information 421 of each I / O module 3 is created by, for example, copying information of the corresponding item registered in the system configuration definition file 401.
[0060] In this specification, the I / O refresh process refers to a process of periodically exchanging data between the PLC 1 and each I / O module 3. Specifically, the PLC 1 executes the I / O refresh process using the input processing unit 111 and the output processing unit 113 shown in Fig. 3. Here, the PLC 1 realizes the I / O refresh process by repeatedly executing the input processing and the output processing at the control cycle described with reference to Fig. 4 after the initial processing shown in Fig. 11.
[0061] PLC1 exchanges input data / output data with I / O module 3 using communication frames in the control cycle shown in Figure 4. Input data is obtained by I / O module 3 from field devices 4 and transmitted from I / O module 3 to PLC1. Input data is sometimes called "input refresh data." Output data is generated by PLC1 to control field devices 4 and transmitted from PLC1 to I / O module 3. Output data is sometimes called "output refresh data." In input processing, PLC1 takes in input data from communication frames received from I / O module 3. In output processing, PLC1 transmits the results of program execution processing to I / O module 3 using communication frames.
[0062] 15 shows an example of the format of a communication frame transmitted between the PLC 1 and the I / O module 3. The communication frame 431 is composed of a frame header and input / output refresh data. The input / output refresh data is created for each I / O module 3.
[0063] The frame header stores information necessary for transmitting and receiving input / output refresh data. For example, the frame header includes a delimiter indicating the start position of the communication frame 431, information indicating the length of the communication frame 431, information indicating the number of input / output refresh data included in the communication frame 431, etc.
[0064] 16 shows an example of input / output refresh data stored in the communication frame 431. The input / output refresh data 441 is created for each I / O module 3, and includes station number information, input refresh data, output refresh data, and operation status information.
[0065] As described above, the station number information identifies each I / O module 3 in the control system 8. The input refresh data is numerical data representing an input signal from a field device 4, and is transmitted from the I / O module 3 to the PLC 1. The output refresh data is numerical data representing an output signal to the field device 4, and is transmitted from the PLC 1 to the I / O module 3.
[0066] The operating status information includes operating state information and operating / standby state information. The operating state information indicates whether the I / O module is operating normally. Specifically, the operating state information indicates whether the I / O module is in a state where it can process input data / output data. The operating / standby state information indicates whether the I / O module is in an operating state or a standby state.
[0067] The above-described communication frame 431 is transmitted between the PLC 1 and the I / O module 3. Here, the input / output refresh data 441 of each I / O module 3 stored in the communication frame 431 includes operating / standby state information. Therefore, when receiving input refresh data from each I / O module 3, the PLC 1 can recognize whether the I / O module is in an operating state or a standby state. In addition, the PLC 1 can transmit output refresh data to each I / O module 3.
[0068] <Example of refresh processing> 17 is a flowchart showing an example of refresh processing by the I / O module 3. The processing of this flowchart is executed repeatedly at a predetermined cycle, for example. Although not shown, the I / O module 3 includes a frame buffer having the same format as the input / output refresh data 441 shown in FIG. 16. This frame buffer is realized by the memory 32 shown in FIG. 6.
[0069] In S11, the I / O module 3 stores the input data in the frame buffer. The input data is obtained, for example, by converting an input signal from the field device 4 into numerical data.
[0070] In S12, the I / O module 3 stores the operating / standby state information in the frame buffer. At this time, the abnormality level detection unit 303 shown in FIG. 7 detects the abnormality level of the I / O module. The redundancy switching processing unit 304 compares the abnormality level of the I / O module detected by the abnormality level detection unit 303 with the abnormality levels of the other redundant I / O modules. If the abnormality level of the I / O module is higher than the abnormality levels of the other I / O modules, the redundancy switching processing unit 304 sets the operating state of the I / O module to standby. Otherwise, the redundancy switching processing unit 304 sets the operating state of the I / O module to operating. Note that the multiple redundant I / O modules (I / O modules 3a and 3b in FIG. 1) exchange redundancy control signals (abnormality level data) as shown in FIG. 6 to coordinate their operating states so that only one I / O module is in the operating state. Then, the I / O module 3 stores the operating / standby state information thus determined in the frame buffer.
[0071] In S13, the I / O module 3 waits for a communication frame to be transmitted from the PLC 1. The configuration of the communication frame is as shown in Figures 16 and 17. Then, when the communication frame is received, the processing of the I / O module 3 proceeds to S14.
[0072] In S14, the I / O module 3 identifies the input / output refresh data addressed to itself in the received communication frame, obtains the output data from the input / output refresh data, and stores it in the frame buffer. The input / output refresh data addressed to itself is identified by referring to the "station number information" shown in FIG.
[0073] In S15, the I / O module 3 updates the communication frame. Specifically, the I / O module 3 writes the input data and operation / standby information stored in the frame buffer into the communication frame. Then, the I / O module 3 transmits the updated communication frame to the PLC 1.
[0074] In S16, the I / O module 3 determines whether its own device is in an operating state or a standby state. If its own device is in an operating state, in S17 the I / O module 3 transmits the output data stored in the frame buffer in S14 to the field device 4. At this time, the I / O module 3 may convert the output data into a signal in a format that can be received by the field device 4. On the other hand, if its own device is in a standby state, the processing of S17 is skipped. In this way, the I / O module 3 transmits the output data received from the PLC 1 to the field device 4 only if its own device is in an operating state.
[0075] 18 schematically shows the operation of an I / O module 3 involved in refresh processing. Each I / O module 3 (I / O module 3a in FIG. 18) has a frame buffer 311. In the frame buffer 311, station number information identifies the I / O module 3a. Input data acquired from the field device 4 is stored as input refresh data. Operating / standby state information indicating the operating state or standby state is stored as operation status information.
[0076] Upon receiving the communication frame 431, the I / O module 3a identifies input / output refresh data whose station address information is the I / O module 3a. Then, the I / O module 3a writes (overwrites) the output refresh data in the identified input / output refresh data to the frame buffer 311. The I / O module 3a also writes (overwrites) the input data and operation status information stored in the frame buffer 311 to the corresponding areas of the communication frame 431. Thereafter, the I / O module 3a transmits the updated communication frame 431 to the PLC 1.
[0077] 17 and 18, both input refresh and output refresh are executed, but the control system 8 may be configured to execute only either the input refresh or the output refresh. When the control system 8 executes only the input refresh, S14 and S16 to S17 shown in FIG. 17 may be omitted. When the control system 8 executes only the output refresh, S11 to S12 and S15 shown in FIG. 17 may be omitted. When the I / O module 3 does not receive a communication frame within a predetermined time (S13: No), it may skip S14 to S15 and execute S16 to S17.
[0078] Fig. 19 is a flowchart showing an example of refresh processing by PLC 1. The processing of this flowchart is executed repeatedly, for example, at the control cycle shown in Fig. 4. Although not shown, PLC 1 includes a frame buffer having the same format as communication frame 431 shown in Fig. 15. This frame buffer is realized by memory 14 shown in Fig. 2.
[0079] In S21, the PLC 1 receives a communication frame 431 from the I / O module 3 via the communication cable 6. In S22, the PLC 1 copies the input / output refresh data stored in the received communication frame to the frame buffer. In S23, the PLC 1 executes processing according to the operating / standby state of the I / O module 3 that is the sender of the received communication frame.
[0080] 20 is a flowchart showing an example of processing for updating refresh management information in accordance with the operating state of the I / O module 3. The processing of this flowchart corresponds to S23 shown in Fig. 19. That is, the processing of this flowchart is executed when the PLC 1 receives a communication frame from any of the I / O modules 3.
[0081] In S31, the PLC 1 initializes a variable x to 1. The variable x identifies an I / O module 3 used in the control system 8. That is, the variable x identifies each piece of refresh management information registered in the I / O refresh table 411 shown in FIG. 12. Here, when the control system 8 includes n I / O modules 3 (or when n pieces of refresh management information are registered in the I / O refresh table 411), the variable x is a natural number and can take a value from 1 to n. In the following description, the I / O module 3 identified by the variable x may be referred to as "I / O module 3_x (I / O_x in FIG. 21 etc.)."
[0082] In S32, the PLC 1 determines whether the I / O module 3_x is redundant or not by referring to the system configuration definition file 401 shown in FIG.
[0083] When the I / O module 3_x is made redundant, the PLC 1 determines in steps S33 to S34 whether the I / O module 3_x is in an operating state or a standby state by referring to operation status information (particularly, operating / standby state information) in the input / output refresh data corresponding to the I / O module 3_x, which is stored in the received communication frame.
[0084] When the I / O module 3_x is in an operating state, the PLC 1 updates, in S35, the "input refresh data size" in the refresh management information corresponding to the I / O module 3_x in the I / O refresh table 411 shown in Fig. 12 or 13A with the size of the input refresh data of the I / O module 3_x stored in the received communication frame. For example, if the size of the input refresh data of the I / O module 3_x is 2 bytes, the "input refresh data size" in the refresh management information corresponding to the I / O module 3_x in the I / O refresh table 411 is updated to "2" as shown in Fig. 13A.
[0085] When the I / O module 3_x is in a standby state, in S36, the PLC 1 updates the "input refresh data size" in the refresh management information corresponding to the I / O module 3_x in the I / O refresh table 411 shown in FIG. 12 or FIG. 13A to "zero."
[0086] In S37, the PLC 1 increments the variable x. In S37, the PLC 1 determines whether the variable x has reached n. If the variable x has not reached n, the PLC 1 determines that an unprocessed I / O module 3 remains. In this case, the PLC 1 returns to S32. That is, the PLC 1 executes the processes of S32 to S36 for all I / O modules 3. Note that if the I / O module 3_x is not made redundant (S32: No), the processes of S33 to S36 are skipped.
[0087] Returning to the explanation of Fig. 19, in S24, the PLC 1 copies the input data stored in the frame buffer to the corresponding address location in the user IQ area 121. Note that the input data acquired from the communication frame in S22 has been written to the frame buffer.
[0088] 21 is a flowchart showing an example of processing for copying input data stored in the frame buffer of PLC 1 to the user IQ area 121. The processing of this flowchart corresponds to S24 shown in FIG.
[0089] In S41, the PLC 1 initializes a variable x to 1. The variable x identifies the I / O module 3 used in the control system 8, as described above.
[0090] In S42, the PLC 1 searches for the input refresh data of the I / O module 3_x in the frame buffer provided in the PLC 1. At this time, the PLC 1 searches for the input refresh data of the I / O module 3_x by using the station number of the PLC 1.
[0091] In S43, PLC1 refers to the I / O refresh table 411 of I / O module 3_x and identifies the "address of the user IQ area" and the "data size of the input refresh." Next, PLC1 acquires the input refresh data searched for in S42, for the size specified by the "data size of the input refresh." For example, if the "data size of the input refresh" is "2," PLC1 acquires two bytes of input refresh data from the frame buffer. Then, PLC1 copies the acquired input refresh data to the location specified by the "address of the user IQ area." Note that if the "data size of the input refresh" is "zero," PLC1 does not copy data from the frame buffer to the user IQ area 121.
[0092] In S44, the PLC 1 increments the variable x. In S45, the PLC 1 determines whether the variable x has reached n. If the variable x has not reached n, the PLC 1 determines that an unprocessed I / O module 3 remains. In this case, the processing of the PLC 1 returns to S42. That is, the PLC 1 executes the processing of S42 to S43 for all the I / O modules 3.
[0093] 22 and 23 schematically show the operation of the PLC 1 in the input refresh process, which corresponds to the processes of S21 to S24 in the flowchart shown in FIG.
[0094] In this embodiment, the control system 8 shown in FIG. 1 is provided with a pair of I / O modules 3a and 3b that are redundant with respect to the PLC 1. The PLC 1 includes a frame buffer 122 that temporarily stores data stored in a communication frame 431. The contents of the I / O refresh table 411 included in the PLC 1 are as shown in FIG. 13A. The station address information "1" represents the I / O module 3a, and the station address information "2" represents the I / O module 3b. The PLC 1 receives the communication frame 431 from the I / O modules 3a and 3b. The input data 3a and the input data 3b represent the input refresh data transmitted from the I / O module 3a and the input refresh data transmitted from the I / O module 3b, respectively. The data sizes of the input data 3a and the input data 3b are each "2." The communication frame 431 also includes operation status information that represents whether the I / O modules 3a and 3b are in an operating state or a standby state. Note that the output refresh data is omitted from FIGS. 22 and 23.
[0095] In the case shown in FIG. 22, the I / O module 3a is set to an operating state, and the I / O module 3b is set to a standby state. FIG. 22A shows a case where "x=1" in FIGS. 20 and 21, and input refresh processing is performed on the I / O module 3a. In FIG. 22A, only the operating status information and input data 3a related to the I / O module 3a are depicted, but the operating status information and input data 3b related to the I / O module 3b may also be stored in the communication frame 431. Similarly, FIG. 22B shows a case where "x=2" in FIGS. 20 and 21, and input refresh processing is performed on the I / O module 3b. In FIG. 22B, only the operating status information and input data 3b related to the I / O module 3b are depicted, but the operating status information and input data 3a related to the I / O module 3a may also be stored in the communication frame 431. When the PLC 1 receives the communication frame 431 , the input data stored in the communication frame 431 is written to the frame buffer 122 .
[0096] 22A, since the I / O module 3a is in an operating state, the data size of the input data 3a is written to the refresh management information of the I / O module 3a in S35 shown in FIG. 20. Then, the input data 3a written to the frame buffer 122 is written to the user IQ area 121 based on the refresh management information of the I / O module 3a. Specifically, two bytes of the input data 3a are read from the frame buffer 122 and written to the address location "I1,1" in the user IQ area 121.
[0097] 22B, since I / O module 3b is in standby mode, "zero" is written as the data size in the refresh management information of I / O module 3b in S36 shown in FIG. 20. Therefore, PLC 1 does not copy data from frame buffer 122 to user IQ area 121. That is, input data 3a transmitted from I / O module 3a remains in user IQ area 121. In this way, when I / O module 3a is in operation and I / O module 3b is in standby mode, input data 3a acquired by I / O module 3a is written to a predetermined address location in user IQ area 121.
[0098] In the case shown in Fig. 23, I / O module 3a is switched from an active state to a standby state, and I / O module 3b is switched from a standby state to an active state. In Fig. 23A, "x=1" in Figs. 20 and 21, and input refresh processing is performed on I / O module 3a. In Fig. 23B, "x=2" in Figs. 20 and 21, and input refresh processing is performed on I / O module 3b.
[0099] 23A, since the I / O module 3a is in a standby state, "zero" is written as the data size in the refresh management information of the I / O module 3a in S36 shown in Fig. 20. Therefore, the PLC 1 does not copy data from the frame buffer 122 to the user IQ area 121.
[0100] 23B, since the I / O module 3b is in an operating state, in S35 shown in FIG. 20, the data size of the input data 3b is written to the refresh management information of the I / O module 3b. Then, the input data 3b written to the frame buffer 122 is written to the user IQ area 121 based on the refresh management information of the I / O module 3b. Specifically, 2 bytes of input data 3b are read from the frame buffer 122 and written to the address location "I1,1" in the user IQ area 121. In this way, when the I / O module 3a is in a standby state and the I / O module 3b is in an operating state, the input data 3b acquired by the I / O module 3b is written to a predetermined address location in the user IQ area 121. That is, whether the I / O module 3a is in an operating state or the I / O module 3b is in an operating state, the input data acquired from the field device 4 is written to the same address location in the user IQ area 121.
[0101] Furthermore, when the I / O module 3a is set to a standby state and the I / O module 3b is set to an active state, the input data 3b acquired by the I / O module 3b is written to a predetermined address location in the user IQ area 121. At this time, the address location in the user IQ area 121 to which the input data sent from the I / O modules 3 (3a, 3b) is written is specified by the "user IQ area address" shown in FIG. 12 or 13. This "user IQ area address" is uniquely set for each I / O module 3 (3a, 3b) constituting the redundant pair based on the default operational setting information in the system configuration definition file 401 shown in FIG. 10. In other words, the "user IQ area address" does not depend on which of the I / O modules 3a, 3b constituting the redundant pair is in an active state. Therefore, when the PLC 1 reads and uses input data from the user IQ area 121, it does not need to be aware of the active / standby state of each I / O module 3. That is, in a user program that uses input data acquired by the PLC 1 from the field device 4, it is not necessary to take into account the operating / standby state of each I / O module 3.
[0102] Returning to the explanation of Fig. 19, in S25, the PLC 1 copies the output refresh data stored in the frame buffer 122 to the communication frame. This process is executed for each I / O module 3.
[0103] 24 is a flowchart showing an example of a process for copying output data stored in the frame buffer of PLC 1 to a communication frame. The process of this flowchart corresponds to S25 shown in FIG.
[0104] In S51, the PLC 1 initializes a variable x to 1. The variable x identifies the I / O module 3 used in the control system 8, as described above.
[0105] 12 and 13, the PLC 1 searches for the output refresh data of the I / O module 3_x in the frame buffer 122. At this time, the PLC 1 acquires the "address of the user IQ area" and the "data size of the output refresh" from the refresh management information whose station number information is x.
[0106] In S53, the PLC 1 acquires the output refresh data of the I / O module 3_x from the frame buffer 122 in accordance with the refresh management information of the I / O module 3_x and stores it in the communication frame. At this time, the PLC 1 acquires the output refresh data of the I / O module 3_x from the address location specified by the "address of the user IQ area" by the amount specified by the "data size of the output refresh" and stores it in the communication frame.
[0107] In S54, the PLC 1 increments the variable x. In S55, the PLC 1 determines whether the variable x has reached n. If the variable x has not reached n, the PLC 1 determines that an unprocessed I / O module 3 remains. In this case, the processing of the PLC 1 returns to S52. That is, the PLC 1 executes the processing of S52 to S53 for all the I / O modules 3.
[0108] Returning to the explanation of Fig. 19, in S26, the PLC 1 transmits a communication frame to each I / O module 3. In S25, this communication frame stores output refresh data addressed to each I / O module 3. Then, the I / O module 3 waits for this communication frame in S13 shown in Fig. 17. Therefore, the I / O module 3 can obtain the output refresh data from this communication frame.
[0109] In the I / O refresh table 411 referenced by PLC 1, the addresses of the user IQ area 121 assigned to the multiple redundant I / O modules 3 are the same. For example, in the example shown in Fig. 13B, the addresses of the user IQ area 121 storing the output data to be sent to I / O modules 3a and 3b are both "Q1,1." Therefore, the same output data is sent from PLC 1 to the multiple redundant I / O modules 3. [Explanation of symbols]
[0110] 1 Programmable Logic Controller (PLC) 2 PC 3 (3a, 3b) I / O modules 4 Field devices 8. Control System 34 FPGA (microcontroller) 36 Redundant communication unit 111 Input processing section 112 Program execution processing section 113 Output Processing Unit 114 System Processing Unit 121 User IQ Area 122 Frame Buffer (PLC) 210 Support Tools 301 Input processing section 302 Output Processing Unit 303 Abnormality Level Detection Unit 304 Redundancy switching processing unit 305 System Processing Unit 311 Frame Buffer (I / O Module) 401 System configuration definition file 411 I / O refresh table 421 I / O module setting information 431 Communication Frame 441 Input / Output Refresh Data
Claims
1. a programmable logic controller for controlling a control target; a plurality of I / O modules provided redundantly between the programmable logic controller and the control target; Each of the plurality of I / O modules a transmitter that transmits input data acquired from the control target and status information indicating whether the I / O module is in operation to the programmable logic controller; a receiving unit that receives output data for controlling the controlled object from the programmable logic controller, The programmable logic controller a storage unit including a first memory area for storing the input data and a second memory area for storing the output data; a control unit that executes an input process of writing the input data transmitted from an I / O module among the plurality of I / O modules, the status information of which indicates that the I / O module is in operation, into the first memory area, and an output process of reading the output data from the second memory area and transmitting the output data to the plurality of I / O modules. A control system comprising:
2. When a first I / O module of the plurality of I / O modules is in an operating state, the input data transmitted from the first I / O module is written to the first memory area, and when a second I / O module of the plurality of I / O modules is in an operating state, the input data transmitted from the second I / O module is written to the first memory area.
2. The control system of claim 1.
3. Among the plurality of I / O modules, an I / O module whose status information indicates that it is in operation outputs the output data received from the programmable logic controller to the control target.
2. The control system of claim 1.
4. A control system including a programmable logic controller that controls a control target, and a plurality of I / O modules that are redundantly arranged between the programmable logic controller and the control target, Each of the plurality of I / O modules Transmitting input data acquired from the controlled object and status information indicating whether the I / O module is in operation to the programmable logic controller; receiving output data for controlling the controlled object from the programmable logic controller; The programmable logic controller writing the input data transmitted from an I / O module, the status information of which indicates that the I / O module is in operation, into a first memory area; The output data is read from the second memory area and transmitted to the plurality of I / O modules. A control method comprising:
5. 1. A programmable logic controller for use in a control system having a plurality of redundant I / O modules, a receiving unit that receives, from each of the plurality of I / O modules, input data acquired from a control target and status information indicating whether the I / O module is in operation; a storage unit including a first memory area for storing the input data and a second memory area for storing output data for controlling the control target; a control unit that executes an input process of writing the input data transmitted from an I / O module among the plurality of I / O modules, the status information of which indicates that the I / O module is in operation, into the first memory area, and an output process of reading the output data from the second memory area and transmitting the output data to the plurality of I / O modules; A programmable logic controller comprising:
6. In a control system including a programmable logic controller that controls a control target, and a plurality of I / O modules that are provided redundantly between the programmable logic controller and the control target, an I / O module that operates as one of the plurality of I / O modules, a transmitter that transmits input data acquired from the control target and status information indicating whether the I / O module is in operation to the programmable logic controller; a receiving unit that receives output data for controlling the controlled object from the programmable logic controller, The programmable logic controller executes an input process of writing the input data transmitted from an I / O module of the plurality of I / O modules, the status information of which indicates that the I / O module is in operation, into a first memory area, and an output process of reading the output data from a second memory area and transmitting the output data to the plurality of I / O modules.
1. An I / O module comprising:
Citation Information
Patent Citations
Process input-output device and method for controlling it
JP2000207373A
Standby redundancy duplex controller and device for developing application program
JP2002140206A
Dual information processing system
JP2006209624A
Control system, control program, and control method
JP2018097663A
IO module duplication control device and method
JP2020123309A