TWI688248B - Communication control device - Google Patents

Communication control device Download PDF

Info

Publication number
TWI688248B
TWI688248B TW107141982A TW107141982A TWI688248B TW I688248 B TWI688248 B TW I688248B TW 107141982 A TW107141982 A TW 107141982A TW 107141982 A TW107141982 A TW 107141982A TW I688248 B TWI688248 B TW I688248B
Authority
TW
Taiwan
Prior art keywords
communication
data transmission
data
processing unit
information
Prior art date
Application number
TW107141982A
Other languages
Chinese (zh)
Other versions
TW201926974A (en
Inventor
茂中義典
前田智康
Original Assignee
日商阿自倍爾股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日商阿自倍爾股份有限公司 filed Critical 日商阿自倍爾股份有限公司
Publication of TW201926974A publication Critical patent/TW201926974A/en
Application granted granted Critical
Publication of TWI688248B publication Critical patent/TWI688248B/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/052Linking several PLC's
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/408Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by data handling or data format, e.g. reading, buffering or conversion of data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40228Modbus

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Programmable Controllers (AREA)
  • Small-Scale Networks (AREA)

Abstract

本發明的通信控制裝置(1a)包括:通信請求處理部(11),根據寫入請求資訊,製作將資料寫入至傳輸目的地的命令幀,並將命令幀發送至與可使用的連接相對應的PLC用通信處理部(10-1~10-n);通信請求處理部(13),根據讀出請求資訊,製作從傳輸源讀出資料的命令幀,並發送至與傳輸源相對應的調節計用通信處理部(12-1~12-m);以及資料傳輸處理部(14),製作針對資料傳輸定義部(15)的資料傳輸定義資訊中所定義的傳輸源的讀出請求資訊,當從傳輸源接收到讀出請求資訊中所請求的資料時,製作將所述資料寫入至資料傳輸定義資訊中所定義的傳輸目的地的寫入請求資訊。The communication control device (1a) of the present invention includes: a communication request processing section (11) that creates a command frame for writing data to a transmission destination based on the write request information, and sends the command frame to a connection with a usable connection Corresponding PLC communication processing unit (10-1~10-n); communication request processing unit (13), according to the read request information, create a command frame to read data from the transmission source, and send it to the corresponding transmission source The communication processing unit (12-1~12-m) for the adjustment meter; and the data transmission processing unit (14), making a read request for the transmission source defined in the data transmission definition information of the data transmission definition unit (15) Information, when receiving the data requested in the read request information from the transmission source, create write request information that writes the data to the transmission destination defined in the data transmission definition information.

Description

通信控制裝置Communication control device

本發明涉及一種實現上位裝置與下位裝置之間的資料傳輸的通信控制裝置。The invention relates to a communication control device that realizes data transmission between a higher-level device and a lower-level device.

當通過通信而將資料讀寫至可編程邏輯控制器(Programmable Logic Controller,以下稱為PLC)或溫度調節計(以下稱為調節計)等計量儀器時,具有如下的通信協議(protocol):經由專利文獻1所揭示的通信控制裝置,指定與設備內的參數(或暫存器(register))相關聯的資料位址,通過命令回應(command response)通信,而讀寫所述參數的值。作為這種通信協議,有專利文獻2所揭示的MODBUS(注冊商標),MC協定、控制器周邊連結(Controller Peripheral Link,CPL)等。When reading and writing data to a programmable logic controller (Programmable Logic Controller, hereinafter referred to as PLC) or a temperature regulator (hereinafter referred to as a regulator) through communication, it has the following communication protocol (protocol): The communication control device disclosed in Patent Document 1 specifies a data address associated with a parameter (or register) in the device, communicates through a command response, and reads and writes the value of the parameter. As such a communication protocol, there are MODBUS (registered trademark) disclosed in Patent Document 2, MC protocol, and Controller Peripheral Link (CPL).

圖13是說明專利文獻1所揭示的通信控制裝置的動作的圖。在圖13的示例中,通信控制裝置1是利用CPL從調節計3讀出資料,並利用MODBUS將讀出的資料寫入至PLC2。13 is a diagram illustrating the operation of the communication control device disclosed in Patent Document 1. FIG. In the example of FIG. 13, the communication control device 1 uses CPL to read data from the regulator 3 and uses MODBUS to write the read data to the PLC 2.

PLC2是作為主機設備而存在,在通過其指示而使各調節計3進行控制的系統中,各調節計3的資料(操作量MV或控制量PV的資料)是如上所述通過通信而讀出,並彙集在PLC2內。 在經由通信控制裝置1的PLC2與調節計3的通信中,現有是利用串列通信(serial communication)。在串列通信的情況下,如圖14所示,針對一個物理埠(COM埠)通過命令回應而讀出資料的調節計3的台數是一台。PLC2 exists as a host device, and in a system in which each regulator 3 is controlled by its instruction, the data of each regulator 3 (the data of the operation amount MV or the control amount PV) is read through communication as described above , And put together in PLC2. In the communication between the PLC 2 and the regulator 3 via the communication control device 1, serial communication has been used conventionally. In the case of serial communication, as shown in FIG. 14, the number of regulators 3 for one physical port (COM port) to read data by command response is one.

在近年來增多的利用Ethernet(乙太網)(注冊商標)等局域網(Local Area Network,LAN)的網際協議(Internet protocol,IP)通信的情況下,如圖15所示,能夠從存在於相同的LAN4上的多個調節計3並行地通過命令回應而大量且高速地讀出資料。通信控制裝置1向PLC2傳輸資料的每單位時間的資料量與調節計3的連接台數成正比。通信控制裝置1與PLC2的能夠通過命令回應而收發的資料數有限,當超過一次能夠交換的資料數時,必須分成多個通信幀5-1、通信幀5-2、……而收發資料,當無法並行處理時,則必須一邊等待每個通信幀的命令回應,一邊依次進行處理。In the case of Internet Protocol (IP) communication using a local area network (LAN) such as Ethernet (registered trademark), which has increased in recent years, as shown in FIG. A plurality of regulators 3 on the LAN 4 of the system read out data in large quantities and at high speeds in response to commands in parallel. The amount of data per unit time when the communication control device 1 transmits data to the PLC 2 is proportional to the number of connected controllers 3. The number of data that the communication control device 1 and the PLC 2 can send and receive through command response is limited. When the number of data that can be exchanged exceeds one time, it must be divided into multiple communication frames 5-1, communication frames 5-2, ... When it cannot be processed in parallel, it must be processed sequentially while waiting for the command response of each communication frame.

關於通信控制裝置1及PLC2的每單位時間的通信量,在串列通信的情況下,即使調節計3的連接台數增加,也會因為物理上的通訊連接埠的數量的制約而無大的變化,而在IP通信的情況下,通信控制裝置1與PLC2的通信量則與調節計3的連接台數成正比地增加。其結果為,在利用大量的調節計3的系統中,存在通信控制裝置1與PLC2的通信成為瓶頸(bottleneck)的問題。Regarding the communication volume per unit time of the communication control device 1 and PLC2, in the case of serial communication, even if the number of connected controllers 3 increases, it will not be greatly affected by the number of physical communication ports. In the case of IP communication, the communication volume between the communication control device 1 and the PLC 2 increases in proportion to the number of connected controllers 3. As a result, in a system using a large number of regulators 3, there is a problem that the communication between the communication control device 1 and the PLC 2 becomes a bottleneck.

作為這種問題的一個解決方法,有如下的方法:在通信控制裝置1與PLC2的通信中,在命令回應處理中不等待回應而並行發送命令。例如,只要是MODBUS/傳輸控制協議(Transmission Control Protocol,TCP)等具備幀編號(幀識別標識(identity,ID))的功能的通信協議,就可以一次發送多個命令。As a solution to this problem, there is the following method: In the communication between the communication control device 1 and the PLC 2, the command is sent in parallel without waiting for a response in the command response process. For example, as long as it is a communication protocol such as MODBUS/Transmission Control Protocol (TCP) with a frame number (frame identification (ID)) function, multiple commands can be sent at once.

但是,能夠並存執行的數量受到通信協定或設備固有的規格制約。如果超過PLC2的處理能力而發送命令,就存在TCP的重發處理會多次發生而導致整體性能下降的情況。 並且,還存在不具備幀編號的功能的通信協議。當利用這種通信協議時,有可能因為重發處理等而使得幀的順序調換,因此無法並存執行多個命令回應處理。 [現有技術文獻] [專利文獻]However, the number of concurrent executions is limited by the communication protocol or the device-specific specifications. If the command exceeds PLC2's processing power and a command is sent, TCP retransmission processing may occur multiple times, resulting in a decrease in overall performance. Also, there are communication protocols that do not have the function of frame numbers. When such a communication protocol is used, there is a possibility that the order of frames may be changed due to retransmission processing, etc., so it is impossible to execute multiple command response processes concurrently. [Prior Art Literature] [Patent Literature]

[專利文獻1]日本專利特開2017-34433號公報 [專利文獻2]日本專利特開2011-234171號公報[Patent Document 1] Japanese Patent Laid-Open No. 2017-34433 [Patent Document 2] Japanese Patent Laid-Open No. 2011-234171

[發明所要解決的問題] 本發明是為了解決所述問題而成的,目的在於提供一種通信控制裝置,即使在調節計等下位裝置的連接數增加的情況下,也能夠不受通信協議的制約而實現上位裝置與下位裝置之間的高效率的資料傳輸。 [解決問題的技術手段][Problems to be Solved by the Invention] The present invention is made to solve the above-mentioned problems, and an object of the present invention is to provide a communication control device that can be free from the restriction of communication protocols even when the number of connections of lower devices such as regulators increases And realize high-efficiency data transmission between the upper device and the lower device. [Technical means to solve the problem]

本發明的通信控制裝置的特徵在於包括:多個第一通信處理部,針對多個下位裝置的各個而設置,以與相對應的下位裝置進行通信的方式而構成;多個第二通信處理部,針對與上位裝置之間設定的多個連接(connection)的各個而設置,以經由相對應的連接與所述上位裝置進行通信的方式而構成;資料傳輸定義部,以預先儲存資料傳輸定義資訊的方式而構成;資料傳輸處理部,以如下的方式而構成:製作針對所述資料傳輸定義資訊中所定義的傳輸源的下位裝置的讀出請求資訊,當從所述傳輸源接收到所述讀出請求資訊中所請求的資料時,製作將接收到的所述資料寫入至所述資料傳輸定義資訊中所定義的傳輸目的地的上位裝置的寫入請求資訊;第一通信請求處理部,以如下的方式而構成:根據所述讀出請求資訊,製作從所述傳輸源讀出資料的第一命令幀(command frame),並發送至與所述傳輸源相對應的所述第一通信處理部,當所述第一通信處理部從所述傳輸源接收到第一回應幀時,從所述第一回應幀取出所述讀出請求資訊中所請求的資料並發送至所述資料傳輸處理部;以及第二通信請求處理部,以如下的方式而構成:當在所述多個連接中存在可使用的連接時,根據所述寫入請求資訊,製作將資料寫入至所述傳輸目的地的第二命令幀,並將所述第二命令幀發送至與所述可使用的連接相對應的所述第二通信處理部,當所述第二通信處理部從所述傳輸目的地接收到第二回應幀時,將所述第二回應幀所表示的結果通知給所述資料傳輸處理部。The communication control device of the present invention is characterized by including: a plurality of first communication processing sections, which are provided for each of the plurality of lower-level devices, and configured to communicate with the corresponding lower-level devices; and a plurality of second communication processing sections , For each of the multiple connections set up with the higher-level device, configured to communicate with the higher-level device via the corresponding connection; the data transmission definition section stores data transmission definition information in advance The data transmission processing unit is configured in such a manner as to produce read request information for the lower-level device of the transmission source defined in the data transmission definition information, and when the transmission source receives the When reading out the data requested in the request information, create write request information that writes the received data to the higher-level device of the transmission destination defined in the data transmission definition information; the first communication request processing unit , Constructed in the following manner: according to the read request information, a first command frame (data command frame) for reading data from the transmission source is created and sent to the first corresponding to the transmission source The communication processing section, when the first communication processing section receives the first response frame from the transmission source, takes out the data requested in the read request information from the first response frame and sends it to the data A transmission processing section; and a second communication request processing section configured in such a way that when there is a usable connection among the plurality of connections, according to the write request information, a data is written to the Transfer the second command frame of the destination, and send the second command frame to the second communication processing section corresponding to the usable connection, when the second communication processing section When the second response frame is received, the data transmission processing unit is notified of the result indicated by the second response frame.

並且,本發明的通信控制裝置的特徵在於包括:多個第一通信處理部,針對與上位裝置之間設定的多個連接的各個而設置,以經由相對應的連接與所述上位裝置進行通信的方式而構成;多個第二通信處理部,針對多個下位裝置的各個而設置,以與相對應的下位裝置進行通信的方式而構成;資料傳輸定義部,以預先儲存資料傳輸定義資訊的方式而構成;資料傳輸處理部,以如下的方式而構成:製作針對所述資料傳輸定義資訊中所定義的傳輸源的上位裝置的讀出請求資訊,當從所述傳輸源接收到所述讀出請求資訊中所請求的資料時,製作將接收到的所述資料寫入至所述資料傳輸定義資訊中所定義的傳輸目的地的下位裝置的寫入請求資訊;第一通信請求處理部,以如下的方式而構成:當在所述多個連接中存在可使用的連接時,根據所述讀出請求資訊,製作從所述傳輸源讀出資料的第一命令幀,並發送至與所述傳輸源相對應的所述第一通信處理部,當所述第一通信處理部從所述傳輸源接收到第一回應幀時,從所述第一回應幀取出所述讀出請求資訊中所請求的資料並發送至所述資料傳輸處理部;以及第二通信請求處理部,以如下的方式而構成:根據所述寫入請求資訊,製作將資料寫入至所述傳輸目的地的第二命令幀,並發送至與所述傳輸目的地相對應的所述第二通信處理部,當所述第二通信處理部從所述傳輸目的地接收到第二回應幀時,將所述第二回應幀所表示的結果通知給所述資料傳輸處理部。In addition, the communication control device of the present invention is characterized by including a plurality of first communication processing sections provided for each of the plurality of connections set with the higher-level device to communicate with the higher-level device via the corresponding connection The second communication processing unit is provided for each of the lower-level devices, and is configured to communicate with the corresponding lower-level device; the data transmission definition unit stores data transmission definition information in advance The data transmission processing unit is configured in such a manner as to create read request information for the higher-level device of the transmission source defined in the data transmission definition information, and when the read is received from the transmission source When the data requested in the request information is generated, write request information for writing the received data to the lower-level device of the transmission destination defined in the data transmission definition information is prepared; the first communication request processing section, It is structured as follows: When there is a usable connection among the plurality of connections, according to the read request information, a first command frame for reading data from the transmission source is made and sent to the The first communication processing section corresponding to the transmission source, when the first communication processing section receives the first response frame from the transmission source, extracts the read request information from the first response frame The requested data is sent to the data transmission processing section; and the second communication request processing section is configured in the following manner: according to the write request information, a data written to the transmission destination is created Two command frames and send them to the second communication processing section corresponding to the transmission destination, when the second communication processing section receives the second response frame from the transmission destination, the The result indicated by the second response frame is notified to the data transmission processing section.

並且,在本發明的通信控制裝置的一個構成例中,其特徵在於,所述資料傳輸定義資訊一併地包含所述傳輸源的資訊、所述傳輸目的地的資訊及資料傳輸的啟動條件,並設定有資料傳輸的週期,作為所述啟動條件。 並且,在本發明的通信控制裝置的一個構成例中,其特徵在於,所述資料傳輸定義資訊一併地包含所述傳輸源的資訊、所述傳輸目的地的資訊及資料傳輸的啟動條件,並設定有觸發資訊,作為所述啟動條件。 並且,本發明的通信控制裝置的一個構成例的特徵在於,在所述上位裝置的一個通訊連接埠上設定有所述多個連接。 並且,本發明的通信控制裝置的一個構成例的特徵在於,在所述上位裝置的多個通訊連接埠上各設定有一個所述連接。 [發明的效果]Furthermore, in a configuration example of the communication control device of the present invention, the data transmission definition information includes the information of the transmission source, the information of the transmission destination, and the conditions for starting the data transmission. And set the data transmission cycle as the start condition. Furthermore, in a configuration example of the communication control device of the present invention, the data transmission definition information includes the information of the transmission source, the information of the transmission destination, and the conditions for starting the data transmission. And the trigger information is set as the starting condition. Furthermore, a configuration example of the communication control device of the present invention is characterized in that the plurality of connections are set on one communication port of the higher-level device. Furthermore, one configuration example of the communication control device of the present invention is characterized in that one of the connections is set on each of the plurality of communication ports of the higher-level device. [Effect of invention]

根據本發明,通過在通信控制裝置與上位裝置之間設定多個連接而進行通信,可將多個命令幀經由多個連接並行發送至上位元裝置,因此即使在下位裝置的連接數增加的情況下,也能夠不受通信協議的制約而實現上位裝置與下位裝置之間的高效率的資料傳輸。According to the present invention, by setting multiple connections between the communication control device and the higher-level device for communication, multiple command frames can be sent to the higher-level device in parallel via the multiple connections, so even when the number of connections of the lower-level device increases In addition, high-efficiency data transmission between the higher-level device and the lower-level device can be achieved without being restricted by the communication protocol.

[發明的原理] 圖1是說明本發明的原理的圖。在與PLC進行通信時,即使在可利用的通信協議是無法並存執行命令的協定的情況下,也存在作為PLC的規格,能夠在一個TCP通訊連接埠上確立多個連接的情況。並且,即使在只允許單一連接的情況下,也存在能夠同時使用多個TCP通訊連接埠的情況。這些PLC的規格是設想將多個設備(觸控面板或電腦等)連接至PLC的規格。[Principle of Invention] FIG. 1 is a diagram illustrating the principle of the present invention. When communicating with a PLC, even if the available communication protocol is a protocol that cannot coexist to execute commands, there may be multiple specifications that can be established on one TCP communication port as the specifications of the PLC. Also, even when only a single connection is allowed, there may be cases where multiple TCP communication ports can be used simultaneously. The specifications of these PLCs are assumed to connect multiple devices (touch panel, computer, etc.) to the PLC.

在本發明中,通過利用能夠與PLC之間同時確立多個連接的技術,通信控制裝置1a對多個連接並存執行命令回應處理,來刪除來自PLC的回應等待所造成的浪費時間。In the present invention, by using a technology capable of establishing multiple connections with the PLC at the same time, the communication control device 1a executes command response processing on the multiple connections in parallel to delete the wasted time caused by the response waiting from the PLC.

[第一實施例] 以下,參照圖式對本發明的實施例進行說明。圖2是表示本發明的第一實施例的通信控制裝置1a的構成的框圖。通信控制裝置1a包括:n個PLC用通信處理部10-1~PLC用通信處理部10-n(n為2以上的整數),經由乙太網等網路與PLC2連接,針對與PLC2之間所設定的多個連接的各個而設置,經由相對應的連接與PLC2進行通信;通信請求處理部11,根據來自後述資料傳輸處理部的寫入請求資訊,製作對傳輸目的地寫入資料的命令幀,將命令幀發送至與可使用的連接相對應的PLC用通信處理部10-1~PLC用通信處理部10-n,當PLC用通信處理部10-1~PLC用通信處理部10-n接收到回應幀時,將所述回應幀所表示的結果通知給資料傳輸處理部;m個調節計用通信處理部12-1~調節計用通信處理部12-m(m為2以上的整數),針對每個調節計3-1~調節計3-m而設置,經由乙太網等網路與調節計3-1~調節計3-m連接;通信請求處理部13,根據來自資料傳輸處理部的讀出請求資訊,製作從傳輸源讀出資料的命令幀,並發送至與傳輸源相對應的調節計用通信處理部12-1~調節計用通信處理部12-m,當調節計用通信處理部12-1~調節計用通信處理部12-m接收到回應幀時,從回應幀取出讀出請求資訊中所請求的資料並發送至資料傳輸處理部;資料傳輸處理部14,製作針對資料傳輸定義資訊中所定義的傳輸源的讀出請求資訊,當從傳輸源接收到所述讀出請求資訊中所請求的資料時,製作將接收到的所述資料寫入至資料傳輸定義資訊中所定義的傳輸目的地的寫入請求資訊;以及資料傳輸定義部15,預先儲存包含傳輸源的資訊、傳輸目的地的資訊及資料傳輸的啟動條件的資料傳輸定義資訊。[First Embodiment] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. 2 is a block diagram showing the configuration of the communication control device 1a according to the first embodiment of the present invention. The communication control device 1a includes: n PLC communication processing sections 10-1 to PLC communication processing sections 10-n (n is an integer of 2 or more), and is connected to PLC2 via a network such as Ethernet, and is aimed at Each of the set multiple connections is provided to communicate with the PLC 2 via the corresponding connection; the communication request processing unit 11 creates a command to write data to the transmission destination based on write request information from a data transmission processing unit described later Frame, the command frame is sent to the communication processing unit for PLC 10-1 to the communication processing unit for PLC 10-n corresponding to the available connection, when the communication processing unit for PLC 10-1 to the communication processing unit for PLC 10- n When the response frame is received, notify the data transmission processing section of the result represented by the response frame; m communication processing sections for adjustment meter 12-1 to communication processing sections for adjustment meter 12-m (m is 2 or more Integer), set for each regulator 3-1 to 3-m, and connected to the regulator 3-1 to 3-m via a network such as Ethernet; the communication request processing unit 13 is based on data from The transmission processing unit reads out the request information, creates a command frame for reading the data from the transmission source, and sends it to the communication communication processing unit 12-1 to the communication communication processing unit 12-m corresponding to the transmission source, when When receiving the response frame, the communication processing unit 12-1 for the adjustment meter 12-m for the adjustment meter takes out the data requested in the read request information from the response frame and sends it to the data transmission processing unit; the data transmission processing unit 14. Produce readout request information for the transmission source defined in the data transmission definition information. When receiving the data requested in the readout request information from the transmission source, write the received data to The write request information of the transmission destination defined in the data transmission definition information; and the data transmission definition section 15 pre-stores the data transmission definition information including the information of the transmission source, the information of the transmission destination, and the start condition of the data transmission.

在本實施例中,說明如下的情況:如圖3所示,作為PLC2的規格,允許在一個TCP通訊連接埠200上確立多個連接Pcon-1~連接Pcon-n。圖3中的100-1~100-n分別是通信控制裝置1a的PLC用通信處理部10-1~PLC用通信處理部10-n中所設定的TCP通訊連接埠,101-1~101-m分別是通信控制裝置1a的調節計用通信處理部12-1~調節計用通信處理部12-m中所設定的TCP通訊連接埠,300-1~300-m分別是調節計3-1~調節計3-m的TCP通訊連接埠,Ccon-1~Ccon-m是在TCP通訊連接埠101-1~TCP通訊連接埠101-m與TCP通訊連接埠300-1~TCP通訊連接埠300-m之間所設定的連接。In this embodiment, the following case will be described: As shown in FIG. 3, as a specification of PLC2, it is allowed to establish a plurality of connections Pcon-1 to Pcon-n on one TCP communication port 200. 100-1 to 100-n in FIG. 3 are the TCP communication ports set in the PLC communication processing section 10-1 to the PLC communication processing section 10-n of the communication control device 1a, and 101-1 to 101- m is respectively the TCP communication port set in the communication processing part 12-1 for an adjustment meter of the communication control apparatus 1a-the communication processing part 12-m for an adjustment, 300-1 to 300-m is the adjustment meter 3-1, respectively ~Adjust 3-m TCP communication port, Ccon-1~Ccon-m is in TCP communication port 101-1~TCP communication port 101-m and TCP communication port 300-1~TCP communication port 300 The connection set between -m.

在資料傳輸定義部15中,預先儲存著如表1所示的資料傳輸定義資訊。資料傳輸定義資訊包括資料傳輸的啟動條件、資料傳輸源的位址資訊(在本實施例為調節計3-1~調節計3-m的監視點或指定資料的位址)、以及資料傳輸目的地的位址資訊(在本實施例中為PLC2的暫存器的位址)。

Figure 02_image001
表1In the data transmission definition unit 15, the data transmission definition information shown in Table 1 is stored in advance. The data transmission definition information includes the start condition of the data transmission, the address information of the data transmission source (in this embodiment, the monitoring point of the regulator 3-1 to the regulator 3-m or the address of the designated data), and the purpose of the data transmission The address information of the ground (in this embodiment, the address of the register of PLC2).
Figure 02_image001
Table 1

在表1的示例中,是將資料傳輸的週期定義為資料傳輸的啟動條件,並且知道每隔200msec就進行資料傳輸。這種資料傳輸定義資訊是由通信控制裝置1a的使用者預先登錄的。In the example of Table 1, the period of data transmission is defined as the starting condition of data transmission, and it is known that data transmission is performed every 200 msec. Such data transmission definition information is registered in advance by the user of the communication control device 1a.

圖4是說明本實施例的通信控制裝置1a的資料傳輸處理部14的動作的流程圖,圖5是說明通信請求處理部13及調節計用通信處理部12-1~調節計用通信處理部12-m的動作的流程圖,圖6是說明通信請求處理部11及PLC用通信處理部10-1~PLC用通信處理部10-n的動作的流程圖。4 is a flowchart illustrating the operation of the data transmission processing unit 14 of the communication control device 1a of the present embodiment, and FIG. 5 is a diagram illustrating the communication request processing unit 13 and the communication processing unit 12-1 for the adjustment meter to the communication processing unit for the adjustment meter A flowchart of the operation of 12-m. FIG. 6 is a flowchart illustrating the operations of the communication request processing unit 11 and the communication processing unit for PLC 10-1 to the communication processing unit for PLC 10-n.

資料傳輸處理部14進行待機,直到資料傳輸定義部15的資料傳輸定義資訊中所定義的啟動條件成立為止。 資料傳輸處理部14在到達應實施資料傳輸的時序(timing),啟動條件成立時(在圖4步驟S100中為是),基於資料傳輸定義資訊中所定義的傳輸源位址資訊,製作用於從資料傳輸源讀出資料的讀出請求資訊(圖4步驟S101)。在讀出請求資訊中,包含傳輸源位址資訊。The data transmission processing unit 14 stands by until the activation condition defined in the data transmission definition information of the data transmission definition unit 15 is satisfied. When the timing at which the data transmission should be carried out is reached and the start-up condition is satisfied (Yes in step S100 in FIG. 4), the data transmission processing unit 14 creates the data for transmission source address information defined in the data transmission definition information. Read the request information of the data from the data transmission source (step S101 in FIG. 4). The read request information includes the transmission source address information.

然後,資料傳輸處理部14將所製作的讀出請求資訊,發送至與資料傳輸定義資訊中所定義的資料傳輸源相對應的通信請求處理部(在本實施例中為通信請求處理部13)(圖4步驟S102)。 資料傳輸處理部14反復進行步驟S101、步驟S102的處理,直到針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組,讀出請求資訊的發送結束為止(在圖4步驟S103中為是)。Then, the data transmission processing section 14 sends the created read request information to the communication request processing section (in this embodiment, the communication request processing section 13) corresponding to the data transmission source defined in the data transmission definition information (Step S102 in FIG. 4). The data transmission processing unit 14 repeats the processes of step S101 and step S102 until the transmission of the read request information is completed for all groups of the data transmission source and the data transmission destination defined in the data transmission definition information (in FIG. 4 Yes in step S103).

其次,通信請求處理部13在接收到來自資料傳輸處理部14的讀出請求資訊時(在圖5步驟S200中為是),進行將接收到的讀出請求資訊保存至內部的通信請求佇列(requestqueue)(未圖示)的通信請求佇列處理(圖5步驟S201)。Next, when receiving the read request information from the data transmission processing unit 14 (YES in step S200 of FIG. 5), the communication request processing unit 13 performs a communication request queue for storing the received read request information in the internal (Requestqueue) (not shown) communication request queue processing (step S201 in FIG. 5).

接著,通信請求處理部13在通信請求佇列中保存有未處理的讀出請求資訊時(在圖5步驟S202中為是),將未處理的讀出請求資訊作為處理物件,判定與所述讀出請求資訊中所含的傳輸源位址資訊中所特定的資料傳輸源的調節計3(3-1~3-m)之間是否處於通信處理中(圖5步驟S203)。Next, when the communication request processing unit 13 stores the unprocessed read request information in the communication request queue (Yes in step S202 of FIG. 5), the unprocessed read request information is used as the processing object, and the It is read out whether or not the communication controller 3 (3-1 to 3-m) of the data transmission source specified in the transmission source address information included in the request information is in communication processing (step S203 in FIG. 5).

通信請求處理部13在與資料傳輸源之間不處於通信處理中時(在步驟S203中為否),基於處理物件的讀出請求資訊,製作用於從資料傳輸源讀出資料的命令幀(圖5步驟S204)。在命令幀中,包含傳輸源位址資訊。When the communication request processing unit 13 is not in communication processing with the data transmission source (NO in step S203), based on the read request information of the processing object, it creates a command frame for reading out the data from the data transmission source ( (Step S204 in FIG. 5). The command frame contains the transmission source address information.

然後,通信請求處理部13將所製作的命令幀發送至與資料傳輸源(在本實施例中為調節計)相對應的調節計用通信處理部12(12-1~12-m)。調節計用通信處理部12(12-1~12-m)將接收到的命令幀,經由與資料傳輸源之間設定的連接Ccon(Ccon-1~Ccon-m)而發送至資料傳輸源的調節計3(3-1~3-m)(圖5步驟S205)。Then, the communication request processing unit 13 transmits the created command frame to the communication processing unit 12 (12-1 to 12-m) for the adjustment meter corresponding to the data transmission source (in this embodiment, the adjustment meter). The communication processing unit 12 for regulators (12-1 to 12-m) sends the received command frame to the data transmission source via the connection Ccon (Ccon-1 to Ccon-m) set with the data transmission source Regulator 3 (3-1 to 3-m) (step S205 in FIG. 5).

調節計3(3-1~3-m)在接收到命令幀時,從內部的記憶體獲取接收到的命令幀中所含的傳輸源位址資訊中所指定的資料,製作包含所述資料的回應幀。然後,調節計3(3-1~3-m)將所製作的回應幀,經由與命令幀的發送源的通信控制裝置1a之間設定的連接Ccon(Ccon-1~Ccon-m)而發送至通信控制裝置1a。Regulator 3 (3-1 to 3-m), when receiving the command frame, acquires the data specified in the transmission source address information contained in the received command frame from the internal memory, and prepares to include the data Response frame. Then, the regulator 3 (3-1 to 3-m) transmits the created response frame via the connection Ccon (Ccon-1 to Ccon-m) set with the communication control device 1a of the transmission source of the command frame To the communication control device 1a.

已發送命令幀的通信控制裝置1a的調節計用通信處理部12(12-1~12-m)在從調節計3(3-1~3-m)接收到針對所述命令幀的回應幀時(在圖5步驟S206中為是),將接收到的回應幀發送至通信請求處理部13。The communication processing unit 12 (12-1 to 12-m) of the communication controller 1a of the communication control device 1a that has transmitted the command frame receives the response frame for the command frame from the adjustment meter 3 (3-1 to 3-m) When (YES in step S206 in FIG. 5 ), the received response frame is sent to the communication request processing unit 13.

通信請求處理部13對回應幀進行分析,從回應幀取出從資料傳輸源的調節計3(3-1~3-m)發送的資料(圖5步驟S207)。通信請求處理部13將從回應幀取出的資料,作為處理物件的讀出請求資訊中所請求的結果而發送至資料傳輸處理部14(圖5步驟S208)。The communication request processing unit 13 analyzes the response frame, and takes out the data sent from the regulator 3 (3-1 to 3-m) of the data transmission source from the response frame (step S207 in FIG. 5). The communication request processing unit 13 sends the data extracted from the response frame to the data transmission processing unit 14 as a result of the read request information of the processing object (step S208 in FIG. 5 ).

然後,通信請求處理部13在將處理物件的讀出請求資訊中所請求的結果發送至資料傳輸處理部14之後,從內部的通信請求佇列刪除所述讀出請求資訊(圖5步驟S209),並返回至步驟S200。Then, after sending the result requested in the read request information of the processing object to the data transmission processing unit 14, the communication request processing unit 13 deletes the read request information from the internal communication request queue (step S209 in FIG. 5) And return to step S200.

其次,資料傳輸處理部14在從通信請求處理部13接收到讀出請求資訊中所請求的結果時(在圖4步驟S104中為是),基於成為製作所述讀出請求資訊的原始資訊的資料傳輸定義資訊中所定義的傳輸目的地位址資訊,製作用於將資料寫入至資料傳輸目的地的寫入請求資訊(圖4步驟S105)。在寫入請求資訊中,包含傳輸目的地位址資訊、以及從資料傳輸源的調節計3(3-1~3-m)發送的資料。Next, when the data transmission processing unit 14 receives the result requested in the read request information from the communication request processing unit 13 (Yes in step S104 of FIG. 4), it is based on The transmission destination address information defined in the data transmission definition information creates write request information for writing data to the data transmission destination (step S105 in FIG. 4). The write request information includes the transmission destination address information and the data sent from the regulator 3 (3-1 to 3-m) of the data transmission source.

然後,資料傳輸處理部14將所製作的寫入請求資訊,發送至與資料傳輸定義資訊中所定義的資料傳輸目的地相對應的通信請求處理部(在本實施例中為通信請求處理部11)(圖4步驟S106)。Then, the data transmission processing section 14 sends the created write request information to the communication request processing section (in this embodiment, the communication request processing section 11) corresponding to the data transmission destination defined in the data transmission definition information ) (Step S106 in FIG. 4 ).

其次,通信請求處理部11在接收到來自資料傳輸處理部14的寫入請求資訊時(在圖6步驟S300中為是),進行將接收到的寫入請求資訊保存至內部的通信請求佇列(未圖示)的通信請求佇列處理(圖6步驟S301)。Next, when receiving the write request information from the data transfer processing unit 14 (YES in step S300 of FIG. 6), the communication request processing unit 11 performs a communication request queue for storing the received write request information in the internal (Not shown) communication request queue processing (step S301 in FIG. 6).

接著,通信請求處理部11在通信請求佇列中保存有未處理的寫入請求資訊時(在圖6步驟S302中為是),將未處理的寫入請求資訊作為處理物件,判定與所述寫入請求資訊中所含的傳輸目的地位址資訊中所特定的資料傳輸目的地(在本實施例中為PLC2)之間是否處於通信處理中(圖6步驟S303)。Next, when the communication request processing section 11 stores unprocessed write request information in the communication request queue (Yes in step S302 in FIG. 6), the unprocessed write request information is used as the processing object, and the Whether the data transmission destination (PLC2 in this embodiment) specified in the transmission destination address information included in the write request information is in communication processing (step S303 in FIG. 6).

在本實施例中,在通信控制裝置1a與PLC2之間設定有多個連接Pcon-1~連接Pcon-n,因此當使用所有的連接Pcon-1~連接Pcon-n時,會成為處於通信處理中這一判定結果,當連接Pcon-1~連接Pcon-n之中至少一個連接未使用時,則成為不處於通信處理中這一判定結果。In this embodiment, a plurality of connections Pcon-1 to Pcon-n are set between the communication control device 1a and the PLC 2, so when all the connections Pcon-1 to Pcon-n are used, it becomes in communication processing The result of this determination is that when at least one of the connection Pcon-1 to the connection Pcon-n is not in use, it becomes a determination result that it is not in communication processing.

通信請求處理部11在與資料傳輸目的地之間不處於通信處理中時,即在多個連接Pcon-1~連接Pcon-n中存在可使用的連接時(在步驟S303中為否),基於處理物件的寫入請求資訊,製作用於對資料傳輸目的地寫入資料的命令幀(圖6步驟S304)。在命令幀中,包含傳輸目的地位址資訊、以及從資料傳輸源的調節計3(3-1~3-m)發送的資料。When the communication request processing unit 11 is not in communication processing with the data transmission destination, that is, when there is a usable connection among the plurality of connections Pcon-1 to Pcon-n (NO in step S303), based on The write request information of the object is processed to create a command frame for writing data to the data transmission destination (step S304 in FIG. 6). The command frame contains the transmission destination address information and the data sent from the regulator 3 (3-1 to 3-m) of the data transmission source.

然後,通信請求處理部11將所製作的命令幀,發送至與資料傳輸目的地(在本實施例中為PLC2)之間設定的多個連接Pcon-1~連接Pcon-n之中可使用的連接所對應的PLC用通信處理部10(10-1~10-n)。PLC用通信處理部10(10-1~10-n)經由相對應的連接Pcon(Pcon-1~Pcon-n)將命令幀發送至資料傳輸目的地的PLC2(圖6步驟S305)。Then, the communication request processing unit 11 sends the created command frame to the plurality of connections Pcon-1 to Pcon-n usable among the plurality of connections Pcon-1 to Pcon-n set with the data transmission destination (PLC2 in this embodiment) The communication processing section 10 for PLC (10-1 to 10-n) corresponding to the connection. The communication processing unit 10 for PLC (10-1 to 10-n) transmits a command frame to the PLC 2 of the data transmission destination via the corresponding connection Pcon (Pcon-1 to Pcon-n) (step S305 in FIG. 6).

PLC2在接收到命令幀時,利用接收到命令幀的連接Pcon(Pcon-1~Pcon-n),將表示已接收到命令幀的回應幀發回至通信控制裝置1a。並且,PLC2將所述命令幀中所含的資料寫入至接收到的命令幀中所含的傳輸目的地位址資訊中所指定的暫存器。 這樣,可以將調節計3(3-1~3-m)的資料傳輸至PLC2。When PLC2 receives the command frame, it uses the connection Pcon (Pcon-1 to Pcon-n) that received the command frame to send a response frame indicating that the command frame has been received back to the communication control device 1a. And, PLC2 writes the data contained in the command frame to the temporary register specified in the transmission destination address information contained in the received command frame. In this way, the data of regulator 3 (3-1~3-m) can be transferred to PLC2.

已發送命令幀的通信控制裝置1a的PLC用通信處理部10(10-1~10-n)在從PLC2接收到針對所述命令幀的回應幀時(在圖6步驟S306中為是),將接收到的回應幀發送至通信請求處理部11。The PLC communication processing unit 10 (10-1 to 10-n) of the communication control device 1a that has transmitted the command frame receives a response frame for the command frame from the PLC 2 (YES in step S306 in FIG. 6), The received response frame is sent to the communication request processing section 11.

通信請求處理部11對回應幀進行分析(圖6步驟S307),當確認資料傳輸目的地的PLC2接收到命令幀時,將表示處理物件的寫入請求資訊中所請求的處理已結束的資訊,作為處理物件的寫入請求資訊中所請求的結果而發送至資料傳輸處理部14(圖6步驟S308)。The communication request processing unit 11 analyzes the response frame (step S307 in FIG. 6), and when the PLC2 confirming the data transmission destination receives the command frame, it will indicate that the processing requested by the write request information of the processing object has ended, As a result of the request in the write request information of the processing object, it is sent to the data transmission processing unit 14 (step S308 in FIG. 6 ).

然後,通信請求處理部11在將處理物件的寫入請求資訊中所請求的結果發送至資料傳輸處理部14之後,從內部的通信請求佇列刪除所述寫入請求資訊(圖6步驟S309),並返回至步驟S300。Then, after sending the result requested in the write request information of the processing object to the data transmission processing unit 14, the communication request processing unit 11 deletes the write request information from the internal communication request queue (step S309 in FIG. 6) And return to step S300.

資料傳輸處理部14在從通信請求處理部11接收到寫入請求資訊中所請求的結果時(在圖4步驟S107中為是),針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組判定資料傳輸是否已結束(圖4步驟S108)。When the data transmission processing unit 14 receives the result requested in the write request information from the communication request processing unit 11 (Yes in step S107 in FIG. 4), the data transmission source and the data transmission defined in the data transmission definition information are defined for the data transmission All groups at the destination determine whether the data transmission has ended (step S108 in FIG. 4).

資料傳輸處理部14在針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組,資料傳輸未結束時(在步驟S108中為否),返回至步驟S104。並且,資料傳輸處理部14在針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組,資料傳輸已結束時(在步驟S108中為是),返回至步驟S100,並進行待機直到下一個啟動條件成立為止。The data transmission processing unit 14 returns to step S104 when the data transmission is not completed for all the groups of the data transmission source and the data transmission destination defined in the data transmission definition information (NO in step S108). In addition, the data transmission processing unit 14 returns to step S100 when the data transmission has ended for all groups of the data transmission source and the data transmission destination defined in the data transmission definition information (YES in step S108), and Standby is performed until the next start condition is satisfied.

圖7是說明本實施例的通信控制裝置1a的動作的順序圖。在圖7的示例中,說明在通信控制裝置1a與PLC2之間設定有三個連接Pcon-1~連接Pcon-3的情況。FIG. 7 is a sequence diagram illustrating the operation of the communication control device 1a of this embodiment. In the example of FIG. 7, a case where three connections Pcon-1 to Pcon-3 are set between the communication control device 1a and the PLC 2 will be described.

通過圖4、圖5中所說明的動作,通信控制裝置1a對調節計3-1~調節計3-3,發送用於讀出資料的命令幀Cc-1~命令幀Cc-3。針對所述命令幀Cc-1~命令幀Cc-3,調節計3-1~調節計3-3將包含所請求的資料的回應幀Cr-1~回應幀Cr-3發回至通信控制裝置1a。4 and 5, the communication control device 1a transmits the command frame Cc-1 to the command frame Cc-3 for reading the data to the regulator 3-1 to the regulator 3-3. For the command frame Cc-1 to the command frame Cc-3, the adjustment meter 3-1 to the adjustment meter 3-3 sends the response frame Cr-1 to the response frame Cr-3 containing the requested data back to the communication control device 1a.

然後,通信控制裝置1a將命令幀Pc-1~命令幀Pc-3,經由三個連接Pcon-1~連接Pcon-3而並行發送至PLC2,所述命令幀Pc-1~命令幀Pc-3用於將接收到的回應幀Cr-1~回應幀Cr-3中所含的資料寫入至PLC2。PLC2將表示已接收到命令幀Pc-1~命令幀Pc-3的回應幀Pr-1~回應幀Pr-3,分別經由連接Pcon-1~連接Pcon-3而發回至通信控制裝置1a。Then, the communication control device 1a sends the command frame Pc-1 to the command frame Pc-3 to the PLC 2 in parallel via the three connections Pcon-1 to Pcon-3, the command frame Pc-1 to the command frame Pc-3 It is used to write the data contained in the received response frame Cr-1 ~ response frame Cr-3 to PLC2. The PLC2 sends back the response frames Pr-1 to Pr-3 indicating that the command frame Pc-1 to the command frame Pc-3 have been received, and sends them back to the communication control device 1a via the connection Pcon-1 to the connection Pcon-3, respectively.

圖8是說明現有的通信控制裝置1的動作的順序圖。在現有上,通信控制裝置1與調節計3-1~調節計3-3之間的命令回應處理也與本實施例相同。FIG. 8 is a sequence diagram illustrating the operation of the conventional communication control device 1. Conventionally, the command response processing between the communication control device 1 and the regulator 3-1 to the regulator 3-3 is also the same as this embodiment.

另一方面,針對通信控制裝置1與PLC2之間,只設定有一個連接Pcon-1,所以通信控制裝置1直到接收到針對命令幀Pc-1的回應幀Pr-1,才能將下一個命令幀Pc-2發送至PLC2。同樣地,通信控制裝置1直到接收到針對命令幀Pc-2的回應幀Pr-2,才能將下一個命令幀Pc-3發送至PLC2。如上所述,在現有的通信控制裝置1中,可知無法並存執行多個命令回應處理。On the other hand, for the communication control device 1 and PLC2, only one connection Pcon-1 is set, so the communication control device 1 cannot receive the next command frame until it receives the response frame Pr-1 for the command frame Pc-1 Pc-2 is sent to PLC2. Similarly, the communication control device 1 cannot send the next command frame Pc-3 to the PLC 2 until it receives the response frame Pr-2 for the command frame Pc-2. As described above, in the conventional communication control device 1, it can be seen that multiple command response processes cannot be executed concurrently.

如以上所述,在本實施例中,通過在通信控制裝置1a與PLC2之間設定多個連接而進行通信,可以實現經由通信控制裝置1a的PLC2與調節計3(3-1~3-m)的高效率的資料傳輸。PLC2的通信協議或調節計3(3-1~3-m)的通信協議只要是可利用TCP/IP通信的通信協定即可,不論通信協定的種類如何,都可以應用本發明。因此,能夠不受通信協議的制約而實現高效率的資料傳輸。As described above, in this embodiment, by setting a plurality of connections between the communication control device 1a and the PLC 2 to perform communication, it is possible to realize the PLC 2 and the regulator 3 (3-1 to 3-m) via the communication control device 1a ) Efficient data transmission. The communication protocol of the PLC 2 or the communication protocol of the controller 3 (3-1 to 3-m) may be any communication protocol that can utilize TCP/IP communication, and the present invention can be applied regardless of the type of communication protocol. Therefore, high-efficiency data transmission can be achieved without being restricted by the communication protocol.

[第二實施例] 在第一實施例中,已說明如下的情況:作為PLC2的規格,允許在一個TCP通訊連接埠200上確立多個連接Pcon-1~連接Pcon-n。與此相對,也可以將本發明應用於如下的情況:如圖9所示,作為PLC2的規格,在每個TCP通訊連接埠上只允許確立一個連接,但可以設定多個TCP通訊連接埠200-1~TCP通訊連接埠200-n,可以在各個TCP通訊連接埠200-1~TCP通訊連接埠200-n上分別確立連接Pcon-1~連接Pcon-n。 在圖9所示的示例中,通信控制裝置1a的構成及動作也如第一實施例中所說明。[Second Embodiment] In the first embodiment, the following has been described: As a specification of PLC2, it is allowed to establish a plurality of connections Pcon-1 to Pcon-n on one TCP communication port 200. On the other hand, the present invention can also be applied to the following situations: As shown in FIG. 9, as the specification of PLC2, only one connection is allowed to be established on each TCP communication port, but multiple TCP communication ports 200 can be set -1 ~ TCP communication port 200-n, you can establish connection Pcon-1 ~ connection Pcon-n on each TCP communication port 200-1 ~ TCP communication port 200-n. In the example shown in FIG. 9, the configuration and operation of the communication control device 1a are also as described in the first embodiment.

並且,也可以將本發明應用於如下的情況:作為PLC2的規格,能夠設定多個TCP通訊連接埠,並且允許在各TCP通訊連接埠上確立多個連接。In addition, the present invention can also be applied to a case where, as the specifications of the PLC 2, multiple TCP communication ports can be set, and multiple connections can be established on each TCP communication port.

[第三實施例] 在第一實施例、第二實施例中,已說明將資料傳輸的週期定義為資料傳輸的啟動條件的情況,但是也可以如表2所示,將觸發資訊定義為啟動條件。在表2的示例中,在PLC2的以M001這一位址而特定的暫存器變為導通(ON)時,啟動條件成立,開始資料傳輸。並且,在第一實施例、第二實施例中,是說明調節計3-1~調節計3-m為傳輸源,PLC2為傳輸目的地的情況,但是也可以如表2所示,PLC2為傳輸源,調節計3-1~調節計3-m為傳輸目的地。

Figure 02_image003
表2[Third Embodiment] In the first and second embodiments, the case where the period of data transmission is defined as the start condition of data transmission has been described, but the trigger information may also be defined as start as shown in Table 2. condition. In the example in Table 2, when the temporary register specified by the address M001 of PLC2 becomes ON, the start condition is established and the data transmission starts. In addition, in the first and second embodiments, the case where the regulator 3-1 to the regulator 3-m are the transmission source and PLC2 is the transmission destination is described. However, as shown in Table 2, the PLC2 may be The transmission source, regulator 3-1 to regulator 3-m are the transmission destinations.
Figure 02_image003
Table 2

在本實施例中,通信控制裝置1a的構成也與第一實施例、第二實施例相同,因此利用圖2的符號,說明在資料傳輸定義部15中儲存有如表2所示的資料傳輸定義資訊時的通信控制裝置1a的動作。 資料傳輸處理部14的處理的流程與第一實施例相同,因此利用圖4的符號進行說明。圖10是說明通信請求處理部11及PLC用通信處理部10-1~PLC用通信處理部10-n的動作的流程圖,圖11是說明通信請求處理部13及調節計用通信處理部12-1~調節計用通信處理部12-m的動作的流程圖。In this embodiment, the configuration of the communication control device 1a is also the same as in the first and second embodiments. Therefore, using the symbols in FIG. 2, it is explained that the data transmission definition shown in Table 2 is stored in the data transmission definition unit 15 The operation of the communication control device 1a at the time of information. The processing flow of the data transmission processing unit 14 is the same as that of the first embodiment, and therefore, the symbols in FIG. 4 are used for description. FIG. 10 is a flowchart illustrating the operations of the communication request processing unit 11 and the PLC communication processing unit 10-1 to the PLC communication processing unit 10-n, and FIG. 11 is a diagram illustrating the communication request processing unit 13 and the adjustment meter communication processing unit 12 -1 to flowchart of the operation of the communication processing unit 12-m for the regulator.

資料傳輸處理部14在PLC2的以M001這一位址而特定的暫存器變為導通(ON),啟動條件成立時(在圖4步驟S100中為是),基於資料傳輸定義資訊中所定義的傳輸源位址資訊,製作讀出請求資訊(圖4步驟S101)。再者,PLC2的暫存器的狀態可以經由通信請求處理部11及PLC用通信處理部10(10-1~10-n)而定期地監視。The data transmission processing unit 14 turns on (ON) the specific register specified by the address M001 of PLC2, and the start condition is established (Yes in step S100 in FIG. 4), based on the definition in the data transmission definition information Information of the transmission source address to create the read request information (step S101 in FIG. 4). In addition, the state of the temporary memory of PLC2 can be monitored regularly via the communication request processing part 11 and the PLC communication processing part 10 (10-1 to 10-n).

然後,資料傳輸處理部14將所製作的讀出請求資訊,發送至與資料傳輸定義資訊中所定義的資料傳輸源相對應的通信請求處理部(在本實施例中為通信請求處理部11)(圖4步驟S102)。Then, the data transmission processing unit 14 sends the created read request information to the communication request processing unit (in this embodiment, the communication request processing unit 11) corresponding to the data transmission source defined in the data transmission definition information (Step S102 in FIG. 4).

其次,通信請求處理部11在接收到來自資料傳輸處理部14的讀出請求資訊時(在圖10步驟S400中為是),進行將接收到的讀出請求資訊保存至內部的通信請求佇列的通信請求佇列處理(圖10步驟S401)。Next, when receiving the read request information from the data transfer processing unit 14 (YES in step S400 in FIG. 10), the communication request processing unit 11 performs a communication request queue for storing the received read request information in the internal The communication request queue processing (step S401 in FIG. 10).

接著,通信請求處理部11在通信請求佇列中保存有未處理的讀出請求資訊時(在圖10步驟S402中為是),將未處理的讀出請求資訊作為處理物件,判定與所述讀出請求資訊中所含的傳輸源位址資訊中所特定的資料傳輸源之間是否處於通信處理中(圖10步驟S403)。Next, when the communication request processing section 11 stores unprocessed read request information in the communication request queue (YES in step S402 in FIG. 10), the unprocessed read request information is used as the processing object, and the It is read out whether the data transmission source specified in the transmission source address information included in the request information is in communication processing (step S403 in FIG. 10).

通信請求處理部11在與資料傳輸源的PLC2之間不處於通信處理中時,即,在多個連接Pcon-1~連接Pcon-n中存在可使用的連接時(在步驟S403中為否),基於處理物件的讀出請求資訊,製作用於從資料傳輸源讀出資料的命令幀(圖10步驟S404)。When the communication request processing unit 11 is not in communication processing with the PLC 2 of the data transmission source, that is, when there is a usable connection among the plurality of connections Pcon-1 to Pcon-n (No in step S403) Based on the read request information of the processing object, a command frame for reading data from the data transmission source is created (step S404 in FIG. 10).

然後,通信請求處理部11將所製作的命令幀,發送至與資料傳輸源(在本實施例中為PLC2)之間設定的多個連接Pcon-1~連接Pcon-n之中可使用的連接所對應的PLC用通信處理部10(10-1~10-n)。PLC用通信處理部10(10-1~10-n)經由相對應的連接Pcon(Pcon-1~Pcon-n)將命令幀發送至資料傳輸源的PLC2(圖10步驟S405)。Then, the communication request processing unit 11 sends the created command frame to the available connections among the plurality of connections Pcon-1 to Pcon-n set with the data transmission source (PLC2 in this embodiment) Corresponding PLC communication processing unit 10 (10-1 to 10-n). The PLC communication processing unit 10 (10-1 to 10-n) sends a command frame to the PLC 2 of the data transmission source via the corresponding connection Pcon (Pcon-1 to Pcon-n) (step S405 in FIG. 10).

PLC2在接收到命令幀時,從內部的記憶體獲取接收到的命令幀中所含的傳輸源位址資訊中所指定的資料,製作包含所述資料的回應幀。然後,PLC2利用接收到命令幀的連接Pcon(Pcon-1~Pcon-n),將回應幀發回至通信控制裝置1a。When PLC2 receives the command frame, it obtains the data specified in the transmission source address information contained in the received command frame from the internal memory, and creates a response frame containing the data. Then, PLC2 uses the connection Pcon (Pcon-1 to Pcon-n) that received the command frame to send the response frame back to the communication control device 1a.

已發送命令幀的通信控制裝置1a的PLC用通信處理部10(10-1~10-n)在從PLC2接收到針對所述命令幀的回應幀之後(在圖10步驟S406中為是),將接收到的回應幀發送至通信請求處理部11。The PLC communication processing unit 10 (10-1 to 10-n) of the communication control device 1a that has transmitted the command frame receives the response frame for the command frame from the PLC 2 (Yes in step S406 in FIG. 10), The received response frame is sent to the communication request processing section 11.

通信請求處理部11對回應幀進行分析,而從回應幀取出從資料傳輸源的PLC2發送的資料(圖10步驟S407)。通信請求處理部11將從回應幀取出的資料,作為處理物件的讀出請求資訊中所請求的結果而發送至資料傳輸處理部14(圖10步驟S408)。The communication request processing unit 11 analyzes the response frame, and takes out the data sent from the PLC 2 of the data transmission source from the response frame (step S407 in FIG. 10). The communication request processing unit 11 sends the data extracted from the response frame to the data transmission processing unit 14 as the result requested in the read request information of the processing object (step S408 in FIG. 10 ).

然後,通信請求處理部11在將處理物件的讀出請求資訊中所請求的結果發送至資料傳輸處理部14之後,從內部的通信請求佇列刪除所述讀出請求資訊(圖10步驟S409),並返回至步驟S400。Then, the communication request processing unit 11 sends the result requested in the read request information of the processing object to the data transmission processing unit 14, and deletes the read request information from the internal communication request queue (step S409 in FIG. 10) And return to step S400.

其次,資料傳輸處理部14在從通信請求處理部11接收到讀出請求資訊中所請求的結果時(在圖4的步驟S104中為是),基於成為製作所述讀出請求資訊的原始資訊的資料傳輸定義資訊中所定義的傳輸目的地位址資訊,製作用於將資料寫入至資料傳輸目的地的寫入請求資訊(圖4步驟S105)。在寫入請求資訊中,包含傳輸目的地位址資訊、以及從資料傳輸源的PLC2發送的資料。Next, when the data transmission processing unit 14 receives the result requested in the read request information from the communication request processing unit 11 (Yes in step S104 of FIG. 4 ), the data transmission processing unit 14 generates the read request information based on the original information The transmission destination address information defined in the data transmission definition information of the data, creates write request information for writing data to the data transmission destination (step S105 in FIG. 4). The write request information includes the transmission destination address information and the data sent from the data transmission source PLC2.

然後,資料傳輸處理部14將所製作的寫入請求資訊,發送至與資料傳輸定義資訊中所定義的資料傳輸目的地相對應的通信請求處理部(在本實施例中為通信請求處理部13)(圖4步驟S106)。Then, the data transmission processing section 14 sends the created write request information to the communication request processing section (in this embodiment, the communication request processing section 13) corresponding to the data transmission destination defined in the data transmission definition information ) (Step S106 in FIG. 4 ).

其次,通信請求處理部13在接收到來自資料傳輸處理部14的寫入請求資訊時(在圖11步驟S500中為是),進行將接收到的寫入請求資訊保存至內部的通信請求佇列的通信請求佇列處理(圖11步驟S501)。Next, when receiving the write request information from the data transfer processing unit 14 (YES in step S500 in FIG. 11), the communication request processing unit 13 performs a communication request queue for storing the received write request information in the internal The communication request queue processing (step S501 in FIG. 11).

接著,通信請求處理部13在通信請求佇列中保存有未處理的寫入請求資訊時(在圖11步驟S502中為是),將未處理的寫入請求資訊作為處理物件,判定與所述寫入請求資訊中所含的傳輸目的地位址資訊中所特定的資料傳輸目的地(在本實施例中為調節計3-1~調節計3-m)之間是否處於通信處理中(圖11步驟S503)。Next, when the communication request processing unit 13 stores unprocessed write request information in the communication request queue (Yes in step S502 in FIG. 11), the unprocessed write request information is used as the processing object, and the Is the data transmission destination specified in the transmission destination address information included in the write request information (in this embodiment, the regulator 3-1 to the regulator 3-m) in communication processing (Figure 11 Step S503).

通信請求處理部13在與資料傳輸目的地之間不處於通信處理中時(在步驟S503中為否),基於處理物件的寫入請求資訊,製作用於將資料寫入至資料傳輸目的地的命令幀(圖11步驟S504)。在命令幀中,包含傳輸目的地位址資訊、及從資料傳輸源的PLC2發送的資料。When the communication request processing unit 13 is not in communication processing with the data transmission destination (NO in step S503), based on the write request information of the processing object, it creates a data for writing the data to the data transmission destination Command frame (step S504 in FIG. 11). The command frame contains the address information of the transmission destination and the data sent from the PLC2 of the data transmission source.

然後,通信請求處理部13將所製作的命令幀發送至與資料傳輸目的地(在本實施例中為調節計)相對應的調節計用通信處理部12(12-1~12-m)。調節計用通信處理部12(12-1~12-m)將接收到的命令幀,經由與資料傳輸源之間設定的連接Ccon(Ccon-1~Ccon-m)而發送至資料傳輸源的調節計3(3-1~3-m)(圖11步驟S505)。Then, the communication request processing unit 13 transmits the created command frame to the communication processing unit 12 (12-1 to 12-m) for the adjustment meter corresponding to the data transmission destination (in this embodiment, the adjustment meter). The communication processing unit 12 for regulators (12-1 to 12-m) sends the received command frame to the data transmission source via the connection Ccon (Ccon-1 to Ccon-m) set with the data transmission source Regulator 3 (3-1 to 3-m) (Step S505 in FIG. 11).

調節計3(3-1~3-m)在接收到命令幀時,將表示已接受到命令幀的回應幀發回至通信控制裝置1a。並且,調節計3(3-1~3-m)將所述命令幀中所含的資料寫入至接收到的命令幀中所含的傳輸目的地位址資訊中所指定的暫存器。When the control meter 3 (3-1 to 3-m) receives the command frame, it sends back a response frame indicating that the command frame has been received to the communication control device 1a. In addition, the regulator 3 (3-1 to 3-m) writes the data contained in the command frame to the register specified in the transmission destination address information contained in the received command frame.

已發送命令幀的通信控制裝置1a的調節計用通信處理部12(12-1~12-m)在從調節計3(3-1~3-m)接收到針對所述命令幀的回應幀時(在圖11的步驟S506中為是),將接收到的回應幀發送至通信請求處理部13。The communication processing unit 12 (12-1 to 12-m) of the communication controller 1a of the communication control device 1a that has transmitted the command frame receives the response frame for the command frame from the adjustment meter 3 (3-1 to 3-m) When (YES in step S506 in FIG. 11), the received response frame is sent to the communication request processing unit 13.

通信請求處理部13對回應幀進行分析(圖11步驟S507),當確認資料傳輸目的地的調節計3(3-1~3-m)接收到命令幀時,將表示處理物件的寫入請求資訊中所請求的處理已結束的資訊,作為處理物件的寫入請求資訊中所請求的結果而發送至資料傳輸處理部14(圖11步驟S508)。The communication request processing unit 13 analyzes the response frame (step S507 in FIG. 11), and when it is confirmed that the regulator 3 (3-1 to 3-m) of the data transmission destination receives the command frame, it will indicate the write request of the processing object The information whose processing requested in the information has ended is sent to the data transmission processing section 14 as a result of the processing object's write request information (step S508 in FIG. 11).

接著,通信請求處理部13在將處理物件的寫入請求資訊中所請求的結果發送至資料傳輸處理部14之後,從內部的通信請求佇列刪除所述寫入請求資訊(圖11步驟S509),並返回至步驟S500。Next, the communication request processing unit 13 deletes the write request information from the internal communication request queue after sending the result requested in the write request information of the processing object to the data transmission processing unit 14 (step S509 in FIG. 11) And return to step S500.

資料傳輸處理部14在從通信請求處理部13接收到寫入請求資訊中所請求的結果時(在圖4步驟S107中為是),針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組,判定資料傳輸是否結束(圖4步驟S108)。When receiving the result requested in the write request information from the communication request processing unit 13 (yes in step S107 in FIG. 4), the data transmission processing unit 14 defines the data transmission source and the data transmission defined in the data transmission All the destination groups determine whether the data transfer is completed (step S108 in FIG. 4).

資料傳輸處理部14在針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組,資料傳輸未結束時(在步驟S108中為否),返回至步驟S104。並且,資料傳輸處理部14在針對資料傳輸定義資訊中所定義的資料傳輸源及資料傳輸目的地的所有的組,資料傳輸已結束時(在步驟S108中為是),返回至步驟S100,並進行待機直到下一個啟動條件成立為止。The data transmission processing unit 14 returns to step S104 when the data transmission is not completed for all the groups of the data transmission source and the data transmission destination defined in the data transmission definition information (NO in step S108). In addition, the data transmission processing unit 14 returns to step S100 when the data transmission has ended for all groups of the data transmission source and the data transmission destination defined in the data transmission definition information (YES in step S108), and Standby is performed until the next start condition is satisfied.

這樣一來,在本實施例中,可將PLC2的資料傳輸至調節計3(3-1~3-m)。 再者,在本實施例中,是利用將指定PLC2側的事件發生的資訊作為觸發資訊而登錄至資料傳輸定義部15的示例進行說明,但是也可以設為例如將指定調節計3-1~調節計3-3的特定的警報或事件的發生的資訊作為觸發資訊而登錄至資料傳輸定義部15。調節計3(3-1~3-m)的狀態可以經由通信請求處理部13及調節計用通信處理部12(12-1~12-m)而定期地監視。In this way, in this embodiment, the data of PLC2 can be transferred to the regulator 3 (3-1 to 3-m). In addition, in this embodiment, an example in which information specifying the occurrence of an event on the PLC 2 side is registered as the trigger information in the data transmission definition unit 15 is used for description. However, it may also be set to, for example, the designated regulator 3-1 to Information on the occurrence of a specific alarm or event of the regulator 3-3 is registered as the trigger information in the data transmission definition unit 15. The state of the regulator 3 (3-1 to 3-m) can be regularly monitored via the communication request processing unit 13 and the regulator communication processing unit 12 (12-1 to 12-m).

在第一實施例~第三實施例中,是將PLC2設為上位裝置,將多個調節計3(3-1~3-m)設為下位裝置,但是並不限於此。例如上位裝置及多個下位裝置的各個也可以是PLC。In the first to third embodiments, the PLC 2 is set as the upper-level device, and the plurality of regulators 3 (3-1 to 3-m) are set as the lower-level devices, but it is not limited to this. For example, each of the upper device and the plurality of lower devices may be a PLC.

並且,在第一實施例~第三實施例中,是說明已確立連接之後的動作,但是當然,在TCP/IP通信中連接的確立是眾所周知的技術。Furthermore, in the first to third embodiments, the operation after the connection has been established is described, but of course, the establishment of the connection in TCP/IP communication is a well-known technique.

並且,當針對命令幀的發送,回應幀在規定的時間內不發回時,當然如眾所周知,會進行命令幀的重發處理。In addition, when the response frame is not sent back within a specified time for the transmission of the command frame, of course, as is well known, the command frame is retransmitted.

第一實施例~第三實施例中所說明的通信控制裝置1a可以通過包括中央處理器(Central Processing Unit,CPU)、儲存裝置及介面(interface)的電腦、以及對這些硬體資源進行控制的程式來實現。將所述電腦的構成例示於圖12。電腦包括CPU400、儲存裝置401及介面裝置(以下略作為I/F)402。在I/F402上,連接著PLC2及調節計3-1~調節計3-3。在這種電腦中,用於使本發明實現的程式是保存在儲存裝置401中。CPU400按照儲存裝置401中所保存的程式,執行第一實施例~第三實施例中所說明的處理。 [工業上的可利用性]The communication control device 1a described in the first to third embodiments can be controlled by a computer including a central processing unit (CPU), a storage device, and an interface, and controlling these hardware resources Program to achieve. An example of the configuration of the computer is shown in FIG. 12. The computer includes a CPU 400, a storage device 401, and an interface device (hereinafter abbreviated as I/F) 402. PLC2 and controller 3-1 to controller 3-3 are connected to I/F402. In such a computer, the program for implementing the present invention is stored in the storage device 401. The CPU 400 executes the processing described in the first to third embodiments in accordance with the program stored in the storage device 401. [Industry availability]

本發明能夠應用於在上位裝置與下位裝置之間進行資料傳輸的技術。The present invention can be applied to a technology for data transmission between a higher-level device and a lower-level device.

1、1a‧‧‧通信控制裝置2‧‧‧PLC3、3-1~3-m‧‧‧調節計4‧‧‧LAN5-1、5-2‧‧‧通信幀10-1~10-n‧‧‧PLC用通信處理部11、13‧‧‧通信請求處理部12-1~12-m‧‧‧調節計用通信處理部14‧‧‧資料傳輸處理部15‧‧‧資料傳輸定義部100-1~100-n、101-1~101-m、200、200-1~200-n、300-1~300-m‧‧‧TCP通訊連接埠400‧‧‧CPU401‧‧‧儲存裝置402‧‧‧介面裝置(I/F)Cc-1~Cc-3、Pc-1~Pc-3‧‧‧命令幀Ccon-1~Ccon-m、Pcon-1~Pcon-n‧‧‧連接Cr-1~Cr-3、Pr-1~Pr-3‧‧‧回應幀S100~S108、S200~S209、S300~S309、S400~S409、S500~S509‧‧‧步驟1. 1a‧‧‧Communication control device 2‧‧‧PLC3, 3-1~3-m‧‧‧Regulator 4‧‧‧LAN5-1, 5-2‧‧‧Communication frame 10-1~10-n ‧‧‧Communication processing unit for PLC 11,13‧‧‧Communication request processing unit 12-1~12-m‧‧‧‧Communication processing unit for regulator 14‧‧‧‧Data transmission processing unit 15‧‧‧‧Data transmission definition unit 100-1~100-n, 101-1~101-m, 200, 200-1~200-n, 300-1~300-m‧‧‧ TCP communication port 400‧‧‧ CPU401‧‧‧ storage device 402‧‧‧Interface device (I/F) Cc-1~Cc-3, Pc-1~Pc-3‧‧‧Command frame Ccon-1~Ccon-m, Pcon-1~Pcon-n‧‧‧ connection Cr-1~Cr-3、Pr-1~Pr-3‧‧‧‧ Response frame S100~S108, S200~S209, S300~S309, S400~S409, S500~S509

圖1是說明本發明的原理的圖。 圖2是表示本發明的第一實施例的通信控制裝置的構成的框圖。 圖3是說明在本發明的第一實施例中在PLC的一個TCP通訊連接埠上設定多個連接的示例的圖。 圖4是說明本發明的第一實施例的通信控制裝置的資料傳輸處理部的動作的流程圖。 圖5是說明本發明的第一實施例的通信控制裝置的調節計用的通信請求處理部及通信處理部的動作的流程圖。 圖6是說明本發明的第一實施例的通信控制裝置的PLC用的通信請求處理部及通信處理部的動作的流程圖。 圖7是說明本發明的第一實施例的通信控制裝置的動作的順序圖。 圖8是說明現有的通信控制裝置的動作的順序圖。 圖9是說明在本發明的第二實施例中在PLC的多個TCP通訊連接埠上各設定一個連接的示例的圖。 圖10是說明本發明的第三實施例的通信控制裝置的PLC用的通信請求處理部及通信處理部的動作的流程圖。 圖11是說明本發明的第三實施例的通信控制裝置的調節計用的通信請求處理部及通信處理部的動作的流程圖。 圖12是表示實現本發明的第一實施例~第三實施例的通信控制裝置的電腦的構成例的框圖。 圖13是說明現有的通信控制裝置的動作的圖。 圖14是說明利用串列通信的PLC與調節計的通信的圖。 圖15是說明利用LAN的PLC與調節計的通信的圖。FIG. 1 is a diagram illustrating the principle of the present invention. 2 is a block diagram showing the configuration of the communication control device according to the first embodiment of the present invention. FIG. 3 is a diagram illustrating an example of setting a plurality of connections on one TCP communication port of the PLC in the first embodiment of the present invention. 4 is a flowchart illustrating the operation of the data transmission processing unit of the communication control device according to the first embodiment of the present invention. 5 is a flowchart illustrating the operation of the communication request processing unit and the communication processing unit for the regulator of the communication control device according to the first embodiment of the present invention. 6 is a flowchart illustrating operations of a communication request processing unit and a communication processing unit for PLC of the communication control device according to the first embodiment of the present invention. 7 is a sequence diagram illustrating the operation of the communication control device according to the first embodiment of the present invention. 8 is a sequence diagram illustrating the operation of the conventional communication control device. 9 is a diagram illustrating an example of setting one connection on each of a plurality of TCP communication ports of a PLC in the second embodiment of the present invention. 10 is a flowchart illustrating operations of a communication request processing unit and a communication processing unit for PLC of the communication control device according to the third embodiment of the present invention. 11 is a flowchart illustrating the operation of the communication request processing unit and the communication processing unit for the regulator of the communication control device according to the third embodiment of the present invention. 12 is a block diagram showing a configuration example of a computer that implements the communication control device according to the first to third embodiments of the present invention. 13 is a diagram illustrating the operation of a conventional communication control device. FIG. 14 is a diagram illustrating communication between a PLC and a regulator using serial communication. 15 is a diagram illustrating communication between a PLC using a LAN and a regulator.

1a‧‧‧通信控制裝置 1a‧‧‧Communication control device

2‧‧‧PLC 2‧‧‧PLC

3-1~3-m‧‧‧調節計 3-1~3-m‧‧‧Regulator

10-1~10-n‧‧‧PLC用通信處理部 10-1~10-n‧‧‧Communication processing unit for PLC

11、13‧‧‧通信請求處理部 11.13‧‧‧Communication Request Processing Department

12-1~12-m‧‧‧調節計用通信處理部 12-1~12-m‧‧‧Communication processing unit for regulator

14‧‧‧資料傳輸處理部 14‧‧‧Data Transmission Processing Department

15‧‧‧資料傳輸定義部 15‧‧‧Data Transmission Definition Department

Claims (10)

一種通信控制裝置,包括: 多個第一通信處理部,針對多個下位裝置的各個而設置,以與相對應的下位裝置進行通信的方式而構成; 多個第二通信處理部,針對與上位裝置之間設定的多個連接的各個而設置,以經由相對應的連接與所述上位裝置進行通信的方式而構成; 資料傳輸定義部,以預先儲存資料傳輸定義資訊的方式而構成; 資料傳輸處理部,以如下的方式而構成:製作針對所述資料傳輸定義資訊中所定義的傳輸源的下位裝置的讀出請求資訊,當從所述傳輸源接收到所述讀出請求資訊中所請求的資料時,製作將接收到的所述資料寫入至所述資料傳輸定義資訊中所定義的傳輸目的地的上位裝置的寫入請求資訊; 第一通信請求處理部,以如下的方式而構成:根據所述讀出請求資訊,製作從所述傳輸源讀出資料的第一命令幀,並發送至與所述傳輸源相對應的所述第一通信處理部,當所述第一通信處理部從所述傳輸源接收到第一回應幀時,從所述第一回應幀取出所述讀出請求資訊中所請求的資料並發送至所述資料傳輸處理部;以及 第二通信請求處理部,以如下的方式而構成:當所述多個連接中存在可使用的連接時,根據所述寫入請求資訊,製作將資料寫入至所述傳輸目的地的第二命令幀,並將所述第二命令幀發送至與所述可使用的連接相對應的所述第二通信處理部,當所述第二通信處理部從所述傳輸目的地接收到第二回應幀時,將所述第二回應幀所表示的結果通知給所述資料傳輸處理部。A communication control device includes: a plurality of first communication processing units, which are provided for each of a plurality of lower-level devices, and are configured to communicate with a corresponding lower-level device; and a plurality of second communication processing units, which target a higher-level device Each of the multiple connections set between the devices is configured to communicate with the higher-level device via the corresponding connection; the data transmission definition section is configured to store data transmission definition information in advance; data transmission The processing unit is configured in such a manner as to create read request information for the lower-level device of the transmission source defined in the data transmission definition information, and when requested from the read request information received from the transmission source Data, create write request information that writes the received data to the higher-level device of the transmission destination defined in the data transmission definition information; the first communication request processing unit is configured as follows : Create a first command frame for reading data from the transmission source based on the read request information, and send it to the first communication processing unit corresponding to the transmission source, when the first communication process When the unit receives the first response frame from the transmission source, it takes out the data requested in the read request information from the first response frame and sends it to the data transmission processing unit; and the second communication request processing unit , Constructed in the following manner: When there is a usable connection among the plurality of connections, according to the write request information, a second command frame for writing data to the transmission destination is created, and the The second command frame is sent to the second communication processing section corresponding to the usable connection, and when the second communication processing section receives the second response frame from the transmission destination, the The result indicated by the second response frame is notified to the data transmission processing section. 一種通信控制裝置,包括: 多個第一通信處理部,針對與上位裝置之間設定的多個連接的各個而設置,以經由相對應的連接與所述上位裝置進行通信的方式而構成; 多個第二通信處理部,針對多個下位裝置的各個而設置,以與相對應的下位裝置進行通信的方式而構成; 資料傳輸定義部,以預先儲存資料傳輸定義資訊的方式而構成; 資料傳輸處理部,以如下的方式而構成:製作針對所述資料傳輸定義資訊中所定義的傳輸源的上位裝置的讀出請求資訊,當從所述傳輸源接收到所述讀出請求資訊中所請求的資料時,製作將接收到的所述資料寫入至所述資料傳輸定義資訊中所定義的傳輸目的地的下位裝置的寫入請求資訊; 第一通信請求處理部,以如下的方式而構成:當在所述多個連接中存在可使用的連接時,根據所述讀出請求資訊,製作從所述傳輸源讀出資料的第一命令幀,並發送至與所述傳輸源相對應的所述第一通信處理部,當所述第一通信處理部從所述傳輸源接收到第一回應幀時,從所述第一回應幀取出所述讀出請求資訊中所請求的資料並發送至所述資料傳輸處理部;以及 第二通信請求處理部,以如下的方式而構成:根據所述寫入請求資訊,製作將資料寫入至所述傳輸目的地的第二命令幀,並發送至與所述傳輸目的地相對應的所述第二通信處理部,當所述第二通信處理部從所述傳輸目的地接收到第二回應幀時,將所述第二回應幀所表示的結果通知給所述資料傳輸處理部。A communication control device, including: a plurality of first communication processing sections, which are provided for each of a plurality of connections set with a higher-level device, and configured to communicate with the higher-level device via a corresponding connection; A second communication processing unit is provided for each of the lower-level devices, and is configured to communicate with the corresponding lower-level device; the data transmission definition unit is configured by storing data transmission definition information in advance; data transmission The processing unit is configured in such a manner as to create the read request information for the higher-level device of the transmission source defined in the data transmission definition information, and when the request from the read request information is received from the transmission source Data, create write request information that writes the received data to the lower-level device of the transmission destination defined in the data transmission definition information; the first communication request processing unit is configured as follows : When there is a usable connection among the plurality of connections, according to the read request information, a first command frame for reading data from the transmission source is made and sent to the corresponding to the transmission source The first communication processing section, when the first communication processing section receives the first response frame from the transmission source, takes out the data requested in the read request information from the first response frame and sends To the data transmission processing section; and a second communication request processing section, configured in such a manner that, based on the write request information, a second command frame for writing data to the transmission destination is created and sent To the second communication processing section corresponding to the transmission destination, when the second communication processing section receives the second response frame from the transmission destination, the second response frame The result is notified to the data transmission processing section. 如申請專利範圍第1項或第2項所述的通信控制裝置,其中, 所述資料傳輸定義資訊一併地包含所述傳輸源的資訊、所述傳輸目的地的資訊及資料傳輸的啟動條件, 設定有資料傳輸的週期,作為所述啟動條件。The communication control device according to item 1 or item 2 of the patent application scope, wherein the data transmission definition information includes the information of the transmission source, the information of the transmission destination, and the conditions for starting the data transmission , Set the period of data transmission as the starting condition. 如申請專利範圍第1項或第2項所述的通信控制裝置,其中, 所述資料傳輸定義資訊一併地包含所述傳輸源的資訊、所述傳輸目的地的資訊及資料傳輸的啟動條件, 設定有觸發資訊,作為所述啟動條件。The communication control device according to item 1 or item 2 of the patent application scope, wherein the data transmission definition information includes the information of the transmission source, the information of the transmission destination, and the conditions for starting the data transmission , Trigger information is set as the starting condition. 如申請專利範圍第1項或第2項所述的通信控制裝置,其中, 在所述上位裝置的一個通訊連接埠上設定有所述多個連接。The communication control device according to item 1 or 2 of the patent application, wherein the plurality of connections are set on one communication port of the higher-level device. 如申請專利範圍第1項或第2項所述的通信控制裝置,其中, 在所述上位裝置的多個通訊連接埠上各設定有一個所述連接。The communication control device according to item 1 or item 2 of the patent application scope, wherein each of the plurality of communication connection ports of the higher-level device is provided with one of the connections. 如申請專利範圍第3項所述的通信控制裝置,其中, 在所述上位裝置的一個通訊連接埠上設定有所述多個連接。The communication control device according to item 3 of the patent application range, wherein the plurality of connections are set on one communication port of the higher-level device. 如申請專利範圍第3項所述的通信控制裝置,其中, 在所述上位裝置的多個通訊連接埠上各設定有一個所述連接。The communication control device according to item 3 of the patent application scope, wherein each of the plurality of communication ports of the higher-level device is provided with one of the connections. 如申請專利範圍第4項所述的通信控制裝置,其中, 在所述上位裝置的一個通訊連接埠上設定有所述多個連接。The communication control device according to item 4 of the patent application scope, wherein the plurality of connections are set on one communication port of the higher-level device. 如申請專利範圍第4項所述的通信控制裝置,其中, 在所述上位裝置的多個通訊連接埠上各設定有一個所述連接。The communication control device according to item 4 of the patent application scope, wherein each of the plurality of communication connection ports of the higher-level device is provided with one of the connections.
TW107141982A 2017-11-27 2018-11-26 Communication control device TWI688248B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-226524 2017-11-27
JP2017226524A JP7034681B2 (en) 2017-11-27 2017-11-27 Communication control device

Publications (2)

Publication Number Publication Date
TW201926974A TW201926974A (en) 2019-07-01
TWI688248B true TWI688248B (en) 2020-03-11

Family

ID=66844654

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107141982A TWI688248B (en) 2017-11-27 2018-11-26 Communication control device

Country Status (4)

Country Link
JP (1) JP7034681B2 (en)
KR (1) KR102136184B1 (en)
CN (1) CN109839891B (en)
TW (1) TWI688248B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697293B (en) * 2022-03-30 2023-11-10 西安北方华创微电子装备有限公司 Data transmission method, lower computer and controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010012296A1 (en) * 2000-01-25 2001-08-09 Burgess Jon J. Multi-port network communication device with selective mac address filtering
US20020060624A1 (en) * 2000-11-17 2002-05-23 George Zhang Plug compatible power line communications network device
TW201225612A (en) * 2010-09-14 2012-06-16 Sony Corp Communication device using spatial diversity, communications system and method
JP2017034433A (en) * 2015-07-31 2017-02-09 アズビル株式会社 Communication control device and method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001100810A (en) * 1999-09-29 2001-04-13 Omron Corp Controller
ES2203295B1 (en) 2001-10-03 2005-06-01 Airtel Movil, S.A. SYSTEM AND PROCEDURE FOR ACCESSING THE SUBSCRIBER INFORMATION OF A MOBILE PHONE NETWORK FROM THE TCP / IP NETWORK.
JP2005275575A (en) * 2004-03-23 2005-10-06 Toyota Motor Corp Data collection method and data collection device
US8078674B2 (en) * 2007-05-10 2011-12-13 International Business Machines Corporation Server device operating in response to received request
CN102204178A (en) * 2008-07-18 2011-09-28 Lg电子株式会社 A method and an apparatus for controlling messages between host and controller
JP2010114838A (en) * 2008-11-10 2010-05-20 Toshiba Corp Communication protocol converting apparatus, method and program
JP5477647B2 (en) 2010-04-28 2014-04-23 横河電機株式会社 Modbus control system
JP5784284B2 (en) * 2010-06-30 2015-09-24 アズビル株式会社 I / O device having HART communication function
CN102223273B (en) * 2011-07-14 2013-11-27 中山爱科数字科技股份有限公司 Digital sensing network and communication method
JP6092026B2 (en) * 2013-07-12 2017-03-08 アズビル株式会社 Controller and data collection method
JP6102845B2 (en) * 2014-07-10 2017-03-29 コニカミノルタ株式会社 Connection control system, management server, connection support method, and connection support program
KR101648144B1 (en) * 2016-03-04 2016-08-16 (주)동국일렉콘스 Control system for programmable gateway and control method for programmable gateway using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010012296A1 (en) * 2000-01-25 2001-08-09 Burgess Jon J. Multi-port network communication device with selective mac address filtering
US20020060624A1 (en) * 2000-11-17 2002-05-23 George Zhang Plug compatible power line communications network device
TW201225612A (en) * 2010-09-14 2012-06-16 Sony Corp Communication device using spatial diversity, communications system and method
JP2017034433A (en) * 2015-07-31 2017-02-09 アズビル株式会社 Communication control device and method

Also Published As

Publication number Publication date
CN109839891A (en) 2019-06-04
TW201926974A (en) 2019-07-01
JP2019097085A (en) 2019-06-20
KR102136184B1 (en) 2020-07-22
JP7034681B2 (en) 2022-03-14
KR20190062214A (en) 2019-06-05
CN109839891B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
US8990444B2 (en) Fieldbus gateway using virtual serial fieldbus port and data transmission method thereof
CN108351859B (en) Direct memory access for endpoint devices
US10901392B2 (en) Method and system for monitoring a plant of process automation
JP6600008B2 (en) High-speed data transmission communication protocol for industrial process networks
JP2018501596A (en) Data transmission method and apparatus in industrial process network
JP2017151934A (en) Programmable controller, control method of programmable controller, and control program for programmable controller
TWI688248B (en) Communication control device
JP3551905B2 (en) Management station, network system, and communication method in network system
JP5852267B2 (en) Relay interface module for distributed control systems
EP2859417B1 (en) Optimized communications with hart instruments
JP2011234171A (en) Modbus control system
US20220137604A1 (en) Coordination Device and Method for Providing Control Applications via a Communication Network for Transmitting Time-Critical Data
JP2013250632A (en) Communication device
US20100226393A1 (en) Communication system and communication apparatus
JP7390879B2 (en) Communication processing device, communication processing method and program, and data structure of the header part of the network layer
JP2009104283A (en) System for transmitting/receiving data by modbus and control equipment such as programmable controller
JP2019180019A (en) Control device
JP7277206B2 (en) Communication control device and method
JP7184108B2 (en) Communication system, communication control method, and program
US9733979B2 (en) Communication device
WO2020184381A1 (en) Processing device, information processing system, information processing method, and program
JP6409520B2 (en) Control system and relay device
JP2015210667A (en) Communication unit and can(control area network) communication control program
JP5413801B2 (en) Field communication method and field device using the same
JP2003295913A (en) Inter-plc data communication method and plc comprising communication method thereof