The present invention relates to a design assistance device, a design assistance method, and a design assistance program.
Nowadays, a technology of controlling various devices such as an FA (Factory Automation) device through a network becomes widespread. There are proposed various network protocols controlling facilities. For example, a protocol called EtherCAT (Ethernet Control Automation Technology) (both EtherCAT and Ethernet are a registered trademark) attracts attention (for example, see Patent Documents 1 and 2). In EtherCAT, a frame transmitted from a high-order master unit passes sequentially through all low-order slave units connected to the network to omit handshake, thereby providing high-speed communication.
Patent Document 1: Japanese Patent No. 5195955
Patent Document 2: Japanese Unexamined Patent Publication No. 2013-90335
In the protocol of the network in which each slave unit sequentially transfers the frame transmitted from the master unit, whether each slave unit normally transfers the frame is diagnosed. In the case that communication is conducted under the network protocol while all pieces of information about control of the slave units are included in one frame, an abnormal diagnosis is made with respect to the frame transfer of the slave unit because the slave unit is separated from or added to the network, which allows an adverse effect to be exerted on operations of all the slave units connected to the network.
An object of the present invention is to provide a design assistance device, a design assistance method, and a design assistance program for being able to easily generate a frame format, which limits a range of the slave unit exerting the adverse effect when the abnormality occurs during the frame transfer of the slave unit, in the network in which the slave unit sequentially transfers the frame transmitted from the master unit.
In order to solve the problem, each slave unit is grouped from device information about each slave unit that sequentially transfers a frame transmitted from a master unit and information about a definition file in which information about a group to which the slave unit belongs is described from network configuration information, and setting information is generated such that the setting information is transmitted in a frame format, in which a data field in each unit in which control data of each slave unit is invalidated due to a transfer abnormality of a data frame is ensured in each group, the data field being included in the data frame in which the control data is stored.
In one aspect of the present invention, a design assistance device that sets communication between a master unit and a slave unit through a network, the design assistance device includes: a device information acquisition part configured to acquire device information about each slave unit connected to the master unit; a storage in which a definition file is stored, information about a group to which the slave unit belongs being described from the device information or network configuration information in the definition file; a group determinator configured to group each slave unit from the device information about each slave unit and information about the definition file; and a setting part configured to generate setting information providing for communication operation including generation of a data frame transmitted from the master unit to the slave unit. At this point, the setting part generates the setting information such that the setting information is transmitted in a frame format, in which a data field in each unit in which control data of each slave unit is invalidated due to a transfer abnormality of a data frame is ensured in each group, the data field being included in the data frame in which the control data is stored.
The frame format in which the design assistance device generates the setting information includes not only a frame form transmitted from the master unit but also a provision associated with how to allocate the control data of each slave unit allocated to a form. The design assistance device groups each slave unit, which sequentially transfers a frame transmitted from the master unit, from the device information about each slave unit and the information about the definition file in which the information about the group to which the slave unit belongs is described from the network configuration information. The device information is information about the slave unit. An attribute or an operation content of the slave unit can be cited as an example of the device information. The design assistance device generates the setting information such that the setting information is transmitted in the frame format having the data field in which the control data of each slave unit is stored. The data field is ensured in each unit in which the control data is invalidated due to the transfer abnormality of the data frame, and ensured in each group of one frame.
Thus, the design assistance device automatically groups each slave unit. Therefore, even if a user has no advanced knowledge of the protocol setting the frame format to hardly recognize the detailed configuration of the network or the information about each slave unit, such as how the devices constitute the network topology or which one of connection forms is used, the frame format limiting the range of the slave unit influenced by the abnormal frame transfer of the slave unit can easily be generated.
The group determinator may group each slave unit into an operation content from information about the operation content of each slave unit, the information about the operation content of each slave unit being obtained from the device information, and the setting part may generate the setting information such that the setting information is transmitted in the frame format, in which the data field is ensured in each group grouped in each operation content. When the grouping is performed in each operation content of the slave unit, the pieces of control data of the slave units having a low operation content relationship are grouped into different data fields, so that the range of the slave unit influenced by the data invalidation can be limited in each operation content.
The group determinator may group each slave unit from information about an attribute whether automatic stopping is performed when the information about the operation content of each slave unit senses an abnormality, the information about the operation content of each slave unit being obtained from the device information, and the setting part may generate the setting information such that the setting information is transmitted in the frame format, in which the data field is ensured in each group, the group being grouped into a safety device that stops automatically when sensing the abnormality and a non-safety device that does not stop automatically even if sensing the abnormality. When the grouping is performed from the viewpoint of whether the safety device automatically stops, the control data associated with the safety of the slave unit the control data not associated with the safety of the slave unit are grouped into different data fields, so that the range of the slave unit influenced by the data invalidation can be limited to the range associated with the safety and the range not associated with the safety.
The present invention can also be comprehended from the viewpoint of a method. In another aspect of the present invention, a design assistance method for setting communication between a master unit and a slave unit through a network, the design assistance method includes: acquiring device information about each slave unit connected to the master unit; grouping each slave unit from the device information about each slave unit and information about the definition file, the device information being stored in a storage storing a definition file describing information about a group to which the slave unit belongs from the device information or network configuration information; and generating setting information providing for communication operation including generation of a data frame transmitted from the master unit to the slave unit. In generating the setting information, the setting information is generated such that the setting information is transmitted in a frame format, in which a data field in each unit in which control data of each slave unit is invalidated due to a transfer abnormality of a data frame is ensured in each group, the data field being included in the data frame in which the control data is stored.
The present invention can also be comprehended from the viewpoint of a program. In still another aspect of the present invention, a design assistance program that sets communication between a master unit and a slave unit through a network, the design assistance program causing a computer to execute: acquiring device information about each slave unit connected to the master unit; grouping each slave unit from the device information about each slave unit and information about the definition file, the device information being stored in a storage storing a definition file describing information about a group to which the slave unit belongs from the device information or network configuration information; and generating setting information providing for communication operation including generation of a data frame transmitted from the master unit to the slave unit. In generating the setting information, the computer is caused to execute generating the setting information such that the setting information is transmitted in a frame format, in which a data field in each unit in which control data of each slave unit is invalidated due to a transfer abnormality of a data frame is ensured in each group, the data field being included in the data frame in which the control data is stored.
Accordingly, in the design assistance device, method, and program of the present invention, the frame format that limits the range of the slave unit exerting the adverse effect when the abnormality occurs during the frame transfer of the slave unit can easily be generated in the network in which the slave unit sequentially transfers the frame transmitted from the master unit.
Hereinafter, an embodiment of the present invention will be described. The following embodiment is one aspect of the present invention, and is not limited to the technical scope of the present invention.
PLC 1 includes a CPU (Central Processing Unit) unit 5 that performs various pieces of calculation processing, an IO (Input and Output) unit 6, and a special unit 7. The CPU unit 5, the IO unit 6, the special unit 7 are configured to be able to exchange pieces of data with one another through a PLC system bus 8. A power supply unit 9 supplies electric power having a proper voltage to the CPU unit 5, the IO unit 6, and the special unit 7.
The IO unit 6 controls various pieces of input and output processing. The IO unit 6 acquires a signal output from sensors such as a detection switch, and outputs a signal to various devices such as a relay and an actuator. The special unit 7 controls implementation of various functions, such as input and output of analog data, temperature control and communication conducted by a specific communication scheme, which are not supported by the IO unit 6.
The network 2 is a communication line through which various pieces of data exchanged between the CPU unit 5 and each slave unit 3 are transmitted. In the network 2, each slave unit 3 sequentially transfers a frame transmitted from the CPU unit 5. EtherCAT can be cited as an example of a protocol pursuant to a communication scheme in which each slave unit 3 sequentially transfers a frame transmitted from the CPU unit 5.
In
In the PLC system S, the CPU unit 5 of the PLC 1 acts as a master unit in EtherCAT. The PLC 1 corresponds to an example of the “master unit” of the present invention. However, in the embodiment, another unit except for the CPU unit 5 may act as the master unit in EtherCAT.
For example, the PLC system S can be used in a factory that produces various industrial products, a chemical plant in which raw materials are subjected to various chemical processes, and various machine facilities.
Referring to
The design assistance device 4 also includes a keyboard 45 and a mouse 46 that receive operation from a user and a monitor 47 that presents information to the user. The design assistance device 4 also includes a communication interface (IF) 48 that conducts communication with the PLC 1 and the like and a CD-ROM drive 49 that accesses a CD-ROM.
In the CPU unit 5, the microprocessor 51 processes various programs such as a real-time OS, a system program of the PLC 1, a user program, and a motion calculation program and pieces of processing for various pieces of data such as system setting parameter using an interrupt signal generated with the system timer 55, thereby performing control operation in each motion control cycle.
The PLC system bus controller 56 controls data exchange through the PLC system bus 8. The PLC system bus controller 56 temporarily stores data, which is exchanged with the IO unit 6 or the special unit 7 through the PLC system bus 8, or transfers the stored data.
The field network controller 57 controls data exchange through the network 2. The field network controller 57 temporarily stores data, which is exchanged with each slave unit 3 through the network 2, according to the protocol of EtherCAT or transfers the stored data.
The tool function part 10 provides tools assisting production of a network topology for a user. The tool function part 10 includes various function parts such as a device information manager 11, an operation part 12, a group determinator 13, a setting information constructor 14, a setting information output part 15, and a use definition file manager 17, and a definition file group 16.
The device information manager 11 acquires and manages device information such as a type of each slave unit 3. The device information manager 11 may manage the device information by reading the device information from an external file or a file managed by the device information manager 11 per se. The device information manager 11 corresponds to an example of the “device information acquisition part”.
The operation part 12 outputs a screen of the network topology displayed on a display device of the design assistance device 4, and receives user input operation in an input device of the design assistance device 4. For example, a connection state between the slave units 3 is shown on the screen of the network topology generated with the operation part 12.
The group determinator 13 groups the slave units 3 based on device information about each slave unit 3 and definition file information.
The setting information constructor 14 generates configuration data based on a grouping result performed with the group determinator 13. The configuration data is data defining the frame format. For example, a data field size ensured in each group, an expected value of a working counter, and an address of the slave unit 3 belonging to each group are provided for in the configuration data. The setting information constructor 14 corresponds to an example of the “setting part” of the present invention.
The setting information output part 15 compiles network setting data generated with the setting information constructor 14 and a program produced by a user, and transmits the network setting data and the program to the CPU unit 5 through the communication interface 48.
The definition file group 16 is one or plural files in which a logic is described when the group determinator 13 groups the slave units 3 from the device information. In the definition file group 16, for example, information about the group to which each slave unit 3 should belong is described from device information about each slave unit 3 connected to the network 2 or configuration information about the network 2. The definition file group 16 is stored in the storage such as the HDD 42 and the ROM 44.
The use definition file manager 17 manages the definition file used according to the input received through the operation part 12.
The tool function part 10 is not limited to one that is implemented in the design assistance device 4, but may be implemented in the CPU unit 5, for example.
The design assistance device 4 may include not only the tool function part 10 but also a program edit function of receiving user input to produce or edit a control program or a unit setting function of setting an operation mode in the case that the unit has plural operation modes.
The PLC function part 20 will now be described below. The PLC function part 20 controls a function of generating the frame transmitted to each slave unit 3 through the network 2 according to a network setting that is produced by the user using tools provided from the tool function part 10. The PLC function part 20 includes various function parts such as a setting file reader 21, a start-up processor 22, a system configuration recognizer 23, an application data generator 24, and a frame generator 25.
The setting file reader 21 reads a content of a setting file generated with the tool function part 10, and expands the setting file into the main memory 53. In response to a read request from the frame generator 25, the setting file reader 21 outputs data associated with the content of the setting file expanded into the main memory 53.
When the PLC 1 is started up, the start-up processor 22 causes the setting file reader 21 to read information about the system configuration from the setting file, and to output the information to the system configuration recognizer 23.
The system configuration recognizer 23 manages a current situation of the system configuration based on the system configuration information output from the setting file reader 21 in starting up the PLC 1 or information acquired from each slave unit 3 through the network 2.
The application data generator 24 captures the data output from a storage area of the main memory 53 to each slave unit 3, and outputs the data of the slave unit 3, which is a data exchange target in the current system configuration, to the frame generator 25.
The frame generator 25 makes a read request to the setting file reader 21 in each motion control cycle, and refers to the data associated with the content of the setting file output from the setting file reader 21. Then, the frame generator 25 generates the frame to which the output data output from the application data generator 24 is added according to the format having the content provided for in the setting file.
Each unit is displayed on the unit list screen as an icon to which a unit name and display (corresponds to the description of “standard” and “safety” in
The PLC 1 or each slave unit 3 constituting the network of the PLC system S is displayed on the network topology screen such that one component is allocated to one line. In the network topology screen, the higher-order device is displayed in an upper line, and the lower-order device is displayed on a lower line. The PLC 1 including the design assistance device 4, which constitutes the PLC system S to act as the master unit in EtherCAT, is displayed in the topmost line. The slave units 3 that correspond to the low-order devices from the viewpoint of the PLC 1 are displayed below the PLC 1 in the descending order. In the network topology screen, a connection relationship among the slave units 3 is displayed in a visually comprehensive manner by a difference of the line in which the slave unit 3 is disposed, so that the user can design the network while easily recognizing the connection order of the slave unit 3.
The operation part 12 displays the design assistance screen to receive the operation performed by the user with a pointing device such as the mouse 46. The user performs drag and drop operation on the unit icon to add the unit icon displayed in the unit list to the network topology, or to separate the unit icon from the network topology.
The unit constituting the network topology is changed in the case that the user performs the unit addition operation or the unit separation operation in the design assistance GUI. In the case that the user performs the unit addition operation or the unit separation operation, in the design assistance device 4, the group determinator 13 performs the processing of grouping the units in the network topology (S102).
For example, in the case that the coupler is added to the network topology, because neither the unit belonging to “shaft” nor the unit belonging to “safety” is combined with the coupler, the coupler is classified as the groups 10 to 12 according to the table in
After the units in the network topology are grouped according to the group addition condition as described above, the setting information constructor 14 performs processing of generating frame format setting information (S103).
In EtherCAT, WKC that is a field checking whether the data in “EtherCAT Datagrams” is correctly exchanged with the data of the target slave unit is prepared in each “EtherCAT Datagram”. Therefore, there is “EtherCAT Datagram” in which WKC indicates abnormal exchange with the data of the target slave unit. Even if the data is invalidly dealt, the control can normally be performed based on another piece of data of “EtherCAT Datagram” in which WKC does not indicate the abnormal exchange with the data of the target slave unit.
For this reason, according to the grouping result of the group determinator 13, the setting information constructor 14 generates setting information about the frame format in which the data of the slave unit 3 allocated to each data field of “EtherCAT Datagram” is provided for. In the case that the data error in a specific data field of “EtherCAT Datagram” is found out by the check of WKC to invalidate the data of the field, the data is allocated from the viewpoint of limiting a range of the slave unit influenced by the invalidation of the data of the field.
Thus, the design assistance device 4 automatically groups the slave units 3. Therefore, even if the user has no advanced knowledge of the protocol setting the frame format, and hardly recognizes the detailed configuration of the network 2 or the information about each slave unit 3, the frame format limiting the range of the slave unit 3 influenced by the abnormal frame transfer of the slave unit 3 can easily be generated.
In the PLC function part 20 of the CPU unit 5, the frame is generated according to the format that is provided for in the setting file handed over from the tool function part 10 of the design assistance device 4, and the frame is used in the communication of the network 2. That is, in the PLC function part 20, the setting file reader 21 reads the content of the setting file, and the frame generator 25 generates the frame in which the data output from the application data generator 24 is stored in the data field according to the provision of the setting file. The frame generated with the PLC function part 20 goes around in the network 2, and the control information about each slave unit 3 is periodically refreshed.
In the embodiment, the case applied to EtherCAT is described by way of example. However, the embodiment is not limited to the application to EtherCAT. The embodiment can also be applied to other protocols except for EtherCAT as long as each slave unit sequentially transfers the frame transmitted from the master unit in the network.
Variations of the definition file that can be referred to with the group determinator 13 will be described below.
Thus, in the provision of the definition file of the first example, the unit having the synchronization function set to be valid belongs to the group 1, and other units belong to the group 2. Therefore, in the case that the group determinator 13 performs the grouping by referring to the definition file of the first example, in step S103, the field of “EtherCAT Datagram” in which the data of the synchronous unit (group 1) is stored and the field of “EtherCAT Datagram” in which the data of the asynchronous unit (group 2) is stored are separately prepared in the frame format in which the setting information is generated with the setting information constructor 14.
When the communication is conducted in pursuant to the frame format in the network 2, the range of the unit influenced by the occurrence of the error in the specific data field can be limited within the range of the synchronous unit or the range of the asynchronous unit.
Thus, in the provision of the definition file of the second example, the unit having the long control cycle belongs to the group 1, and other units belong to the group 2. Therefore, in the case that the group determinator 13 performs the grouping by referring to the definition file of the second example, in step S103, the field of “EtherCAT Datagram” in which the data of the unit having the long control cycle (group 1) is stored and the field of “EtherCAT Datagram” in which the data of the unit having the short control cycle (group 2) is stored are separately prepared in the frame format in which the setting information is generated with the setting information constructor 14. In the logic content of the definition file of the second example, each unit may be grouped into at least three according to the control cycle.
When the communication is conducted in pursuant to the frame format in the network 2, the range of the unit influenced by the occurrence of the error in the specific data field can be limited within the range of the unit having the short control cycle or the range of the unit having the long control cycle.
Thus, in the provision of the definition file of the third example, the unit located before the extended unit on the pathway of the network 2 belongs to the group 1, and other units belong to the group 2. Therefore, in the case that the group determinator 13 performs the grouping by referring to the definition file of the third example, in step S103, the field of “EtherCAT Datagram” in which the data of the unit located before the extended unit (group 1) is stored and the field of “EtherCAT Datagram” in which the data of the unit located since the extended unit (group 2) is stored are separately prepared in the frame format in which the setting information is generated with the setting information constructor 14.
When the communication is conducted in pursuant to the frame format in the network 2, the range of the unit influenced by the occurrence of the error in the specific data field can be limited within the range of the unit located before the extended unit or the range of the unit located since the extended unit.
Thus, in the provision of the definition file of the fourth example, the grouping is performed according to the data sizes of the input data and output data. Therefore, in the case that the group determinator 13 performs the grouping by referring to the definition file of the fourth example, in step S103, different fields of “EtherCAT Datagram” are separately prepared according to the data sizes of the input data and output data in the frame format in which the setting information is generated with the setting information constructor 14. In the logic content of the definition file of the fourth example, each unit may be grouped into at least two according to the data size of the input data, or grouped into at least two according to the data size of the output data. In the logic content of the definition file of the fourth example, each unit may be grouped according to the data sizes of at least three levels.
When the communication is conducted in pursuant to the frame format in the network 2, the range of the unit influenced by the occurrence of the error in the specific data field can be limited within the range of the units whose data sizes of the input data and output data are relatively similar to each other.
<<Computer-Readable Recording Medium>>
A program causing a computer, another machine, or a device (hereinafter, referred to as a computer and the like) to implement one of the functions can be recorded in a computer-readable recording medium. The computer and the like are caused to read the program from the recording medium, and to execute the program, which allows the function to be provided.
As used herein, the recording medium that can be read with the computer and the like means a recording medium in which information such as the data and the program is non-transiently stored by electric, magnetic, optical, mechanical, or chemical action and capable of being read with the computer and the like. In the recording mediums, examples of the recording mediums detachable from the computer and the like include a flexible disk, magneto-optical disk, a CD-ROM, a CD-R/W, a DVD, a Blu-ray (registered trademark) disk, a DAT, an 8-mm tape, and a memory card such as a flash memory. The hard disk drive and the ROM are the recording medium fixed to the computer and the like.
Number | Date | Country | Kind |
---|---|---|---|
2014-092947 | Apr 2014 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2015/062856 | 4/28/2015 | WO | 00 |