Slave device, method and program for controlling slave device
Patent Information
- Application Number
- JP2022088604
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2042-05-31
AI Technical Summary
【0016】 本発明の一態様に係るスレーブ装置等によれば、通信のトラブルシューティングに活用することができる。
Smart Images

Figure 0007634278000001 
Figure 0007634278000002 
Figure 0007634278000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a slave device, a control method for a slave device, and a program. [Background technology]
[0002] There is known a technique for transmitting data relating to a machine between a master device and a slave device in accordance with a master-slave communication protocol (see, for example, Patent Document 1).
[0003] The slave device acquires data related to the machine from the machine and stores the acquired data in the memory unit of the slave device. The master device transmits a request signal to the slave device, and the slave device transmits the data stored in the memory unit of the slave device to the master device as a response to the request signal from the master device. In this way, the master device holds the data from the slave device in the memory unit of the master device. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2017-98762 A Summary of the Invention [Problem to be solved by the invention]
[0005] However, when the master device is unable to acquire data from the slave device, a problem arises in that the master device is unable to determine whether communication is impossible between the master device and the slave device, or between the slave device and the machine.
[0006] The present invention has been made in view of the above problems, and an object of the present invention is to provide a slave device, a control method for a slave device, and a program that can be utilized for troubleshooting communications. [Means for solving the problem]
[0007] In order to achieve the above object, a slave device according to one embodiment of the present invention is a slave device that communicates with each of a master device and a machine in accordance with a master-slave communication protocol, and includes: a first communication unit that acquires data related to the machine and machine configuration information indicating a configuration of the machine from the machine; a control unit that, when the first communication unit is able to communicate with the machine, constructs first link information indicating a link relationship with the data related to the machine based on the machine configuration information acquired by the first communication unit, and, when the first communication unit is unable to communicate with the machine, constructs second link information indicating a link relationship with predetermined data; and a second communication unit that, when the first communication unit is able to communicate with the machine, transmits data linked with the first link information to the master device in response to a request from the master device, and, when the first communication unit is unable to communicate with the machine, transmits data linked with the second link information to the master device in response to a request from the master device.
[0008] According to this aspect, when the master device receives data linked with the first link information from the slave device, it can determine that communication is normal between the master device and the slave device and between the slave device and the machine. Also, when the master device receives data linked with the second link information from the slave device, it can determine that communication is disabled between the slave device and the machine. Furthermore, when the master device cannot receive any data from the slave device, it can determine that communication is disabled between the master device and the slave device. This can be used for troubleshooting communication to determine whether communication is disabled between the master device and the slave device or between the slave device and the machine.
[0009] For example, the control unit may be configured to discard the first link information when data regarding the machine is acquired by the first communication unit after the first link information is constructed and the acquired data regarding the machine is not linked to the first link information.
[0010] According to this aspect, for example, when the machine to which the slave device is connected is switched, the first link information can be discarded and reconstructed, so that the master device can receive data related to the switched machine.
[0011] For example, the control unit may be configured to discard the second link information when the first communication unit becomes able to communicate with the machine after constructing the second link information and when the machine configuration information is acquired by the first communication unit and the acquired machine configuration information does not correspond to the second link information.
[0012] According to this aspect, for example, when the machine is started after the control unit constructs the second link information, the second link information can be discarded and the first link information can be constructed based on the machine configuration information acquired by the first communication unit.
[0013] Moreover, a control method of a slave device according to one aspect of the present invention is a control method of a slave device that communicates with each of a master device and a machine in accordance with a master-slave communication protocol, and includes the steps of: (a) acquiring data related to the machine from the machine; (b) acquiring machine configuration information indicating a configuration of the machine from the machine; (c) constructing first link information indicating a link relationship with the data related to the machine based on the machine configuration information acquired in (b) if the slave device can communicate with the machine, and constructing second link information indicating a link relationship with predetermined data if the slave device cannot communicate with the machine; and (d) transmitting data linked with the first link information to the master device in response to a request from the master device if the slave device can communicate with the machine, and transmitting data linked with the second link information to the master device in response to a request from the master device if the slave device cannot communicate with the machine.
[0014] According to this aspect, when the master device receives data linked with the first link information from the slave device, it can determine that communication is normal between the master device and the slave device and between the slave device and the machine. Also, when the master device receives data linked with the second link information from the slave device, it can determine that communication is disabled between the slave device and the machine. Furthermore, when the master device cannot receive any data from the slave device, it can determine that communication is disabled between the master device and the slave device. This can be used for troubleshooting communication to determine whether communication is disabled between the master device and the slave device or between the slave device and the machine.
[0015] Moreover, a program according to an aspect of the present invention causes a computer to execute the above-described slave device control method. Effect of the Invention
[0016] The slave device according to one aspect of the present invention can be used for troubleshooting communications. [Brief description of the drawings]
[0017] [Figure 1] 1 is a block diagram showing an overview of a communication system according to a first embodiment. [Diagram 2] FIG. 2 is a block diagram showing a functional configuration of a slave device according to the first embodiment. [Diagram 3] FIG. 2 is a diagram showing an example of an address space according to the first embodiment; [Figure 4] FIG. 2 is a diagram showing an example of a minimum address space according to the first embodiment; [Diagram 5] 5 is a flowchart showing a flow of operations of the slave device according to the first embodiment. [Figure 6] FIG. 11 is a block diagram showing a functional configuration of a slave device according to a second embodiment. [Figure 7] FIG. 11 is a sequence diagram showing the flow of operations of a slave device and a machine according to the second embodiment. [Figure 8] FIG. 11 is a block diagram showing a functional configuration of a slave device according to a third embodiment. [Figure 9] FIG. 11 is a diagram showing an example of an address space according to the third embodiment. [Figure 10] FIG. 11 is a sequence diagram showing the flow of operations of a slave device and a machine according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0018] Hereinafter, the embodiments of the present invention will be described in detail with reference to the drawings. Note that the embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, component arrangement and connection forms, steps, order of steps, and the like shown in the following embodiments are merely examples and are not intended to limit the present invention. Furthermore, among the components in the following embodiments, components that are not described in the independent claims will be described as optional components.
[0019] (Embodiment 1) [1-1. Overview of communication systems] First, an overview of a communication system 2 according to a first embodiment will be described with reference to Fig. 1. Fig. 1 is a block diagram showing an overview of a communication system 2 according to a first embodiment.
[0020] 1, the communication system 2 includes a slave device 4, a machine 6, and a master device 8. In this embodiment, the communication system 2 is a communication system established in, for example, a factory.
[0021] 1, the communication system 2 includes one machine 6, but is not limited to this and may include multiple machines 6. Also, in the present embodiment, the communication system 2 includes one master device 8, but is not limited to this and may include multiple master devices 8.
[0022] The slave device 4 and the machine 6 are connected via a communication line 10. The communication line 10 is a communication line capable of communicating using a communication protocol such as Ethernet (registered trademark), IP (Internet Protocol), or RS-232C (serial communication). The communication realized by the communication line 10 may be wired communication or wireless communication. Specifically, the communication line 10 is constructed using a wired network constituted by a wired LAN (Local Area Network), a wireless network conforming to the IEEE802.11 standard, or a wired cable for local connection.
[0023] The slave device 4 and the master device 8 are connected via a network 12. The communication realized by the network 12 may be wired communication or wireless communication. Specifically, the network 12 is constructed, for example, as a wired network constructed using a wired LAN, or a wireless network conforming to the IEEE802.11 standard.
[0024] The slave device 4 is a server device for communicating with each of the machine 6 and the master device 8 according to a master-slave communication protocol. More specifically, the slave device 4 is a relay device for relaying various data between the machine 6 and the master device 8 according to the master-slave communication protocol. In this embodiment, the master-slave communication protocol is OPCUA (OPC Unified Architecture), and the slave device 4 is described as an OPCUA server.
[0025] The machine 6 is, for example, a CNC (Computer Numerical Control) machine tool such as a lathe for performing a predetermined machining on a workpiece. The machine 6 has a first movement axis and a second movement axis for moving a machining tool relative to the workpiece along a first axial direction and a second axial direction, respectively.
[0026] Furthermore, the machine 6 transmits data relating to the machine 6 (hereinafter also referred to as "machine data") to the slave device 4 via the communication line 10. The data relating to the machine 6 includes, for example, a data value "ABC (Inc.)" indicating the manufacturer of the machine 6, a data value "0001" indicating the serial number of the machine 6, a data value "0100 (mm)" indicating the axial position of the first movement axis of the machine 6, and a data value "0200 (mm)" indicating the axial position of the second movement axis.
[0027] Furthermore, the machine 6 transmits machine configuration information indicating the configuration of the machine 6 to the slave device 4 via the communication line 10. The machine configuration information includes, for example, "Manufacture" indicating the manufacturer of the machine 6, "Serial Number" indicating the serial number of the machine 6, "Spindle 1" indicating the first movement axis of the machine 6, and "Spindle 2" indicating the second movement axis of the machine 6. The machine configuration information is used when the slave device 4 constructs an address space (described later).
[0028] The master device 8 is a client device for communicating with the slave devices 4 according to the above-mentioned master-slave communication protocol, and is, for example, one of various terminal devices such as a personal computer operated by a user 14. The master device 8 receives various data from the slave devices 4 via the network 12 and presents the received data to the user 14. Note that the master device 8 is not limited to being operated by the user 14, and may be operated, for example, by an administrator of the communication system 2. More specifically, the administrator of the communication system 2 may remotely operate the master device 8 in the factory, for example, from outside the factory, using an external network.
[0029] [1-2. Functional configuration of slave device] The functional configuration of the slave device 4 according to the first embodiment will be described with reference to Fig. 2 to Fig. 4. Fig. 2 is a block diagram showing the functional configuration of the slave device 4 according to the first embodiment. Fig. 3 is a diagram showing an example of an address space 24 according to the first embodiment. Fig. 4 is a diagram showing an example of a minimum address space 28 according to the first embodiment.
[0030] As shown in FIG. 2, the slave device 4 includes a first communication unit 16, a control unit 18, a storage unit 20, and a second communication unit 22.
[0031] After the slave device 4 is started, the first communication unit 16 acquires machine configuration information for constructing an address space 24 (described later) from the machine 6 via the communication line 10 (see FIG. 1). The first communication unit 16 outputs the acquired machine configuration information to the control unit 18.
[0032] In addition, after the control unit 18 constructs the address space 24, the first communication unit 16 acquires machine data 26 (described later) from the machine 6 via the communication line 10. The first communication unit 16 outputs the acquired machine data 26 to the control unit 18.
[0033] When the first communication unit 16 is capable of communicating with the machine 6, the control unit 18 constructs an address space 24 as shown in Fig. 3 based on the machine configuration information acquired by the first communication unit 16. The control unit 18 stores the constructed address space 24 in the storage unit 20.
[0034] The address space 24 is information indicating a link relationship with the machine data 26, and is an example of first link information. As shown in Fig. 3, the address space 24 has a tree-like hierarchical structure having a group of data items related to the machine 6 in a lower hierarchy of "Machine Tools", for example.
[0035] The data item group has, in a lower hierarchy than the data item "Machine" which indicates the machine 6, a data item "Identification" which indicates the identification information of the machine 6, etc. Furthermore, in a lower hierarchy than the data item "Identification", the data item group has, in a lower hierarchy than the data item "Identification", a data item "Manufacture" which indicates the manufacturer of the machine 6, a data item "Serial Number" which indicates the serial number of the machine 6, a data item "Spindle 1" which indicates the axis position of the first movement axis of the machine 6, and a data item "Spindle 2" which indicates the axis position of the second movement axis of the machine 6, etc. Here, each data item in the address space 24 is constructed based on the machine configuration information.
[0036] Further, the control unit 18 stores the machine data 26 acquired by the first communication unit 16 in the storage unit 20. As shown in Fig. 3, the machine data 26 includes, for example, a data value "ABC (Inc.)" indicating the manufacturer of the machine 6, a data value "0001" indicating the serial number of the machine 6, a data value "0100 (mm)" indicating the axial position of the first moving axis of the machine 6, and a data value "0200 (mm)" indicating the axial position of the second moving axis of the machine 6. Here, the data values "ABC", "0001", "0100" and "0200" of the machine data 26 are linked to the data items "Manufacture", "Serial Number", "Spindle 1" and "Spindle 2" of the address space 24, respectively.
[0037] Furthermore, when the first communication unit 16 cannot communicate with the machine 6, the control unit 18 cannot acquire machine configuration information through the first communication unit 16 and therefore cannot construct the above-mentioned address space 24. Therefore, when the first communication unit 16 cannot communicate with the machine 6, the control unit 18 constructs a minimum address space 28 as shown in FIG. 4. The control unit 18 stores the constructed minimum address space 28 in the storage unit 20.
[0038] The minimum address space 28 is information indicating a link relationship with the fixed data 30, which is predetermined data, and is an example of second link information. As shown in FIG. 4, the minimum address space 28 has, as a data item group, a data item "Manufacture" indicating the manufacturer of the machine 6 and a data item "Serial Number" indicating the serial number of the machine 6, in a lower hierarchy than the data item "Identification". Here, each data item "Manufacture" and "Serial Number" of the minimum address space 28 is linked to each data value "ABC" and "0001" of the fixed data 30, respectively. Note that each data item "Manufacture" and "Serial Number" of the minimum address space 28 is minimum configuration information that can determine a fixed data value to be linked even if the first communication unit 16 does not communicate with the machine 6.
[0039] The fixed data 30 also includes data values that can be determined as fixed data even if the first communication unit 16 does not communicate with the machine 6, such as the data value "ABC (Inc.)" indicating the manufacturer of the machine 6 and the data value "0001" indicating the serial number of the machine 6. Before the first communication between the slave device 4 and the machine 6, the control unit 18 registers, in advance, in the storage unit 20, for example, the data value "ABC (Inc.)" indicating the manufacturer of the machine 6 and the data value "0001" indicating the serial number of the machine 6 as the fixed data 30. When the control unit 18 constructs the minimum address space 28, it reads out the fixed data 30 from the storage unit 20 and links the data values "ABC" and "0001" of the read fixed data 30 to the data items "Manufacture" and "Serial Number" of the minimum address space 28, respectively.
[0040] Returning to FIG. 2, the second communication unit 22 transmits and receives various data to and from the master device 8 via the network 12 (see FIG. 1). Specifically, when the first communication unit 16 can communicate with the machine 6, the second communication unit 22 reads the address space 24 and the machine data 26 from the storage unit 20 in response to a request from the master device 8, and transmits each data value of the machine data 26 linked to each data item of the address space 24 to the master device 8. Also, when the first communication unit 16 cannot communicate with the machine 6, the second communication unit 22 reads the minimum address space 28 and the fixed data 30 from the storage unit 20 in response to a request from the master device 8, and transmits each data value of the fixed data 30 linked to each data item of the minimum address space 28 to the master device 8.
[0041] [1-3. Operation of slave device] The operation of the slave device 4 according to the first embodiment will be described with reference to Fig. 5. Fig. 5 is a flowchart showing the flow of the operation of the slave device 4 according to the first embodiment.
[0042] 5, first, the slave device 4 is started (S101). Next, the control unit 18 determines whether or not communication between the first communication unit 16 and the machine 6 is possible (S102).
[0043] When the first communication unit 16 is able to communicate with the machine 6 (YES in S102), the first communication unit 16 acquires machine configuration information from the machine 6 via the communication line 10 (S103). The first communication unit 16 outputs the acquired machine configuration information to the control unit 18.
[0044] Next, the control unit 18 constructs an address space 24 based on the machine configuration information acquired by the first communication unit 16 (S104). The control unit 18 stores the constructed address space 24 in the storage unit 20. Next, the second communication unit 22 waits for connection with the master device 8 (S105). Thereafter, the first communication unit 16 acquires machine data 26 from the machine 6 via the communication line 10, and the control unit 18 stores the machine data 26 acquired by the first communication unit 16 in the storage unit 20. At this time, the control unit 18 links each data value of the machine data 26 to each data item of the address space 24.
[0045] In this case, when a connection between the second communication unit 22 and the master device 8 is established, the second communication unit 22 reads the address space 24 and the machine data 26 from the memory unit 20 in response to a request from the master device 8, and transmits each data value of the machine data 26 that is respectively linked to each data item of the address space 24 to the master device 8.
[0046] Returning to step S102, if the first communication unit 16 cannot communicate with the machine 6 (NO in S102), the first communication unit 16 cannot acquire the machine configuration information from the machine 6 via the communication line 10. In this case, the control unit 18 constructs a minimum address space 28 (S106). The control unit 18 stores the constructed minimum address space 28 in the memory unit 20.
[0047] Next, the second communication unit 22 waits for connection with the master device 8 (S105). In this case, when the connection between the second communication unit 22 and the master device 8 is established, the second communication unit 22 reads the minimum address space 28 and the fixed data 30 from the storage unit 20 in response to a request from the master device 8, and transmits to the master device 8 each data value of the fixed data 30 that is linked to each data item in the minimum address space 28.
[0048] [1-4. Effects] As described above, when the first communication unit 16 is capable of communicating with the machine 6, the control unit 18 constructs the address space 24 based on the machine configuration information acquired by the first communication unit 16. Then, in response to a request from the master device 8, the second communication unit 22 transmits to the master device 8 each data value of the machine data 26 linked with each data item of the address space 24. As a result, the master device 8 can normally receive each data value of the machine data 26, and can therefore determine that communication is normally performed between the master device 8 and the slave device 4, and between the slave device 4 and the machine 6.
[0049] On the other hand, when the first communication unit 16 cannot communicate with the machine 6, the control unit 18 constructs a minimum address space 28. Then, in response to a request from the master device 8, the second communication unit 22 transmits each data value of the fixed data 30 linked to each data item in the minimum address space 28 to the master device 8. In this way, the master device 8 can determine that communication between the slave device 4 and the machine 6 is not possible by receiving a smaller number of data values of the fixed data 30 than the data values of the machine data 26.
[0050] Furthermore, if the master device 8 requests the slave device 4 to transmit a data value but does not receive any data value from the slave device 4, it can determine that communication between the master device 8 and the slave device 4 is not possible.
[0051] As described above, in this embodiment, the communication failure can be detected in either the master device 8 and the slave device 4 or the slave device 4 and the machine 6 when troubleshooting communication.
[0052] (Embodiment 2) [2-1. Functional configuration of slave device] The functional configuration of the slave device 4A according to the second embodiment will be described with reference to Fig. 6. Fig. 6 is a block diagram showing the functional configuration of the slave device 4A according to the second embodiment. Note that in each of the following embodiments, the same components as those in the first embodiment are denoted by the same reference numerals, and the description thereof will be omitted.
[0053] As shown in Fig. 6, in the slave device 4A according to the second embodiment, the processing of the control unit 18A is different from the processing of the control unit 18 of the slave device 4 according to the first embodiment. Specifically, when the control unit 18A is able to communicate with the machine 6 after first being unable to communicate with the machine 6 and constructing a minimum address space 28 (see Fig. 4), and when the machine configuration information is acquired by the first communication unit 16 and the machine configuration information does not correspond to the minimum address space 28, the control unit 18A discards the minimum address space 28 and reconstructs the address space 24 (see Fig. 3). The discarding of the minimum address space 28 is executed, for example, by restarting a service (e.g., access to data, monitoring of alarms and events, etc.) conforming to the OPC UA standard in the slave device 4A.
[0054] [2-2. Slave device and machine operations] Each operation of the slave device 4A and the machine 6 according to the second embodiment will be described with reference to Fig. 7. Fig. 7 is a sequence diagram showing the flow of each operation of the slave device 4A and the machine 6 according to the second embodiment.
[0055] Hereinafter, a case will be described in which the machine 6 is not started when the slave device 4A is started, and the machine 6 is started when a predetermined time has elapsed since the slave device 4A was started.
[0056] As shown in Fig. 7, first, the first communication unit 16 of the slave device 4A transmits a request signal to the machine 6 in an inactive state to request transmission of machine configuration information (S201). At this time, the machine 6 is not activated and the first communication unit 16 is unable to communicate with the machine 6, so no response is received from the machine 6. When the first communication unit 16 is unable to communicate with the machine 6 in this manner, the control unit 18A constructs a minimum address space 28 (S202). Note that in the slave device 4A according to the second embodiment, even if the first communication unit 16 does not receive any response from the machine 6, the slave device 4A maintains its active state.
[0057] Next, the first communication unit 16 of the slave device 4A repeatedly transmits a request signal to the machine 6 to request transmission of machine configuration information until a response is received from the machine 6 (S203, S204).
[0058] Thereafter, the machine 6 is started up (S205), and the first communication unit 16 of the slave device 4A becomes capable of communicating with the started up machine 6. The first communication unit 16 transmits a request signal to the machine 6 to request transmission of machine configuration information (S206), and acquires the machine configuration information responded by the machine 6 (S207).
[0059] The control unit 18A of the slave device 4A compares the machine configuration information acquired by the first communication unit 16 with the minimum address space 28. For example, in each data item of the minimum address space 28 shown in FIG. 4, "Spindle 1" indicating the first movement axis of the machine 6 and "Spindle 2" indicating the second movement axis of the machine 6, which are included in the acquired machine configuration information, do not exist. In this case, the control unit 18A detects that the machine configuration information acquired by the first communication unit 16 does not correspond to the minimum address space 28 (S208). Then, the control unit 18A discards the minimum address space 28 by restarting the slave device 4A (restarting the service) (S209).
[0060] Next, the first communication unit 16 of the slave device 4A again transmits a request signal to the machine 6 to request transmission of machine configuration information (S210), and acquires the machine configuration information responded from the machine 6 (S211). The control unit 18A constructs the address space 24 based on the machine configuration information acquired by the first communication unit 16 (S212).
[0061] Next, the first communication unit 16 of the slave device 4A transmits a request signal to the machine 6 to request transmission of machine data 26 (see FIG. 3) (S213), and acquires the machine data 26 responded from the machine 6 (S214). The control unit 18A stores the machine data 26 acquired by the first communication unit 16 in the memory unit 20. At this time, the control unit 18A links each data value of the machine data 26 to each data item in the address space 24.
[0062] [2-3. Effects] As described above, when the machine 6 starts up after the control unit 18A constructs the minimum address space 28, the control unit 18A detects that the machine configuration information acquired by the first communication unit 16 does not correspond to the minimum address space 28. At this time, the control unit 18A discards the minimum address space 28 by automatically restarting the slave device 4A (restarting the service). This allows the control unit 18A to construct the address space 24 based on the machine configuration information acquired by the first communication unit 16 thereafter.
[0063] In the second embodiment, an example has been described in which the slave device 4A is unable to communicate with the machine 6 when the slave device 4A is started up because the machine 6 is not started up. However, the present invention is not limited to this example, and can also be applied to a case in which the communication line 10 (see FIG. 1) is restored from a state in which communication is temporarily impossible (for example, a state in which a wired cable is unplugged from a connection connector, etc.).
[0064] (Embodiment 3) [3-1. Functional configuration of slave device] A functional configuration of a slave device 4B according to the third embodiment will be described with reference to Fig. 8 and Fig. 9. Fig. 8 is a block diagram showing a functional configuration of a slave device 4B according to the third embodiment. Fig. 9 is a diagram showing an example of an address space 32 according to the third embodiment.
[0065] 8, in the slave device 4B according to the third embodiment, the first communication unit 16 can communicate with either the machine 6a or the machine 6b by switching the connection destination via the communication line 10 (see FIG. 1) between the machine 6a and the machine 6b. The configuration of the machine 6a is the same as the configuration of the machine 6 described in the first embodiment above, and therefore the description thereof will be omitted.
[0066] The machine 6b has a first movement axis, a second movement axis, a third movement axis, etc. for moving the machining tool relative to the workpiece along a first axial direction, a second axial direction, and a third axial direction, respectively.
[0067] Furthermore, the machine 6b transmits machine data 34 to the slave device 4B via the communication line 10. As shown in Fig. 9, the machine data 34 transmitted from the machine 6b includes, for example, a data value "ABC (Inc.)" indicating the manufacturer of the machine 6b, a data value "0002" indicating the serial number of the machine 6b, a data value "0150 (mm)" indicating the axis position of the first movement axis of the machine 6b, a data value "0250 (mm)" indicating the axis position of the second movement axis, and a data value "0100 (mm)" indicating the axis position of the third movement axis.
[0068] Furthermore, the machine 6b transmits machine configuration information indicating the configuration of the machine 6b to the slave device 4B via the communication line 10. The machine configuration information includes, for example, "Manufacture" indicating the manufacturer of the machine 6b, "Serial Number" indicating the serial number of the machine 6b, "Spindle 1" indicating the first movement axis of the machine 6b, "Spindle 2" indicating the second movement axis of the machine 6b, "Spindle 3" indicating the third movement axis of the machine 6b, etc. The machine configuration information is used when the slave device 4B constructs an address space 32 (described later).
[0069] In addition, in the slave device 4B according to the third embodiment, the processing of the control unit 18B is different from the processing of the control unit 18 and the control unit 18A in the first and second embodiments. Specifically, after constructing an address space 24 (see FIG. 3) based on the machine configuration information from the machine 6a acquired by the first communication unit 16, when the connection destination of the communication line 10 is switched from the machine 6a to the machine 6b and the machine data 34 from the machine 6b is acquired by the first communication unit 16, and the acquired machine data 34 and the address space 24 are not linked, the control unit 18B discards the address space 24. The discarding of the address space 24 can be executed, for example, by restarting the slave device 4B (restarting the service).
[0070] When the first communication unit 16 can communicate with the machine 6b, the control unit 18B constructs an address space 32 as shown in Fig. 9 based on the machine configuration information from the machine 6b acquired by the first communication unit 16. The address space 32 is information indicating a link relationship with the machine data 34, and is an example of first link information. As shown in Fig. 9, the address space 32 has a tree-like hierarchical structure having a group of data items related to the machine 6b in a lower hierarchy than the hierarchy of "Machine Tools", for example.
[0071] The data item group has, in a lower hierarchy than the data item "Machine" indicating the machine 6b, a data item "Identification" indicating the identification information of the machine 6b, etc. Furthermore, in a lower hierarchy than the data item "Identification", the data item group has, in a lower hierarchy than the data item "Identification", a data item "Manufacture" indicating the manufacturer of the machine 6b, a data item "Serial Number" indicating the serial number of the machine 6b, a data item "Spindle 1" indicating the axis position of the first movement axis of the machine 6b, a data item "Spindle 2" indicating the axis position of the second movement axis of the machine 6b, and a data item "Spindle 3" indicating the axis position of the third movement axis of the machine 6b, etc. Here, each data item in the address space 32 is constructed based on the machine configuration information.
[0072] In addition, the data values “ABC”, “0002”, “0150”, “0250”, and “0100” of the machine data 34 are linked to the data items “Manufacture”, “Serial Number”, “Spindle 1”, “Spindle 2”, and “Spindle 3” of the address space 32, respectively.
[0073] [3-2. Slave device and machine operations] The operations of the slave device 4B, the machine 6a, and the machine 6b according to the third embodiment will be described with reference to Fig. 10. Fig. 10 is a sequence diagram showing the flow of the operations of the slave device 4B, the machine 6a, and the machine 6b according to the third embodiment.
[0074] Hereinafter, a case will be described in which the first communication unit 16 and the machine 6a are connected via the communication line 10 when the slave device 4B is started, and then the connection destination of the first communication unit 16 is switched from the machine 6a to the machine 6b. In addition, in the third embodiment, it is assumed that the master device 8 (operated by the user 14) requests the machine 6a and the machine 6b to transmit machine data 26 (see FIG. 3) via the slave device 4B.
[0075] 10, first, the first communication unit 16 of the slave device 4B transmits a request signal to the machine 6a to request transmission of machine configuration information (S301), and acquires the machine configuration information responded from the machine 6a (S302). The control unit 18B constructs the address space 24 (see FIG. 3) based on the machine configuration information acquired by the first communication unit 16 (S303).
[0076] Next, the first communication unit 16 of the slave device 4B transmits a request signal to the machine 6a to request transmission of the machine data 26 (see FIG. 3) (S304), and acquires the machine data 26 responded from the machine 6a (S305). The control unit 18B stores the machine data 26 acquired by the first communication unit 16 in the storage unit 20. At this time, the control unit 18B links each data value of the machine data 26 to each data item in the address space 24.
[0077] Next, the connection between the first communication unit 16 and the machine 6a is cut off (S306), and the connection between the first communication unit 16 and the machine 6b is started (S307). That is, the connection destination of the first communication unit 16 is switched from the machine 6a to the machine 6b. Here, the switching is autonomously performed by the control unit 18B based on a request for transmission of the machine data 26 (see FIG. 3) from the slave device 4B to the machine 6b after the connection between the first communication unit 16 and the machine 6a is cut off (S306).
[0078] Next, the first communication unit 16 of the slave device 4B transmits a request signal to the machine 6b to request transmission of the machine data 34 (S308), and acquires the machine data 34 responded from the machine 6b (S309). The control unit 18B stores the machine data 34 acquired by the first communication unit 16 in the memory unit 20.
[0079] At this time, the control unit 18B attempts to link each data value of the machine data 34 with each data item of the address space 24. However, the data value "0100 (mm)" indicating the axis position of the third moving axis of the machine 6b, which is included in the machine data 34, is not linked to either of the data items "Spindle 1" and "Spindle 2" in the address space 24. Therefore, the control unit 18B detects that the machine data 34 and the address space 24 are not linked (S310). Then, the control unit 18B discards the address space 24 by automatically restarting the slave device 4B (restarting the service) (S311).
[0080] Next, the first communication unit 16 of the slave device 4B transmits a request signal to the machine 6b to request transmission of machine configuration information (S312), and acquires the machine configuration information responded from the machine 6b (S313). The control unit 18B constructs an address space 32 based on the machine configuration information acquired by the first communication unit 16 (S314).
[0081] Next, the first communication unit 16 of the slave device 4B transmits a request signal to the machine 6b to request transmission of the machine data 34 (S315), and acquires the machine data 34 responded from the machine 6b (S316). The control unit 18B stores the machine data 34 acquired by the first communication unit 16 in the memory unit 20. At this time, the control unit 18B links each data value of the machine data 34 to each data item in the address space 32.
[0082] [3-3. Effects] As described above, after constructing the address space 24 based on the machine configuration information from the machine 6a acquired by the first communication unit 16, if the connection destination of the first communication unit 16 is switched from the machine 6a to the machine 6b and the first communication unit 16 acquires machine data 34 from the machine 6b and the acquired machine data 34 is not linked to the address space 24, the control unit 18B discards the address space 24 by automatically restarting the slave device 4B (restarting the service).
[0083] This allows the control unit 18B to construct the address space 32 based on the machine configuration information from the machine 6b subsequently acquired by the first communication unit 16. By linking each data value of the machine data 34 with each data item of the address space 32, the master device 8 can receive the machine data 34 regarding the switched-over machine 6b.
[0084] (Other variations, etc.) Although the slave device of the present invention has been described above based on the above-mentioned embodiments, the present invention is not limited to the above-mentioned embodiments. The present invention also includes forms obtained by applying modifications to the above-mentioned embodiments that would come to mind by a person skilled in the art, and other forms realized by arbitrarily combining the components in the above-mentioned embodiments.
[0085] In the above embodiments, the master-slave communication protocol is OPCUA, but it is not limited thereto and may be any other master-slave communication protocol such as MTConnect. When the master-slave communication protocol is MTConnect, the first link information is device information. In this case, the second link information has "n.avail-" indicating the data reception status, and the fixed data linked to "n.avail-" of the second link information is "UNAVAILABLE" indicating that communication with the machine 6 (6a, 6b) is unavailable.
[0086] In the above embodiments, the machine 6 (6a, 6b) is a machine tool, but is not limited to this and may be, for example, various types of industrial machines such as industrial robots or measuring machines.
[0087] In each of the above embodiments, each component may be implemented by dedicated hardware or by executing a software program suitable for each component. Each component may be implemented by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory. [Industrial Applicability]
[0088] The present invention can be applied to, for example, a slave device that communicates with a machine and a master device according to a master-slave communication protocol. [Explanation of symbols]
[0089] 2. Communication Systems 4, 4A, 4B Slave device 6,6a,6b Machinery 8 Master Device 10. Communication Lines 12 Network 14 Users 16 First Communications Department 18, 18A, 18B Control section 20 Memory section 22 Second Communication Department 24,32 Address Space 26,34 Machine data 28 Minimum Address Space 30 Fixed Data
Claims
1. A slave device that communicates with each of a master device and a machine according to a master-slave communication protocol, a first communication unit that acquires data related to the machine and machine configuration information indicating a configuration of the machine from the machine; a control unit that, when the first communication unit is capable of communicating with the machine, constructs first link information indicating a link relationship with data related to the machine based on the machine configuration information acquired by the first communication unit, and, when the first communication unit is unable to communicate with the machine, constructs second link information indicating a link relationship with predetermined data; a second communication unit that transmits data linked to the first link information to the master device in response to a request from the master device when the first communication unit is capable of communicating with the machine, and transmits data linked to the second link information to the master device in response to a request from the master device when the first communication unit is unable to communicate with the machine. Slave device.
2. The control unit, when data related to the machine is acquired by the first communication unit after constructing the first link information, discards the first link information if the acquired data related to the machine is not linked to the first link information.
2. The slave device according to claim 1.
3. The control unit discards the second link information when the first communication unit becomes capable of communicating with the machine after constructing the second link information, and when the machine configuration information is acquired by the first communication unit and the acquired machine configuration information does not correspond to the second link information.
2. The slave device according to claim 1.
4. A method for controlling a slave device that communicates with a master device and a machine according to a master-slave communication protocol, comprising the steps of: (a) obtaining data relating to the machine from the machine; (b) acquiring machine configuration information from the machine, the machine configuration information indicating a configuration of the machine; (c) constructing first link information indicating a link relationship with data related to the machine based on the machine configuration information acquired in (b) when the slave device is capable of communicating with the machine, and constructing second link information indicating a link relationship with predetermined data when the slave device is unable to communicate with the machine; (d) transmitting data linked to the first link information to the master device in response to a request from the master device when the slave device is capable of communicating with the machine, and transmitting data linked to the second link information to the master device in response to a request from the master device when the slave device is unable to communicate with the machine. A method for controlling a slave device.
5. A method for controlling a slave device according to claim 4, program.
Citation Information
Patent Citations
Electronic apparatus
JP2017084143A
Relay communication system, relay station and relay method
JP2017098762A
Relay device, relay device control method and program
JP2021043853A
Systems and methods for an OPC UA server
US20140040431A1