Control system and control method

文档序号:1510720 发布日期:2020-02-07 浏览:34次 中文

阅读说明:本技术 控制系统以及控制方法 (Control system and control method ) 是由 泽田成宪 于 2018-07-03 设计创作,主要内容包括:控制系统(1)包括控制器(11)、作为折返通信装置的控制器(12)、第一通信路径及第二通信路径。控制器(11)生成对从机装置(21、22、23)的控制用帧并予以发送。控制器(12)进行控制用帧的折返通信。第一通信路径是在控制器(11)与控制器(12)之间使用通信线缆(31、32、33、34)来连接多个从机装置(21、22、23)。第二通信路径是经由通信线缆(35)来连接控制器(11)与控制器(12)。(A control system (1) includes a controller (11), a controller (12) as a return communication device, a first communication path, and a second communication path. The controller (11) generates and transmits a control frame to the slave devices (21, 22, 23). A controller (12) performs return communication of a control frame. The first communication path is a path for connecting the plurality of slave devices (21, 22, 23) between the controller (11) and the controller (12) by using communication cables (31, 32, 33, 34). The second communication path connects the controller (11) and the controller (12) via a communication cable (35).)

1. A control system, comprising:

a controller for generating and transmitting a control frame to the slave device;

a foldback communication device for carrying out foldback communication of the control frame;

a first communication path connecting the slave device using a first communication cable between the controller and the foldback communication device; and

a second communication path connecting the controller and the foldback communication device via a second communication cable.

2. The control system of claim 1, wherein

The controller includes a first transmission/reception unit that transmits/receives the control frame to/from the first communication path and the second communication path,

the first transceiver analyzes the control frame received from the first communication path, and transmits the control frame to the second communication path if the control frame does not pass through all slave devices connected to the first communication path.

3. The control system of claim 2, wherein

The foldback communication device includes a second transmission/reception unit that transmits/receives the control frame to/from the first communication path and the second communication path,

the second transmission/reception unit duplicates a control frame that has passed through all the slave devices.

4. A control method executed by a control system that performs transmission and reception of a frame for control through a first communication path that connects a slave device between a controller and a foldback communication device using a first communication cable, and a second communication path that connects the controller and the foldback communication device via the second communication cable, wherein,

the controller analyzes the control frame received from the first communication path, and transmits the control frame to the second communication path if the control frame does not pass through all slave devices connected to the first communication path.

5. The control method according to claim 4, wherein

The foldback communication device duplicates a control frame that has passed through all the slave devices.

Technical Field

The invention relates to a control system comprising a controller and a slave device.

Background

Currently, Factory Automation (FA) systems have been widely put to practical use. The FA system includes a controller and a plurality of slave devices. The plurality of slave devices are measuring instruments, switches (switches), drivers for control (drivers), and the like, and the devices to be controlled are connected to the drivers for control. The controller transmits control data to the plurality of slave devices. Then, the controller receives measurement data and the like from the plurality of slave devices, and generates control data in the next control cycle (cycle).

The controller and the plurality of slave devices are connected by a communication cable (cable) or the like, and communicate the above-mentioned data in accordance with the network specification of Ethernet (registered trademark) or Ethernet control automation technology (EtherCAT) (registered trademark), for example, as shown in patent document 1.

Disclosure of Invention

Problems to be solved by the invention

However, in the conventional configuration, when the communication cable is broken, or when the communication cable is detached from the controller or the port of the slave device, the control of the slave device is stopped.

This makes it impossible to cause each device of the FA system to perform a desired operation, and, for example, causes defective products of products manufactured by the FA system. In addition, when all the devices whose operations are controlled by the controller are stopped along with the stop of the controller, productivity is lowered.

Therefore, an object of the present invention is to provide a control technique capable of suppressing a stop of control of a slave device even if a communication failure occurs in a communication cable.

Means for solving the problems

The control system includes a controller, a foldback communication device, a first communication path, and a second communication path. The controller generates and transmits a control frame to the slave device. The return communication device performs return communication of a control frame. The first communication path is a path for connecting the slave device between the controller and the foldback communication device using a first communication cable. The second communication path connects the controller and the foldback communication device via a second communication cable.

In the above configuration, even if a disconnection or the like occurs in the middle of the first communication path, the control frame can be communicated via the second communication path.

In the control system, the controller includes a first transmission/reception unit that transmits/receives the control frame through a first communication path and a second communication path. The first transceiver analyzes the control frame received from the first communication path, and transmits the control frame to the second communication path if the control frame does not pass through all slave devices connected to the first communication path.

In the above configuration, the control frame is transmitted to the slave device before the disconnection portion of the first communication path via the second communication path and the return communication device. The controller can acquire the control frame updated in all the slave devices.

In the control system, the foldback communication device includes a second transmission/reception unit that transmits/receives a control frame to/from the first communication path and the second communication path. The second transceiver unit duplicates the control frame that has passed through all the slave devices.

In the above configuration, even if the first communication path has a disconnection portion, the control frame that has passed through all the slave devices can be stored or transferred to the outside by the folding back communication device.

ADVANTAGEOUS EFFECTS OF INVENTION

According to the present invention, even if a communication failure occurs in the communication cable, it is possible to suppress a stop of control of the slave device.

Drawings

Fig. 1 is a diagram showing a device configuration in a control system.

Fig. 2 is a block diagram showing a hardware configuration in the controller.

Fig. 3 is a block diagram showing a configuration related to data communication in the controller.

Fig. 4 is a diagram showing a schematic data structure of control data.

Fig. 5 is a diagram showing an outline of data communication for storing a control frame.

Fig. 6 is a diagram showing a data transmission state of the controller in the run mode (run mode).

Fig. 7 is a flowchart showing a schematic process executed by the controller in the operation mode.

Fig. 8 is a diagram showing a data transmission state of the controller in the data acquisition mode.

Fig. 9 is a flowchart showing a schematic process executed by the controller in the data acquisition mode.

Fig. 10 is a flowchart showing a process of transmitting a diagnostic frame by the controller in the operation mode.

Fig. 11 is a flowchart showing a process of receiving and forwarding a diagnostic frame by the controller in the data acquisition mode.

Fig. 12 is a diagram showing a device configuration in the control system.

Fig. 13 is a diagram showing a data transmission state of the controller in the operation mode.

Fig. 14 is a diagram showing a data transmission state of the controller in the data acquisition mode.

Fig. 15 is a diagram showing an example of an outline of redundancy of the controller.

Fig. 16 is a diagram showing a data transmission state of the controller when switching from the data acquisition mode to the operation mode.

Fig. 17 shows a first mode in which switching is determined only by a response of a beacon (beacon).

Fig. 18 shows a second mode in which switching is determined only by a response of a beacon.

Fig. 19 shows a mode of determining switching based on the observation result of the control frame and the response of the beacon.

Fig. 20 is a diagram showing a data transmission state of the controller after switching to the operation mode.

Fig. 21 is a diagram showing a data transmission state in mode switching between two controllers connected to a control network.

Fig. 22 is a flowchart showing a schematic process of mode switching executed by the two controllers.

Fig. 23 is a diagram showing an example of a case where redundancy of cables can be handled.

Fig. 24 is a flowchart of the processing of the controller in the operation mode corresponding to redundancy of the cable.

Fig. 25 is a flowchart of the processing of the controller in the data acquisition mode corresponding to redundancy of the cable.

Fig. 26 is a diagram showing a configuration of a device in the control system when abnormality detection is performed by the controller in the data acquisition mode.

Fig. 27 is a block diagram showing a configuration related to data communication in the controller of the data acquisition mode.

Detailed Description

The control system and the control method according to the embodiment of the present invention will be described with reference to the drawings. In the present embodiment, an FA (factory automation) system, specifically, an FA system conforming to a control network having EtherCAT (ethernet control automation technology) (registered trademark) as a network standard will be described as an example of a control system. However, the configuration of the present invention can be applied to other control systems that perform communication in the same network standard as the EatherCAT.

(construction of control System)

Fig. 1 is a diagram showing a device configuration in a control system. As shown in fig. 1, the control system 1 includes a controller 11, a controller 12, a plurality of slave devices 21, 22, and 23, a plurality of communication cables 31, 32, 33, 34, and 35, a database device 40, a user interface (UI device) 50, and an information communication network 60. The controller 12 corresponds to the "foldback communication apparatus" of the present invention. The communication cables 31, 32, 33, 34 correspond to "first communication cables" of the present invention, and the communication cable 35 corresponds to "second communication cables" of the present invention.

The database device 40 stores a control frame or a diagnosis frame described below. The database device 40 executes processing relating to the detection of an abnormality in the control network, using the control frame or the diagnosis frame acquired and stored in the control system 1. For example, the processing related to the abnormality detection executed by the database device 40 may include at least one of abnormality diagnosis, abnormality notification, abnormality precursor estimation, data trace (data trace), and load monitoring of the control network, and may be realized by a known method.

The UI device 50 transfers the user program to the controller 11 and the controller 12. In addition, the UI device 50 may create a user program. The UI device 50 sets control values and processing for the controller 11 and the controller 12.

The controller 11 is connected to the slave device 21 via a communication cable 31. The slave device 21 is connected to the slave device 22 via a communication cable 32. The slave device 22 is connected to the slave device 23 via a communication cable 33. The slave device 23 is connected to the controller 12 via a communication cable 34.

That is, the controller 11, the slave device 21, the slave device 22, the slave device 23, and the controller 12 are connected in series in a line (line). In other words, the controller 11 is a first terminal, the controller 12 is a second terminal, and the plurality of slave devices 21, 22, and 23 are connected in order from the first terminal to the second terminal. Further, the controller 12 is connected to the controller 11 via a communication cable 35. The field bus (field bus) of the control network is configured by the connection mode of these communication cables. In the control network, data is communicated in accordance with the network specification of EtherCAT (registered trademark) using Ethernet (registered trademark). The specific communication contents will be described later.

The controller 11, the controller 12, the database device 40, and the UI device 50 are connected via the information communication network 60. The information communication network 60 performs communication in accordance with a general network standard such as Ethernet, and realizes data links (data links) among the controller 11, the controller 12, the database device 40, and the UI device 50. The control system 1 of the present invention may have at least a part of a control network.

(Structure of controller)

The controller 11 and the controller 12 have the same configuration. Fig. 2 is a block diagram showing a hardware configuration in the controller. In fig. 2, the controller 10 will be described since the controller 11 and the controller 12 have the same configuration.

As shown in fig. 2, the controller 10 includes a CPU101, a transceiver 102, an upper communication unit 103, a shared memory 104, a program memory 105, and a system bus (system bus) 110. The transmission/reception unit 102, the upper communication unit 103, the shared memory 104, and the program memory 105 are connected by a system bus 110.

The transmission/reception unit 102 is realized by an Application Specific Integrated Circuit (ASIC) or the like, and is realized by an Application Specific IC independent of the CPU 101. The transmitting/receiving unit 102 may be implemented by a Field Programmable Gate Array (FPGA) or the like. The transmission/reception unit 102 is connected to the control network and executes transmission/reception of control frames.

The upper communication unit 103 is realized by a general-purpose communication IC. The upper communication unit 103 is connected to the information communication network 60, and performs transmission and reception via the information communication network 60.

The shared memory 104 stores various Data for control from the information communication network 60, hypertext Preprocessor Data Object (PDO) Data constituting a control frame, and the like. The PDO data includes a data group including output data for the plurality of slave devices 21, 22, and 23 and input data from the plurality of slave devices 21, 22, and 23.

The program memory 105 stores a system program in which basic control of the controller 10 is described, and a user program for control written from the UI device 50. The user program may be different between a controller of an operation mode and a controller of a data acquisition mode, which will be described later, or may be one that can selectively realize both of the operation mode and the data acquisition mode.

Fig. 3 is a block diagram showing a configuration related to data communication in the controller. Fig. 4 is a diagram showing a schematic data structure of control data.

As shown in fig. 3, the CPU101 implements a Programmable Logic Controller (PLC) control, an EtherCAT stack, an ethernet driver, and an ethernet driver for upper communication.

The EtherCAT stack, the ethernet driver, and the ethernet driver for upper communication are realized by the CPU101 reading out and executing a system program from the program memory 105. The PLC control is realized by the CPU101 reading and executing a user program for control from the program memory 105.

The PLC control is to generate PDO data using data stored in the shared memory 104. That is, the PLC control generates PDO data using input data such as measurement values from the slave devices 21, 22, and 23, calculation results based on the input data, a user program, control information from the UI device 50, and the like. As shown in fig. 4, the PDO data includes a data area DG21 for the slave device 21, a data area DG22 for the slave device 22, and a data area DG23 for the slave device 23, the data area DG21 for the slave device 21 is a write area for output data of the slave device 21 and input data from the slave device 21, the data area DG22 for the slave device 22 is a write area for output data of the slave device 22 and input data from the slave device 22, and the data area DG23 for the slave device 23 is a write area for output data of the slave device 23 and input data from the slave device 23. In the slave devices 21, 22, and 23, if the slave device is a device such as a sensor that does not require input data and whose output data is necessary for control, the data area for the slave device is only a write area of the output data from the slave device. On the other hand, in the slave devices 21, 22, and 23, if the slave device is a device such as a switch in which input data is required for control and output data is not required for control, the data area for the slave device is only a write area of the input data for the slave device.

The PLC controls and executes scheduling (scheduling) of transmission of control data. The PLC control handed the PDO data to the EtherCAT stack. The PLC control extracts input data related to the slave devices 21, 22, and 23 from the PDO data from the EtherCAT stack, and stores the input data in the shared memory 104.

The EtherCAT stack attaches an EtherCAT header (header) to the PDO data (ECH in fig. 4) and gives it to the ethernet driver. In contrast, the EtherCAT stack extracts PDO data from the frame data from the ethernet driver (ECH + PDO in fig. 4) and passes it to the PLC control.

The ethernet driver adds an ethernet header (EH in fig. 4) and CRC data (CRC in fig. 4) to frame data (ECH + PDO in fig. 4) from the EtherCAT stack, and outputs the frame data as a control frame to the transmitter 121 of the transmitter/receiver 102. On the other hand, the ethernet driver extracts frame data (ECH + PDO in fig. 4) corresponding to EtherCAT from the control frame (data shown in fig. 4) from the receiving unit 122 of the transmitting/receiving unit 102, and gives the frame data to the EtherCAT stack.

The CPU101 executes transmission and reception to and from the information communication network 60 via the upper communication unit 103 by the upper communication ethernet driver. Thus, the CPU101 receives a system program, a user program, and various data from the UI device 50 via the information communication network 60, and stores the system program, the user program, and the various data in the program memory 105 or the shared memory 104. The communication with the information communication network 60 follows general-purpose ethernet or the like, and the description thereof is omitted.

(configuration of Transceiver portion 102)

The transmission/reception unit 102 includes a transmission unit 121, a reception unit 122, and an IF (interface) 123. The transmitter 121 and the receiver 122 are each implemented by an independent IC. The IF123 implements a physical connection to a communication cable, having at least two ports (ports).

The transmission unit 121 transmits the control frame from the CPU101 to the control network via the IF 123. At this time, the transmission unit 121 transmits the control frame with a time stamp (time stamp). The transmitter 121 can also transmit the duplicated control frame from the receiver 122 to the control network via the IF 123. Further, the transmission unit 121 can generate a diagnostic frame, which will be described later, and transmit the diagnostic frame to the control network via the IF123 at a predetermined timing.

The receiving unit 122 gives the control frame received from the control network via the IF123 to the CPU 101. The receiving unit 122 can also copy the control frame. The receiving unit 122 may also transfer the copied control frame to the transmitting unit 121 or the upper communication unit 13. At this time, the receiving unit 122 directly transfers the copied control frame to the transmitting unit 121 or the upper communication unit 13 without passing through the CPU 101.

(Exception detection)

Fig. 5 is a diagram showing an outline of data communication for storing a control frame. In fig. 5, thick arrows indicate the flow of control frames.

In the collection processing of the control frame for abnormality detection, the controller 11 is set to the operation mode, and the controller 12 is set to the data acquisition mode. The controller 11 corresponds to a "first controller" of the present invention, and the controller 12 corresponds to a "second controller" of the present invention.

The controller 11 in the operation mode performs scheduling management of transmission and reception of a control frame, calculation using input data from the slave devices 21, 22, and 23, generation of output data based on the calculation result, and generation of a control frame. That is, the controller 11 in the operation mode executes control data communication with the plurality of slave devices 21, 22, and 23 at high speed by loop communication using the control network.

The controller 12 in the data acquisition mode receives the control frame and transfers the control frame to the database device 40 of the information communication network 60 without performing management of control data communication with respect to the plurality of slave devices 21, 22, and 23 as in the controller 11.

Once the control frame shown in fig. 4 is generated, the controller 11 transmits the control frame to the control network. That is, the controller 11 transmits the control frame via the communication cable 31.

The slave device 21 receives a control frame via the communication cable 31. The slave device 21 acquires the output data for the slave device 21 described in the control frame, and writes the input data acquired by the slave device 21 in the control frame. The slave device 21 controls a device to be controlled connected to the slave device 21 based on the output data. Then, the slave device 21 acquires the measured value from the control target device as input data for the next control cycle.

The slave device 21 gives a time stamp to the control frame. The slave device 21 transmits a control frame via the communication cable 32.

The slave device 22 receives the control frame via the communication cable 32. The slave device 22 acquires the output data for the slave device 22 described in the control frame, and writes the input data acquired by the slave device 22 into the control frame. The slave device 22 controls a device to be controlled connected to the slave device 22 based on the output data. Then, the slave device 22 acquires the measured value from the control target device as input data for the next control cycle.

The slave device 22 gives a time stamp to the control frame. The slave device 22 transmits a control frame via the communication cable 33.

The slave device 23 receives the control frame via the communication cable 33. The slave device 23 acquires the output data for the slave device 23 described in the control frame, and writes the input data acquired by the slave device 23 into the control frame. The slave device 23 controls a device to be controlled connected to the slave device 23 based on the output data. Then, the slave device 23 acquires the measured value from the control target device as input data for the next control cycle.

The slave device 23 gives a time stamp to the control frame. The slave device 23 transmits a control frame via the communication cable 34.

The controller 12 receives a control frame via the communication cable 34. The controller 12 copies the control frame and transmits it via the communication cable 35. At this time, the controller 12 gives a time stamp to the control frame. The control frame is received by the controller 11 via the communication cable 35. The controller 12 then transmits the copied control frame to the database device 40 connected via the information communication network 60.

(concrete processing of controller 11 in operation mode)

The controller 11 set to the operation mode specifically executes the following processing. The setting of the operation mode is performed by, for example, a control command from the UI device 50. Fig. 6 is a diagram showing a data transmission state of the controller in the operation mode. The transmission/reception section 102 of the controller 11 in the operation mode corresponds to the "first transmission/reception section" of the present invention.

As described above, the CPU101 of the controller 11 generates a control frame by the PLC control, the EtherCAT stack, and the ethernet driver using the data group stored in the shared memory 104. The process of generating the control frame is executed in accordance with a control cycle determined by PLC control. The CPU101 outputs the control frame to the transmitter 121 of the transmitter/receiver 102.

The transmission unit 121 transmits a control frame to the communication cable 31 via the IF123 according to the control cycle.

On the other hand, in the controller 11, the receiving unit 122 of the transmitting/receiving unit 102 receives a control frame returned from the control network via the communication cable 35 and the IF 123. The reception unit 122 outputs the control frame to the CPU 101.

As described above, the CPU101 extracts PDO data from the control frame by the ethernet driver, EtherCAT stack, and PLC control. The CPU101 stores the PDO data in the shared memory 104. The CPU101 may extract input data from the plurality of slave devices 21, 22, and 23 from the PDO data and store only the input data in the shared memory 104.

The controller 11 repeatedly executes generation and transmission of the control frame and storage of PDO data returned from the control network in accordance with the control cycle.

That is, the controller 11 executes the processing shown in fig. 7. Fig. 7 is a flowchart showing a schematic process executed by the controller in the operation mode. The processing shown in fig. 7 is executed by the CPU101 and the transmission/reception unit 102, but may be executed by only the CPU 101.

As shown in fig. 7, the controller 11 reads out a data group necessary for the current control frame, which includes the PDO data of the previous time, from the shared memory 104 (S101). The controller 11 generates PDO data of this time using these data groups (S102). The controller 11 generates a control frame using the PDO data (S103). The controller 11 sets the transmission timing according to the control cycle (S104). The controller 11 transmits a control frame in synchronization with the transmission timing (S105). The controller 11 receives a control frame returned from the control network (S106). The controller 11 extracts PDO data from the returned control frame (S107). The controller 11 writes the PDO data to the shared memory 104 (S108). Once the controller 11 ends these processes, it returns to step S101 to repeat the processes.

(concrete processing of the controller 12 in the data acquisition mode)

The controller 12 set to the data acquisition mode specifically executes the following processing. The setting of the data acquisition mode is performed, for example, in accordance with a control command or the like from the UI device 50. Fig. 8 is a diagram showing a data transmission state of the controller in the data acquisition mode. The transmission/reception section 102' of the controller 12 in the data acquisition mode corresponds to the "second transmission/reception section" of the present invention.

In the controller 12, the receiving unit 122' of the transmitting/receiving unit 102' receives the control frame transmitted from the control network, that is, having passed through all the slave devices 21, 22, and 23, via the communication cable 34 and the IF123 '. The receiving unit 122' copies the control frame. The receiving unit 122' outputs the control frame to the CPU101' and also to the transmitting unit 121 '. The PDO data input to the CPU101' is stored in the shared memory 104 in the same manner as the CPU 101.

The transmitter 121 'outputs a control frame to the communication cable 35 via the IF 123'. That is, the receiving unit 122 'and the transmitting unit 121' perform the return of the control frame in the control network.

Then, the receiving unit 122 'transfers the control frame to the upper communication unit 103'. The forwarding is, for example, a Direct Memory Access (DMA) forwarding method. The upper communication unit 103 'transfers the control frame to the database device 40 of the information communication network 60 via the IF 130'. At this time, the controller 12 gives a time stamp to the control frame.

The controller 12 performs the return of the control frame and the transfer to the information communication network 60 each time the control frame is received.

That is, the controller 12 executes the processing shown in fig. 9. Fig. 9 is a flowchart showing a schematic process executed by the controller in the data acquisition mode. The processing shown in fig. 9 is executed by the CPU101' and the transmission/reception unit 102', but may be executed by only the CPU101 '.

As shown in fig. 9, the controller 12 receives a control frame transmitted from the control network (S201). The controller 12 copies the control frame (S202). The controller 12 returns the control frame to the control network (S203). The controller 12 transfers the control frame to the database device 40 of the information communication network 60 (S211). The controller 12 extracts PDO data from the control frame (S221) and stores the PDO data in the shared memory 104' (S222). Note that, if redundancy of the controller described later is not required, the controller 12 may not extract and store the PDO data.

As described above, in the control system 1, the controller 11 in the operation mode does not store the control frame for abnormality detection and transfers the control frame to the information communication network 60. That is, the operation mode controller 11 exclusively executes the loop control for the plurality of slave devices 21, 22, and 23.

On the other hand, the controller 12 in the data acquisition mode does not manage transmission and reception of the control frame. That is, the controller 12 in the data acquisition mode exclusively stores the control frame for abnormality detection and transfers the control frame to the information communication network 60.

With the above configuration, the control system 1 can reliably perform communication of the control frame between the controller and the plurality of slave devices regardless of the amount of data communicated via the control network, and can suppress a decrease in the amount of control frames for abnormality detection.

In the control system 1, the controller 12 in the data acquisition mode is a target connected to the plurality of slave devices 21, 22, and 23 starting from the controller 11 in the operation mode. Therefore, the controller 12 can receive a control frame including PDO data updated by all the slave devices 21, 22, and 23 in the current control cycle. This enables the controller 12 to efficiently acquire the control frame updated to the latest state.

Further, in the control system 1, since the controller includes the CPU and the transmission/reception unit, it is possible to suppress a delay in returning the control frame, and to suppress an increase in the control cycle due to the connection of the controller in the data acquisition mode. Further, the CPU is not used when the control frame is transferred to the database device 40 of the information communication network 60, and the load on the CPU is reduced.

(Transmission and storage of diagnostic frame)

In addition, although the configuration and the processing described above show a mode in which a control frame that periodically communicates according to a control cycle is stored and transferred, it is also possible to generate a diagnostic frame and store and transfer the diagnostic frame.

Fig. 10 is a flowchart showing a process of transmitting a diagnostic frame by the controller in the operation mode. As shown in fig. 10, the controller 11 generates a frame for diagnosis (S121). The controller 11 detects whether or not the transmission timing of the frame for diagnosis is set. The transmission timing of the diagnostic frame is set in advance at a predetermined time interval or determined in response to a transmission request of the diagnostic frame from the UI device 50. If the transmission timing of the diagnostic frame is YES (S122) and the control frame is in the process of being transmitted (NO (S123)), the controller 11 transmits the diagnostic frame to the control network (S124).

Fig. 11 is a flowchart showing a process of receiving and forwarding a diagnostic frame by the controller in the data acquisition mode. As shown in fig. 11, the controller 12 receives the frame for diagnosis (S231). The controller 12 transfers the frame for diagnosis to the database device 40 of the network for information communication 60 (S232). In this case, when the controller 12 detects that the frame is a diagnostic frame, the copying and the folding back may not be performed as in the case of the control frame described above.

With the above-described configuration and processing, the control system 1 can reliably communicate the control frames of the controller and the plurality of slave devices and can forward and store the diagnosis frame for abnormality detection. Therefore, more frame data for abnormality detection can be acquired, and data that can realize detailed abnormality detection can be acquired.

Further, by causing the transmission processing of the diagnostic frame in the controller 11 to be executed by the transmitter/receiver 102, it is possible to suppress an increase in the processing load of the CPU101 of the controller 11 due to the use of the diagnostic frame.

In the above description, the controller 11 does not transfer the control frame and the diagnosis frame to the database device 40 of the information communication network 60. However, the controller 11 may transfer the control frame and the diagnosis frame to the database device 40 of the information communication network 60. However, by not forwarding the control frame and the diagnosis frame to the database device 40 of the information communication network 60, it is possible to secure a communication band between the CPU101 of the controller 11 and the UI device 50 via the information communication network 60. Therefore, the communication of the control data between the UI device 50 and the CPU101 of the controller 11 can be executed reliably and at high speed.

In the above description, the controller 11 and the controller 12 are connected via the communication cable 35. However, the communication cable 35 may be omitted. Fig. 12 is a diagram showing a device configuration in the control system. As shown in fig. 12, the control system 1A includes a controller 11A, a controller 12A, a plurality of slave devices 21, 22, and 23, a plurality of communication cables 31, 32, 33, and 34, a database device 40, a user interface device (UI device) 50, and an information communication network 60. The control system 1A shown in fig. 12 has a configuration in which the communication cable 35 is omitted from the control system 1 shown in fig. 1. Therefore, only the portions necessary for new description, which are different from the control system shown in fig. 1, will be described below.

Controller 11A, slave device 21, slave device 22, slave device 23, and controller 12A are connected in a linear sequence. In other words, the controller 11A is a first terminal, the controller 12A is a second terminal, and the plurality of slave devices 21, 22, and 23 are connected in order from the first terminal to the second terminal. However, the controller 11A and the controller 12A are not directly connected. At this time, the control frame transmitted from the controller 11A and arriving at the controller 12A is returned via the controller 12A, and then returned to the controller 11A via the slave device 23, the slave device 22, and the slave device 21 in this order.

(concrete processing of controller 11A of operation mode)

The controller 11A set to the operation mode specifically executes the following processing. Fig. 13 is a diagram showing a data transmission state of the controller in the operation mode.

As described above, the CPU101 of the controller 11A generates a control frame by the PLC control, the EtherCAT stack, and the ethernet driver using the data group stored in the shared memory 104. The process of generating the control frame is executed in accordance with a control cycle determined by PLC control. The CPU101 outputs the control frame to the transmitter 121 of the transmitter/receiver 102.

The transmitter 121 transmits a control frame to the communication cable 31 via the IF123 according to the control cycle.

On the other hand, in the controller 11, the receiving unit 122 of the transmitting/receiving unit 102 receives a control frame returned from the control network via the communication cable 31 and the IF 123. The reception unit 122 outputs the control frame to the CPU 101.

(concrete processing of the controller 12A in the data acquisition mode)

The controller 12A set to the data acquisition mode specifically executes the following processing. Fig. 14 is a diagram showing a data transmission state of the controller in the data acquisition mode.

In the controller 12A, the receiving unit 122' of the transmitting/receiving unit 102' receives the control frame transmitted from the control network via the communication cable 34 and the IF123 '. The receiving unit 122' copies the control frame. The receiving unit 122' outputs the control frame to the CPU101' and also to the transmitting unit 121 '.

The transmitter 121 'outputs a control frame to the communication cable 34 via the IF 123'. That is, the receiving unit 122 'and the transmitting unit 121' perform the return of the control frame in the control network.

Then, the receiving unit 122 'transfers the control frame to the upper communication unit 103'. The forwarding is, for example, a Direct Memory Access (DMA) forwarding method. The upper communication unit 103 'transfers the control frame to the database device 40 of the information communication network 60 via the IF 130'. At this time, the controller 12 gives a time stamp to the control frame.

The controller 12 performs the return of the control frame and the transfer to the information communication network 60 each time the control frame is received.

The control system 1A configured as described above can reliably perform communication of the control frame between the controller and the plurality of slave devices regardless of the amount of data communicated via the control network, and can suppress a decrease in the amount of control frames acquired for abnormality detection.

(redundancy of controller)

The control system 1 including the structure can support redundancy of the controller. The redundancy of the controller is roughly defined as the following structure: controllers (having the same configuration as that of fig. 1 and 12) capable of generating and transmitting/receiving control frames are connected to both ends of a control network having a plurality of slave devices 21, 22, and 23, respectively. In addition, in the redundancy of the controllers, either one of the two-end controllers is used for generation of a control frame and scheduling management.

Fig. 15 is a diagram showing an example of an outline of redundancy of the controller. Fig. 15 shows the following modes: the controller 11 has failed in executing the operation mode, and the controller 12 switches from the data acquisition mode to the operation mode. In fig. 15, black thick arrows indicate the transmission state of the beacon, and white thick arrows indicate the transmission state of the control frame.

As shown in fig. 15, the controller 12 transmits a beacon to the controller 11 via the information communication network 60. If there is no response to the beacon, the controller 12 switches from the data acquisition mode (P mode in fig. 15) to the operation mode (R mode in fig. 15). The controller 12 generates a control frame for the control network to which the plurality of slave devices 21, 22, and 23 are connected, and transmits the control frame to the control network. With this configuration, even if the CPU101 fails, the controller 11 can perform the return communication of the control frame by the transmission/reception unit 102.

(specific processing of the controller 12 for switching from the data acquisition mode to the operation mode)

Fig. 16 is a diagram showing a data transmission state of the controller when switching from the data acquisition mode to the operation mode. In fig. 16, black thick arrows indicate the transmission state of the beacon, and white thick arrows indicate the transmission state of the control frame.

While the data acquisition mode is set, the controller 12 sequentially copies and returns the control frame, and stores the PDO data in the shared memory 104 and the database device 40 of the information communication network 60.

Along with these processes, the CPU101 of the controller 12 generates a beacon in the PLC control. At this time, the CPU101 generates a beacon in a predetermined operation confirmation cycle. The operation confirmation period is set to be a constant multiple (for example, about 2 to 5 times) of the control period of the control network. The constant is an example, and may have another value. When the predetermined time elapses and the output of the control frame from the transmission/reception unit 102 is not performed, the CPU101 detects that the output of the control frame has been stopped, and generates a beacon.

The ethernet driver for upper communication adds an ethernet header of the reception target of the controller 11 to the beacon, and outputs the beacon to the upper communication unit 103. The upper communication unit 103 outputs the beacon to the information communication network 60 via the IF 130.

If the response signal of the beacon cannot be detected, the PLC control in the CPU101 of the controller 12 performs switching from the data acquisition mode to the operation mode.

Specifically, the controller 12 executes the processing shown in any one of fig. 17, 18, and 19 below.

Fig. 17 is a flowchart showing a schematic process executed by the controller for switching from the data acquisition mode to the operation mode. Fig. 17 shows a first mode in which switching is determined only by a response of a beacon.

As shown in fig. 17, the controller 12 receives slave information, that is, information of the plurality of slave devices 21, 22, and 23 connected to the control network (S300). The information of the plurality of slave devices 21, 22, and 23 is acquired when the controller 11 constructs a control network, transmitted from the controller 11, and received by the controller 12. The above-described processing is processing prior to the switching processing from the data acquisition mode to the operation mode, and may be realized by other methods, which are not necessary for the switching processing from the data acquisition mode to the operation mode.

The controller 12 generates a beacon and transmits the beacon to the controller 11 via the information communication network 60 (S301). If there is a response signal to the beacon (S302: no), the controller 12 repeats the transmission of the beacon at the cycle for the operation confirmation.

If no response signal to the beacon is provided (S302: YES), the controller 12 switches from the data acquisition mode to the operation mode (S303).

Fig. 18 is a flowchart showing a schematic process executed by the controller for switching from the data acquisition mode to the operation mode. Fig. 18 shows a second mode in which switching is determined only by a response of a beacon.

As shown in fig. 18, the controller 12 generates a beacon and transmits the beacon to the controller 11 via the information communication network 60 (S301). If there is a response signal to the beacon (S302: no), the controller 12 repeats the transmission of the beacon at the cycle for the operation confirmation.

If no response signal to the beacon is transmitted (yes in S302), the controller 12 increments the number of times no response is transmitted to the beacon (count up) (S311). If the count value has not reached the switching threshold (S312: no), the controller 12 repeats the transmission of the beacon at the cycle for the operation confirmation.

If the count value reaches the switching threshold (S312: YES), the controller 12 switches from the data acquisition mode to the operation mode (S303).

By using the processing of fig. 18, mode switching due to a communication error (error) of a beacon via the information communication network 60 or the like is suppressed.

Fig. 19 is a flowchart showing a schematic process executed by the controller for switching from the data acquisition mode to the operation mode. Fig. 19 shows an embodiment in which switching is determined by the observation result of the control frame and the response of the beacon.

The controller 12 observes the control frame (S401). If the control frame is received (S402: no), the controller 12 repeats the observation of the control frame.

If the control frame is not received within the predetermined time (yes in S402), the controller 12 generates a beacon and transmits the beacon to the controller 11 via the information communication network 60 (S301). Here, the predetermined time is, for example, a constant multiple of the control period. If there is a response signal to the beacon (S302: no), the controller 12 repeats the transmission of the beacon at the cycle for the operation confirmation.

If no response signal to the beacon is provided (S302: YES), the controller 12 switches from the data acquisition mode to the operation mode (S303).

By using the processing shown in fig. 19, it is possible to detect a failure or the like of the controller 11 based on the communication state of the control frame in the control network and the beacon via the information communication network 60. This improves the detection accuracy for the controller 11.

As described above, when switching from the data acquisition mode to the operation mode, the controller 12 executes the processing shown in fig. 20. Fig. 20 is a diagram showing a data transmission state of the controller after switching to the operation mode. The process shown in fig. 20 is different from the process shown in fig. 6 in that the main body of the process is changed from the controller 11 to the controller 12. Therefore, the detailed processing is omitted. That is, when the controller 12 switches to the operation mode, the same processing as that executed by the controller 11 is executed in the control network.

As described above, by using the above configuration and processing, even if the controller 11 cannot perform the generation and scheduling management of the control frame due to a failure or the like, the controller 12 can continue the control using the control network. That is, a control stop period by the control network hardly occurs.

At this time, the controller 12 stores the PDO data in the shared memory 104 in the data acquisition mode, as described above. Therefore, when the operation mode is switched to the operation mode, the controller 12 holds the PDO data up to this point. This enables the controller 12 to generate the control frame quickly and reliably.

Further, as described above, before switching to the operation mode, the controller 12 acquires information of the plurality of slave devices 21, 22, and 23 from the controller 11 and stores the information in the shared memory 104. Thus, the controller 12 does not need to acquire information of the plurality of slave devices 21, 22, and 23 from the plurality of slave devices 21, 22, and 23 again after the switching. Therefore, the control frame can be generated more quickly and reliably.

When the CPU101 malfunctions or runs out of control and the transmission/reception unit 102 is normal in the controller 11, the transmission/reception unit 102 in the controller 11 copies the control frame. Then, the copied control frame is transferred to the database device 40 of the information communication network 60 via the transmission/reception unit 102 and the upper communication unit 103. This continues the transfer of the control frame for abnormality detection.

(concrete processing of mode switching between controller 11 and controller 12)

Fig. 21 is a diagram showing a data transmission state in mode switching between two controllers connected to a control network. In fig. 21, black thick arrows indicate transmission states of the switching command signal, and thick arrows with hatching indicate transmission states of the switching acknowledgement signal.

The UI device 50 transmits a switching command signal to the controller 11 operating in the operation mode and the controller 12 operating in the data acquisition mode via the information communication network 60. Upon receiving the switching command signal, the controller 11 and the controller 12 mutually transmit and receive a switching confirmation signal via the information communication network 60.

Subsequently, the controller 11 stops the operation mode and starts the data acquisition mode. In synchronization with this, the controller 12 starts the operation mode and stops the data acquisition mode.

Fig. 22 is a flowchart showing a schematic process of mode switching executed by the two controllers.

Upon receiving the switching command signal (S411), the controller 11 transmits a control stop advance notice signal, which is one of the switching confirmation signals, to the controller 12 (S412). The control stop advance notice signal may include, for example, the timing of stopping control.

Upon receiving the switching command signal (S421), the controller 12 waits for the reception of the control stop announcement signal, thereby receiving the control stop announcement signal (S422). The controller 12 analyzes the control stop notice signal and transmits a control start notice signal, which is one of the switching confirmation signals, to the controller 11 (S423).

The controller 11 stops the control upon receiving the control start advance notice signal (S413). Thereby, the controller 11 switches from the operation mode to the data acquisition mode. Subsequently, the controller 11 observes the control frame and checks whether or not reception of the control frame is performed (S415).

After the transmission of the control start announcement signal, the controller 12 observes the control frame and confirms that no more control frame is received (S424). Subsequently, the controller 12 switches from the data acquisition mode to the operation mode, and starts generation of a control frame and transmission/reception to/from the control network (S425).

As described above, in the control system 1, the controller of the operation mode and the controller of the data acquisition mode can be switched with each other by the control from the UI device 50. This enables, for example, rewriting and upgrading (update) of firmware while continuing control of the plurality of slave devices 21, 22, and 23. For example, the controller 12 in the data acquisition mode is rewritten in firmware, and switching between the operation mode and the data acquisition mode is performed for the controller 11 and the controller 12. Then, the firmware is rewritten to the controller 11 which is in the data acquisition mode.

At this time, the controller in the data acquisition mode has almost no load on the CPU101 for controlling the plurality of slave devices. Therefore, the download (download) and rewrite processing of the firmware can be performed at high speed and reliably.

(redundancy of Cable)

The control system 1 including the structure can support redundancy of cables. The redundancy of the cable is roughly defined as the following structure: two controllers connected to both ends of a control network having a plurality of slave devices 21, 22, and 23 are connected by two paths (the configuration is the same as that of fig. 1).

Fig. 23 is a diagram showing an example of a case where redundancy of cables can be handled. Fig. 23 shows a case where the communication cable 33 connecting the slave device 22 and the slave device 23 is disconnected. In fig. 15, white thick arrows indicate transmission states of control frames.

As shown in fig. 23, the control system 1 includes: a first route (route) for connecting the plurality of slave devices 21, 22, and 23 in sequence between the controller 11 and the controller 12 by using the plurality of communication cables 31, 32, 33, and 34; and a second path, controller 11 and controller 12 are directly connected by a communication cable 35. Normally, the controller 11 transmits a control frame via the first path.

Here, when the communication cable 33 is disconnected, the control frame transmitted from the controller 11 is folded back through the slave device 22. The controller 11 confirms the PDO or the time stamp of the control frame. When detecting that the control frame has not passed through the slave device 23, the controller 11 returns the control frame to the second path. The control frame reaches the slave device 23 through the second path and the controller 12. When the slave device 22 side is viewed from the slave device 23, the slave device 23 returns the control frame to the controller 12 side because the slave device 22 is not connected. The controller 12 returns the control frame to the controller 11 via the second path.

(concrete processing of controller for operation mode)

The controller 11 in the operation mode specifically executes the following processing. Fig. 24 is a flowchart of the processing of the controller in the operation mode corresponding to redundancy of the cable.

The controller 11 in the operation mode transmits a control frame on a first path (a path between the controller 11 and the controller 12, to which the plurality of slave devices 21, 22, and 23 are connected) (S501). The controller 11 receives the control frame (S502).

The controller 11 analyzes the control frame and detects whether or not there is a slave device that has failed. For example, the controller 11 detects whether or not there is a slave device that has failed based on the presence or absence of the time stamp of each slave device and the matching property.

If there is no slave device that has failed (S503: no), the controller 11 continues normal control, that is, control to transmit a control frame from the first path.

If there is a slave device that has failed (yes in S503), the controller 11 returns the control frame to the second route (S504).

(specific processing of controller for data acquisition mode)

The controller 12 in the data acquisition mode specifically executes the following processing. Fig. 25 is a flowchart of the processing of the controller in the data acquisition mode corresponding to redundancy of the cable.

The controller 12 in the data acquisition mode cannot receive the control frame from the first path but receives the control frame from the second path (S511). The controller 12 returns the control frame to the first route (S512). The controller 12 receives the control frame from the first path (S513).

The controller 12 returns the control frame to the second path (S514).

Then, the controller 12 transfers the control frame to the database device 40 of the information communication network 60 (S511). The controller 12 extracts PDO data from the control frame (S531), and stores the PDO data in the shared memory 104' (S532).

With the above configuration and processing, even if a disconnection or the like occurs in the middle of the first path, the controller 11 can transmit the control frame to all of the plurality of slave devices 21, 22, and 23 and can receive the control frame updated in all of the plurality of slave devices 21, 22, and 23. That is, even if there is a disconnection in the middle of the first route, the controller 11 can continue to control the plurality of slave devices 21, 22, and 23. This is not related to the location of the disconnection, and it is needless to say that the controller 11 can continue the control of the plurality of slave devices 21, 22, and 23 even if the communication cable 35, which is the second path, is disconnected.

(abnormality detection by the controller in data acquisition mode)

The above configuration shows a mode in which the database device 40 connected to the information communication network 60 executes the abnormality detection processing. However, the controller in the data acquisition mode may perform the processing of abnormality detection.

Fig. 26 is a diagram showing a configuration of a device in the control system when abnormality detection is executed by the controller in the data acquisition mode. Fig. 27 is a block diagram showing a configuration related to data communication in the controller of the data acquisition mode.

The control system 1B shown in fig. 26 differs from the control system 1 shown in fig. 1 in that: a controller 11B in place of the controller 11, and a controller 12B in place of the controller 12; and without the need for the database means 40. The other configurations of the control system 1B are the same as those of the control system 1, and the description of the same parts is omitted.

The controller 11B and the controller 12B have the same configuration, but differ in that a packet analyzer (packet analyzer)106 shown in fig. 27 is added to the controller 11 and the controller 12. The controller 11B and the controller 12B operate in different modes. For example, when the controller 11B operates in the above-described operation mode, the controller 12B operates in the above-described data acquisition mode.

Further, the controller 12B executes processing related to the abnormality detection executed by the database device 40 through the packet analyzer 106. Since the controller 12B operates in the data acquisition mode, even if abnormality detection is performed, the control of the control network is not affected. Therefore, the control system 1B can perform the abnormality detection only by the devices connected to the control network while reliably performing the control of the plurality of slave devices 21, 22, and 23. In this case, the controller 12B may output the abnormality detection result to the information communication network 60. For example, the controller 12B outputs the abnormality detection result to the UI device 50 via the information communication network 60. The UI device 50 or an operator operating the UI device 50 decides a command or the like for the controller 11B based on the abnormality detection result.

Also, the packet analyzer 106 is preferably implemented by a dedicated IC such as an ASIC different from the CPU 101'. This can reduce the processing load on the CPU101' of the controller 12B in the data acquisition mode.

In this case, the transmission/reception unit 102' preferably transfers the control frame to the packet analyzer 106 by DMA transfer. Thereby, the load of the CPU101' is further reduced.

In addition, although the configurations of fig. 26 and 27 show the configuration in which both the controller 11B and the controller 12B have the same configuration, only the controller 12B may be provided with the packet analyzer 106.

Description of the symbols

1. 1A: control system

10. 11, 11A, 11B, 12A, 12B: controller

13: upper communication unit

21. 22, 23: slave device

31. 32, 33, 34, 35: communication cable

40: database device

50: UI device

60: network for information communication

101、101':CPU

102. 102': transceiver unit

103. 103': upper communication unit

104. 104': shared memory

105. 105': program memory

106: data packet analyzer

110: system bus

121: transmitting part

122: receiving part

123、130:IF

33页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:入侵检测装置、入侵检测方法以及入侵检测系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!