Movatterモバイル変換


[0]ホーム

URL:


CN116760659B - Programmable logic controller and its data communication method - Google Patents

Programmable logic controller and its data communication method
Download PDF

Info

Publication number
CN116760659B
CN116760659BCN202311011486.4ACN202311011486ACN116760659BCN 116760659 BCN116760659 BCN 116760659BCN 202311011486 ACN202311011486 ACN 202311011486ACN 116760659 BCN116760659 BCN 116760659B
Authority
CN
China
Prior art keywords
module
data
modules
epa
output
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202311011486.4A
Other languages
Chinese (zh)
Other versions
CN116760659A (en
Inventor
解群眺
刘世豪
陈建飞
邓文敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Guoli Xin'an Technology Co ltd
Original Assignee
Zhejiang Guoli Xin'an Technology Co ltd
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 Zhejiang Guoli Xin'an Technology Co ltdfiledCriticalZhejiang Guoli Xin'an Technology Co ltd
Priority to CN202311011486.4ApriorityCriticalpatent/CN116760659B/en
Publication of CN116760659ApublicationCriticalpatent/CN116760659A/en
Application grantedgrantedCritical
Publication of CN116760659BpublicationCriticalpatent/CN116760659B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Embodiments of the present disclosure relate to a programmable logic controller and a data communication method thereof. The programmable logic controller comprises a plurality of modules, wherein the plurality of modules comprise a programmable control unit module and a plurality of input/output modules, each of the plurality of modules is provided with an EPA communication unit and a plurality of EPA communication interfaces, and each module is respectively connected with the other one or two modules of the plurality of modules in series through one or two EPA communication interfaces of the plurality of EPA communication interfaces so as to form a first EPA communication bus among the plurality of modules, and the first EPA communication bus is used for realizing EPA communication among the plurality of modules. The corresponding data communication method based on the programmable logic controller can improve the data communication efficiency among the modules of the programmable logic controller.

Description

Translated fromChinese
可编程逻辑控制器及其数据通信方法Programmable logic controller and its data communication method

技术领域Technical field

本公开的实施例总体涉及通信技术领域,并且更具体地涉及一种可编程逻辑控制器及其数据通信方法。Embodiments of the present disclosure relate generally to the field of communication technologies, and more specifically to a programmable logic controller and a data communication method thereof.

背景技术Background technique

可编程逻辑控制器(Programmable Logic Controller,简称为PLC)是一种用于自动化控制的控制设备,其具备可编程、模块化、高可靠等特点,因此广泛应用于工业、航空、航天、航海、关键装备设备等控制领域。Programmable Logic Controller (PLC for short) is a control equipment used for automation control. It has the characteristics of programmability, modularity, high reliability, etc., so it is widely used in industry, aviation, aerospace, navigation, Control areas such as key equipment and equipment.

可编程逻辑控制器通常包括可编程控制单元模块以及多个输入/输出模块,这些输入/输出模块可以是用于接收和采集输入信号的各种数字数据或模拟数据采集模块、用来控制各种执行器的各种数字量或模拟量数据输出模块以及双向通信模块等。当前,通常基于CAN、Profibus、EtherCAT等通信总线来实现这些模块之间的互连,并通过这样的通信总线来实现这些模块相互之间的内部通信。但是,这种通信总线无法实现合适的确定性数据处理方法,尤其在整个控制过程中需要大容量逻辑运算从而需要频繁进行数据通信时,容易引起数据丢包或数据链路拥堵的问题,而且网络带宽利用率也较低。Programmable logic controllers usually include programmable control unit modules and multiple input/output modules. These input/output modules can be various digital data or analog data acquisition modules used to receive and collect input signals, used to control various Various digital or analog data output modules of the actuator and two-way communication modules, etc. Currently, the interconnection between these modules is usually realized based on communication buses such as CAN, Profibus, and EtherCAT, and the internal communication between these modules is realized through such communication buses. However, this communication bus cannot implement a suitable deterministic data processing method. Especially when large-capacity logical operations are required during the entire control process and frequent data communication is required, it is easy to cause data packet loss or data link congestion, and the network Bandwidth utilization is also lower.

发明内容Contents of the invention

针对上述问题,本公开提供了一种可编程逻辑控制器及其数据通信方法,使得有助于提高可编程逻辑控制器所包括的各个模块之间的数据通信效率,而不会引起数据丢包和数据链路拥堵之类的问题。In response to the above problems, the present disclosure provides a programmable logic controller and a data communication method thereof, which helps to improve the data communication efficiency between various modules included in the programmable logic controller without causing data packet loss. and issues such as data link congestion.

根据本公开的第一方面,提供了一种可编程逻辑控制器,包括多个模块,所述多个模块包括可编程控制单元模块以及多个输入/输出模块,所述多个模块中的每一模块上均设置有EPA通信单元以及多个EPA通信接口,每一模块分别通过相应的多个EPA通信接口中的一个或两个EPA通信接口与所述多个模块中另外的一个或两个模块串行连接,以在所述多个模块之间形成第一EPA通信总线,所述第一EPA通信总线用于实现所述多个模块之间的EPA通信。According to a first aspect of the present disclosure, a programmable logic controller is provided, including a plurality of modules, the plurality of modules including a programmable control unit module and a plurality of input/output modules, each of the plurality of modules Each module is provided with an EPA communication unit and a plurality of EPA communication interfaces. Each module communicates with one or two other modules of the plurality of modules through one or two of the corresponding EPA communication interfaces. The modules are connected in series to form a first EPA communication bus between the plurality of modules, and the first EPA communication bus is used to implement EPA communication between the plurality of modules.

根据本公开的第二方面,提供了一种用于可编程逻辑控制器的数据通信方法,所述可编程逻辑控制器为根据本公开的第一方面的可编程逻辑控制器,所述数据通信方法包括:在所述可编程逻辑控制器的每一模块处,接收所述可编程逻辑控制器的组态配置信息,所述组态配置信息包括所述可编程逻辑控制器中包括的多个模块的优先级顺序;确定所述模块在通信周期的周期时间段期间需占用的第一时间片的长度,所述第一时间片的长度与所述模块所属的模块类型有关;基于所述多个模块的优先级顺序确定所述模块需占用的第一时间片在周期时间段中的位置;以及在每一通信周期的周期时间段期间,在所述模块对应的第一时间片内,经由所述模块的EPA通信接口在相应EPA通信总线上传输相应的数据。According to a second aspect of the present disclosure, a data communication method for a programmable logic controller is provided. The programmable logic controller is the programmable logic controller according to the first aspect of the present disclosure. The data communication method is The method includes: receiving, at each module of the programmable logic controller, configuration information of the programmable logic controller, where the configuration information includes a plurality of components included in the programmable logic controller. The priority order of the modules; determine the length of the first time slice that the module needs to occupy during the period of the communication cycle, and the length of the first time slice is related to the module type to which the module belongs; based on the multiple The priority order of each module determines the position of the first time slice that the module needs to occupy in the cycle time period; and during the cycle time period of each communication cycle, in the first time slice corresponding to the module, via The EPA communication interface of the module transmits corresponding data on the corresponding EPA communication bus.

在一些实施例中,各个数据输入类型的模块的优先级顺序高于各个数据输入输出类型的模块所包括的数据接收单元的优先级顺序,各个数据输入输出类型的模块所包括的数据接收单元的优先级顺序高于可编程控制单元模块的优先级顺序,可编程控制单元模块的优先级顺序高于各个数据输入输出类型的模块所包括的数据发送单元的优先级顺序,各个数据输入输出类型的模块所包括的数据发送单元的优先级顺序高于各个数据输出类型的模块的优先级顺序。In some embodiments, the priority order of the modules of each data input type is higher than the priority order of the data receiving units included in the modules of each data input and output type. The priority order of the data receiving units included in the modules of each data input and output type is higher. The priority order is higher than the priority order of the programmable control unit module. The priority order of the programmable control unit module is higher than the priority order of the data sending unit included in the modules of each data input and output type. The priority order of each data input and output type is The priority order of the data sending unit included in the module is higher than the priority order of the modules of the respective data output types.

在一些实施例中,每一输入/输出模块为数据输入类型的模块、数据输出类型的模块、或数据输入和输出类型的模块。In some embodiments, each input/output module is a data input type module, a data output type module, or a data input and output type module.

在一些实施例中,每一模块还分别通过所述多个EPA通信接口中另外的一个或两个EPA通信接口与所述多个模块中所述另外的一个或两个模块串行连接,以在所述多个模块之间形成第二EPA通信总线,所述第二EPA通信总线也用于实现所述多个模块之间的EPA通信。In some embodiments, each module is also serially connected to the other one or two modules in the plurality of modules through another one or two EPA communication interfaces in the plurality of EPA communication interfaces, so as to A second EPA communication bus is formed between the plurality of modules, and the second EPA communication bus is also used to implement EPA communication between the plurality of modules.

在一些实施例中,所述第一通信总线为线形EPA通信总线或环形EPA通信总线。In some embodiments, the first communication bus is a linear EPA communication bus or a ring EPA communication bus.

在一些实施例中,所述第一通信总线和所述第二通信总线均为线形EPA通信总线或者均为环形EPA通信总线。In some embodiments, the first communication bus and the second communication bus are both linear EPA communication buses or both are ring EPA communication buses.

在一些实施例中,该数据通信方法还包括:如果所述模块需要在所述非周期时间段期间传输相应的非周期数据,则确定所述模块在所述非周期时间段期间需占用的第二时间片的长度;基于所述多个模块中需要在所述非周期时间段期间传输非周期数据的一个或多个模块的优先级顺序,确定所述模块需占用的第二时间片在所述非周期时间段中的位置;以及在所述通信周期的非周期时间段期间,在所述模块对应的第二时间片内,经由所述模块的EPA通信接口在所述相应EPA通信总线上传输相应的非周期数据。In some embodiments, the data communication method further includes: if the module needs to transmit corresponding aperiodic data during the aperiodic time period, determining the third slot that the module needs to occupy during the aperiodic time period. The length of the second time slice; based on the priority order of one or more modules among the multiple modules that need to transmit aperiodic data during the aperiodic time period, determine where the second time slice to be occupied by the module is located. The position in the non-periodic time period; and during the non-periodic time period of the communication cycle, in the second time slice corresponding to the module, on the corresponding EPA communication bus via the EPA communication interface of the module The corresponding aperiodic data is transmitted.

在一些实施例中,确定所述模块在通信周期的周期时间段期间所占的第一时间片的长度包括:如果所述模块属于数据输入类型的模块,则基于所述模块的多通道数据采集接口所包括的数据采集通道的数量、每一数据采集通道每次所能采集的数据量、相应EPA通信总线的数据传输速率以及所述第一时间片的网络信息的长度确定所述模块需占用的第一时间片的长度。In some embodiments, determining the length of the first time slice occupied by the module during the cycle time period of the communication cycle includes: if the module belongs to a data input type module, multi-channel data collection based on the module The number of data collection channels included in the interface, the amount of data that can be collected by each data collection channel at a time, the data transmission rate of the corresponding EPA communication bus, and the length of the network information of the first time slice determine the occupied space of the module. The length of the first time slice.

在一些实施例中,所述网络信息的长度为32字节。In some embodiments, the length of the network information is 32 bytes.

在一些实施例中,确定所述模块在通信周期的周期时间段期间所占的第一时间片的长度包括:如果所述模块属于数据输出类型的模块,则基于所述模块的多通道数据输出接口所包括的数据输出通道的数量、每一数据输出通道每次所能输出的数据量以及相应EPA通信总线的数据传输速率确定所述模块需占用的第一时间片的长度。In some embodiments, determining the length of the first time slice occupied by the module during the cycle time period of the communication cycle includes: if the module belongs to a data output type module, based on the multi-channel data output of the module The number of data output channels included in the interface, the amount of data that each data output channel can output each time, and the data transmission rate of the corresponding EPA communication bus determine the length of the first time slice that the module needs to occupy.

在一些实施例中,确定所述模块在通信周期的周期时间段期间所占的第一时间片的长度包括:如果所述模块属于数据输入和输出类型的模块,则基于所述模块所包括的数据接收单元通过相应的数据采集接口每次所能采集的第一数据量以及相应的EPA通信总线的数据传输速率确定所述数据接收单元需占用的第一时间片的长度,并基于所述模块所包括的数据发送单元通过相应的数据输出接口每次所能输出的第二数据量以及相应EPA通信总线的数据传输速率确定所述数据发送单元需占用的第一时间片的长度。In some embodiments, determining the length of the first time slice occupied by the module during the cycle period of the communication cycle includes: if the module belongs to a data input and output type module, based on whether the module includes The data receiving unit determines the length of the first time slice that the data receiving unit needs to occupy through the first amount of data that can be collected each time through the corresponding data collection interface and the data transmission rate of the corresponding EPA communication bus, and based on the module The second data amount that the included data sending unit can output each time through the corresponding data output interface and the data transmission rate of the corresponding EPA communication bus determine the length of the first time slice that the data sending unit needs to occupy.

在一些实施例中,确定所述模块在所述非周期时间段期间需占用的第二时间片的长度包括:基于所述非周期数据的数据量、相应EPA通信总线的数据传输速率以及网络信息的长度确定所述模块在所述非周期时间段期间需占用的第二时间片的长度。In some embodiments, determining the length of the second time slice that the module needs to occupy during the aperiodic time period includes: based on the data amount of the aperiodic data, the data transmission rate of the corresponding EPA communication bus, and network information. The length of determines the length of the second time slice that the module needs to occupy during the non-periodic time period.

应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become readily understood from the following description.

附图说明Description of the drawings

结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标注表示相同或相似的元素。The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numbers represent the same or similar elements.

图1示出了根据本公开的一些实施例的示例性可编程逻辑控制器100的示意图。Figure 1 shows a schematic diagram of an example programmable logic controller 100 in accordance with some embodiments of the present disclosure.

图2示出了根据本公开的另一些实施例的示例性可编程逻辑控制器200的示意图。Figure 2 shows a schematic diagram of an exemplary programmable logic controller 200 in accordance with further embodiments of the present disclosure.

图3示出了根据本公开的再一些实施例的示例性可编程逻辑控制器300的示意图。Figure 3 shows a schematic diagram of an exemplary programmable logic controller 300 in accordance with further embodiments of the present disclosure.

图4示出了根据本公开的又一些实施例的示例性可编程逻辑控制器400的示意图。Figure 4 shows a schematic diagram of an exemplary programmable logic controller 400 in accordance with further embodiments of the present disclosure.

图5示出了根据本公开的实施例的用于可编程逻辑控制器的数据通信方法500的示意图。FIG. 5 shows a schematic diagram of a data communication method 500 for a programmable logic controller according to an embodiment of the present disclosure.

图6示出了根据本公开的实施例的示例性可编程逻辑控制器的通信周期的示意图。6 illustrates a schematic diagram of a communication cycle of an exemplary programmable logic controller according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the present disclosure are included to facilitate understanding and should be considered to be exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.

在本文中使用的术语“包括”及其变形表示开放性包括,即“包括但不限于”。除非特别申明,术语“或”表示“和/或”。术语“基于”表示“至少部分地基于”。术语“一个示例实施例”和“一个实施例”表示“至少一个示例实施例”。术语“另一实施例”表示“至少一个另外的实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。As used herein, the term "include" and its variations mean an open inclusion, ie, "including but not limited to." Unless otherwise stated, the term "or" means "and/or". The term "based on" means "based at least in part on." The terms "one example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.

如上所述,当前,通常基于CAN、Profibus、EtherCAT等内部通信总线来将可编程逻辑控制器所包括的各个模块连接在一起,以实现这些模块之间的相互通信。但是,这种通信总线无法实现合适的确定性数据处理方法,因此在整个控制过程中需要大容量逻辑运算从而需要频繁输入或输出数据时,容易引起数据丢包或数据链路拥堵的问题,而且网络带宽利用率也较低。As mentioned above, currently, various modules included in a programmable logic controller are usually connected together based on internal communication buses such as CAN, Profibus, and EtherCAT to achieve mutual communication between these modules. However, this communication bus cannot implement a suitable deterministic data processing method. Therefore, when large-capacity logical operations are required during the entire control process and frequent input or output of data is required, it is easy to cause data packet loss or data link congestion, and Network bandwidth utilization is also low.

为了至少部分地解决上述问题以及其他潜在问题中的一个或者多个,本公开的示例实施例提出了一种可编程逻辑控制器,包括多个模块,所述多个模块包括可编程控制单元模块以及多个输入/输出模块,所述多个模块中的每一模块上均设置有EPA通信单元以及与所述EPA通信单元相关联的多个EPA通信接口,每一模块分别通过相应的多个EPA通信接口中的一个或两个EPA通信接口与所述多个模块中另外的一个或两个模块串行连接,以在所述多个模块之间形成第一EPA通信总线,所述第一EPA通信总线用于实现所述多个模块之间的EPA通信。以此方式,使得有助于提高可编程逻辑控制器所包括的各个模块之间的数据通信效率,而不会引起数据丢包和数据链路拥堵之类的问题,而且还有利于提高网络带宽的利用率。In order to at least partially solve one or more of the above problems and other potential problems, example embodiments of the present disclosure propose a programmable logic controller including a plurality of modules, the plurality of modules including a programmable control unit module And a plurality of input/output modules, each of the plurality of modules is provided with an EPA communication unit and a plurality of EPA communication interfaces associated with the EPA communication unit, and each module passes a corresponding plurality of One or two of the EPA communication interfaces are serially connected to another one or two modules of the plurality of modules to form a first EPA communication bus between the plurality of modules, and the first The EPA communication bus is used to implement EPA communication between the multiple modules. In this way, it is helpful to improve the efficiency of data communication between various modules included in the programmable logic controller without causing problems such as data packet loss and data link congestion, and is also conducive to increasing network bandwidth. utilization rate.

图1示出了根据本公开的一些实施例的示例性可编程逻辑控制器100的示意图。如图1所示,可编程逻辑控制器100包括多个模块,即可编程控制单元模块110、第一输入/输出模块120-1、第二输入/输出模块120-2和第三输入/输出模块120-3 。应注意,虽然在图1中示出了可编程逻辑控制器100包括三个输入/输出模块,但是在实际使用中,可编程逻辑控制器100可包括更多或更少的输入/输出模块,具体取决于该可编程逻辑控制器100的应用场景。实际上,在本公开中,由于各个模块之间是通过EPA总线连接的,因此可编程逻辑控制器100可被实现为总共包括小于或等于255个模块,因为EPA总线的同一网段内可安装255个EPA节点。另外,虽然图1中未示出,但可编程逻辑控制器100还应包括电源模块,以为可编程逻辑控制器100中的各个其他模块进行供电,但是由于电源模块通常不参与数据通信,因此在本公开中后续部分中提及的各个模块并不涉及电源模块。Figure 1 shows a schematic diagram of an example programmable logic controller 100 in accordance with some embodiments of the present disclosure. As shown in Figure 1, the programmable logic controller 100 includes a plurality of modules, namely a programmable control unit module 110, a first input/output module 120-1, a second input/output module 120-2 and a third input/output module. Module 120-3. It should be noted that although the programmable logic controller 100 is shown in FIG. 1 as including three input/output modules, in actual use, the programmable logic controller 100 may include more or less input/output modules. It depends on the application scenario of the programmable logic controller 100 . In fact, in the present disclosure, since various modules are connected through the EPA bus, the programmable logic controller 100 can be implemented to include a total of less than or equal to 255 modules, because the EPA bus can be installed in the same network segment. 255 EPA nodes. In addition, although not shown in Figure 1, the programmable logic controller 100 should also include a power module to provide power to various other modules in the programmable logic controller 100. However, since the power module usually does not participate in data communication, it is Various modules mentioned in subsequent sections of this disclosure do not refer to power modules.

在本公开中,可编程逻辑控制器100被实现为基于EPA总线的可编程逻辑控制器(具体实现方式可参考下面的描述),因此该可编程逻辑控制器100所包括的每一个模块(即,可编程控制单元模块110、第一输入/输出模块120-1、第二输入/输出模块120-2和第三输入/输出模块120-3 )上都设置有EPA通信单元以及多个EPA通信接口(图中未示出),以便实现该模块与其他模块之间基于EPA总线的连接和通信。例如,每一输入/输出模块都可在现有的相应输入/输出模块的基础上添加EPA通信单元以及多个EPA通信接口来实现,因此实现起来较为简单。EPA通信单元可由写有EPA总线程序的芯片实现。虽然在图1中示出了可编程逻辑控制器100所包括的每一个模块上设置有四个EPA通信接口,但是在实际使用中,每一模块上可设置有更多或更少的EPA通信接口,具体取决于各个模块之间需要形成的拓扑连接结构。另外,应领会,在图1中每一模块所包括的EPA通信接口是可互换地使用的。在本公开中,EPA通信接口可被实现为例如LVDS接口、PCIe接口等。In the present disclosure, the programmable logic controller 100 is implemented as a programmable logic controller based on the EPA bus (for specific implementation, please refer to the description below), so each module included in the programmable logic controller 100 (i.e. , the programmable control unit module 110, the first input/output module 120-1, the second input/output module 120-2 and the third input/output module 120-3) are all provided with an EPA communication unit and multiple EPA communications Interface (not shown in the figure) in order to realize the connection and communication between this module and other modules based on the EPA bus. For example, each input/output module can be implemented by adding an EPA communication unit and multiple EPA communication interfaces to the existing corresponding input/output module, so it is relatively simple to implement. The EPA communication unit can be implemented by a chip written with an EPA bus program. Although it is shown in FIG. 1 that each module included in the programmable logic controller 100 is provided with four EPA communication interfaces, in actual use, each module may be provided with more or less EPA communication interfaces. interface, depending on the topological connection structure that needs to be formed between the various modules. Additionally, it should be appreciated that the EPA communication interfaces included with each module in Figure 1 are used interchangeably. In the present disclosure, the EPA communication interface may be implemented as, for example, an LVDS interface, a PCIe interface, or the like.

在本公开中,可编程控制单元模块110主要包括微处理器和存储器,其主要用于不断地采集输入信号,执行用户程序以处理数据,并刷新系统的输出。In the present disclosure, the programmable control unit module 110 mainly includes a microprocessor and a memory, which is mainly used to continuously collect input signals, execute user programs to process data, and refresh the output of the system.

在本公开中,第一输入/输出模块120-1、第二输入/输出模块120-2和第三输入/输出模块120-3可具有相应的模块类型,该模块类型可以是数据输入类型的模块(其可以是数字量输入模块或模拟量输入模块)、或者是数据输出类型的模块(其可以是数字量输出模块或模拟量输出模块)、或者是数据输入和输出类型的模块(其可以是各种网络通信模块,例如以太网通信模块、串口通信模块)。数字量输入模块用来接收从按钮、选择开关、数字拨码开关、限位开关、接近开关、光电开关、压力继电器等来的开关量输入信号。模拟量输入模块用来接收诸如电位器、测速发电机和各种变送器等提供的连续变化的模拟量电流、电压信号,或者直接接收诸如热电阻、热电偶等提供的温度信号或者湿度信号等等。数字量输出模块用来控制接触器、电磁阀、电磁铁、指示灯、数字显示装置和报警装置等输出设备,模拟量输出模块用来控制电动调节阀、变频器等执行器。在本公开中,数据输入类型的模块指示用于从与该模块连接的外部设备(诸如,各种开关、按钮、传感器等)采集数据,并将该模块采集到的数据提供给可编程控制单元模块进行处理的模块。数据输出类型的模块指示用于从可编程控制单元模块接收数据(通常为控制指令),并将接收到的数据输出到与该模块连接的外部设备(诸如,接触器、电磁阀、电磁铁、指示灯、数字显示装置、报警装置、电动调节阀、变频器以及其他执行机构等等),以便实现对该外部设备的控制等的模块。数据输入和输出类型的模块指示既需要从与该模块连接的第一外部设备(诸如,第一计算设备)采集数据以将采集到的数据提供给可编程控制单元模块进行处理,又需要从可编程控制单元模块接收控制指令之类的数据以将接收到的数据输出到与该模块连接的第二外部设备(诸如,第二计算设备),以便实现对该第二外部设备的控制的模块,第一外部设备和第二外部设备可以是相同的外部设备也可以是不同的外部设备。In the present disclosure, the first input/output module 120-1, the second input/output module 120-2, and the third input/output module 120-3 may have corresponding module types, and the module type may be a data input type. module (which can be a digital input module or an analog input module), or a data output type module (which can be a digital output module or an analog output module), or a data input and output type module (which can It is a variety of network communication modules, such as Ethernet communication module, serial communication module). The digital input module is used to receive switching input signals from buttons, selector switches, digital dial switches, limit switches, proximity switches, photoelectric switches, pressure relays, etc. The analog input module is used to receive continuously changing analog current and voltage signals provided by potentiometers, tachometer generators and various transmitters, or directly receive temperature signals or humidity signals provided by thermal resistors, thermocouples, etc. etc. Digital output modules are used to control output devices such as contactors, solenoid valves, electromagnets, indicator lights, digital display devices and alarm devices, while analog output modules are used to control actuators such as electric regulating valves and frequency converters. In the present disclosure, a data input type module indicates that it is used to collect data from external devices connected to the module (such as various switches, buttons, sensors, etc.) and provide the data collected by the module to a programmable control unit module for processing. The data output type module indication is used to receive data (usually control instructions) from the programmable control unit module and output the received data to external devices connected to the module (such as contactors, solenoid valves, electromagnets, Indicator lights, digital display devices, alarm devices, electric control valves, frequency converters and other actuators, etc.) in order to realize the control of the external equipment. Module indications of the data input and output types require both collecting data from a first external device (such as a first computing device) connected to the module to provide the collected data to the programmable control unit module for processing, and from a programmable control unit module for processing. a module that programs the control unit module to receive data such as control instructions to output the received data to a second external device (such as a second computing device) connected to the module in order to achieve control of the second external device, The first external device and the second external device may be the same external device or different external devices.

在本公开中,在输入/输出模块属于数据输入类型的模块的情况下,该输入/输出模块除了包括EPA通信单元以经由EPA通信接口与可编程逻辑控制器中的其他模块进行通信之外,还包括数据接收单元以经由相应的多通道数据采集接口从与其连接的外部设备(诸如,各种开关、按钮、传感器等)获取数据。具体地,这种数据输入类型的模块可从通过多通道数据采集接口与其连接的外部设备采集所需的数据,采集到的数据再通过该模块所连接到相应EPA通信总线输入(或发送)到可编程控制单元模块。因此,在本公开中,这种数据输入类型的模块需要通过相应的EPA通信总线输入到可编程控制单元模块的数据量取决于其多通道数据采集接口所包括的数据采集通道的数量以及各个数据采集通道每次可采集的数据量。In the present disclosure, in the case where the input/output module is a data input type module, in addition to including an EPA communication unit to communicate with other modules in the programmable logic controller via the EPA communication interface, A data receiving unit is also included to acquire data from external devices connected thereto (such as various switches, buttons, sensors, etc.) via corresponding multi-channel data acquisition interfaces. Specifically, this data input type module can collect the required data from external devices connected to it through a multi-channel data acquisition interface, and the collected data is then input (or sent) to the corresponding EPA communication bus connected to the module. Programmable control unit module. Therefore, in the present disclosure, the amount of data that this data input type module needs to input to the programmable control unit module through the corresponding EPA communication bus depends on the number of data acquisition channels included in its multi-channel data acquisition interface and the individual data The amount of data that can be collected by the acquisition channel each time.

在输入/输出模块属于数据输出类型的模块的情况下,该输入/输出模块除了包括EPA通信单元以经由EPA通信接口与可编程逻辑控制器中的其他模块进行通信之外,还包括数据发送单元以经由相应的多通道数据输出接口向与其连接的外部设备(诸如接触器、电磁阀、电磁铁、指示灯、数字显示装置、报警装置、电动调节阀、变频器以及其他执行机构等等)输出(或发送)数据。具体地,可编程控制单元模块经由相应的EPA通信总线发送给这种数据输出类型的模块的数据(通常为控制指令)需进一步由该数据输出类型的模块通过其多通道数据输出接口输出(或发送)到与该数据输出类型的模块连接的外部设备,以便基于这些数据对该相应的外部设备进行控制等。因此,在本公开中,这种数据输出类型的模块可通过相应的EPA通信总线从可编程控制单元模块接收的数据量取决于其多通道数据输出接口所包括的数据输出通道的数量以及各个数据输出通道每次可输出的数据量。In the case where the input/output module is a data output type module, the input/output module also includes a data sending unit in addition to an EPA communication unit to communicate with other modules in the programmable logic controller via the EPA communication interface Output to external devices connected to it (such as contactors, solenoid valves, electromagnets, indicator lights, digital display devices, alarm devices, electric control valves, frequency converters and other actuators, etc.) through corresponding multi-channel data output interfaces (or send) data. Specifically, the data (usually control instructions) sent by the programmable control unit module to the module of this data output type via the corresponding EPA communication bus needs to be further output by the module of this data output type through its multi-channel data output interface (or Send) to the external device connected to the module of this data output type, so that the corresponding external device can be controlled based on these data. Therefore, in the present disclosure, the amount of data that this data output type module can receive from the programmable control unit module through the corresponding EPA communication bus depends on the number of data output channels included in its multi-channel data output interface and the individual data The amount of data that the output channel can output each time.

在输入/输出模块属于数据输入输出类型的模块的情况下,该输入/输出模块除了包括EPA通信单元以经由EPA通信接口与可编程逻辑控制器中的其他模块进行通信之外,还包括数据接收单元以经由相应的数据采集接口接收与其连接的第一外部设备(诸如,第一计算设备)的数据,并且还包括数据发送单元以经由相应的数据输出接口向与其连接的第二外部设备(诸如,第二计算设备)发送数据。如上所述,这里第一外部设备和第二外部设备可以是相同的设备,也可以是不同的设备。具体地,一方面,这种数据输入输出类型的模块可以从通过数据采集接口与其连接的第一外部设备获取所需的数据,所获取的数据需再通过该模块所连接到相应EPA通信总线输入(或发送)到可编程控制单元模块。因此,在本公开中,这种数据输入输出类型的模块需通过相应的EPA通信总线输入到可编程控制单元模块的数据量取决于其数据采集接口每次可获取的数据量。另一方面,可编程控制单元模块可经由相应的EPA通信总线向这种数据输入输出类型的模块发送数据(通常为控制指令),该数据(或控制指令)是需由该数据输入输出类型的模块通过其数据输出接口输出(或发送)到与该数据输出类型的模块连接的第二外部设备,以便基于这些数据对该相应的第二外部设备进行控制等的数据。因此,在本公开中,这种数据输入输出类型的模块可通过相应的EPA通信总线从可编程控制单元模块接收的数据量实际上取决于其数据输出接口每次可输出的数据量。In the case where the input/output module is a module of the data input/output type, the input/output module, in addition to including an EPA communication unit to communicate with other modules in the programmable logic controller via the EPA communication interface, also includes data reception The unit is to receive data from a first external device connected thereto (such as a first computing device) via a corresponding data acquisition interface, and further includes a data sending unit to send data to a second external device connected thereto (such as a first computing device) via a corresponding data output interface. , the second computing device) sends data. As mentioned above, the first external device and the second external device may be the same device or different devices. Specifically, on the one hand, this data input and output type module can obtain the required data from the first external device connected to it through the data acquisition interface. The obtained data needs to be connected to the corresponding EPA communication bus input through the module. (or sent) to the programmable control unit module. Therefore, in the present disclosure, the amount of data that this data input and output type module needs to input to the programmable control unit module through the corresponding EPA communication bus depends on the amount of data that its data acquisition interface can obtain each time. On the other hand, the programmable control unit module can send data (usually control instructions) to this data input and output type module via the corresponding EPA communication bus. The data (or control instructions) are required by this data input and output type. The module outputs (or sends) data to a second external device connected to the module of this data output type through its data output interface, so as to control the corresponding second external device based on these data. Therefore, in the present disclosure, the amount of data that this data input and output type module can receive from the programmable control unit module through the corresponding EPA communication bus actually depends on the amount of data that its data output interface can output at a time.

在本公开中,由于各个输入/输出模块都需要与可编程控制单元模块110进行数据交换,因此可编程控制单元模块110可被设置为主时钟,多个输入/输出模块120-1到120-3可被设置为从时钟,从而使得在这些模块需要进行通信时,可事先使得各个输入/输出模块120-1到120-3与可编程控制单元模块110进行时钟同步。In the present disclosure, since each input/output module needs to exchange data with the programmable control unit module 110, the programmable control unit module 110 can be set as the main clock, and the multiple input/output modules 120-1 to 120- 3 can be set as a slave clock, so that when these modules need to communicate, each input/output module 120-1 to 120-3 can be clock synchronized with the programmable control unit module 110 in advance.

在本公开中,可编程逻辑控制器中包括的每一模块都分别通过相应的多个EPA通信接口中的一个或两个EPA通信接口与该可编程逻辑控制器中包括的另外的一个或两个模块串行连接,以在该多个模块之间形成EPA通信总线,因此该可编程逻辑控制器相当于一个由这些模块连接而成的EPA通信系统,各个模块都可经由所形成的EPA通信总线与其他模块进行通信。In the present disclosure, each module included in the programmable logic controller communicates with one or two other modules included in the programmable logic controller through one or two EPA communication interfaces among the corresponding plurality of EPA communication interfaces. The modules are connected in series to form an EPA communication bus between the multiple modules. Therefore, the programmable logic controller is equivalent to an EPA communication system connected by these modules. Each module can communicate through the formed EPA. Bus communicates with other modules.

例如,在图1所示的示例中,可编程控制单元模块110通过EPA通信接口101与第一输入/输出模块120-1连接,第一输入/输出模块120-1分别通过EPA通信接口111和112与可编程控制单元模块110和第二输入/输出模块120-2串行连接,第二输入/输出模块120-2则分别通过EPA通信接口121和122与第一输入/输出模块120-1和第三输入/输出模块120-3串行连接,并且第三输入/输出模块则通过EPA通信接口131与第二输入/输出模块120-2连接,从而形成了可编程逻辑控制器100的第一EPA通信总线,该第一 EPA通信总线可用于实现该多个模块之间的EPA通信。在图1所示的实施例中,所实现的第一EPA通信总线为线形EPA通信总线。应领会,当可编程逻辑控制器100包括更多的模块时,也可通过与图1类似的连接方式来形成相应的线形的第一EPA通信总线。For example, in the example shown in Figure 1, the programmable control unit module 110 is connected to the first input/output module 120-1 through the EPA communication interface 101, and the first input/output module 120-1 is connected through the EPA communication interface 111 and 112 is serially connected to the programmable control unit module 110 and the second input/output module 120-2, and the second input/output module 120-2 is connected to the first input/output module 120-1 through the EPA communication interfaces 121 and 122 respectively. It is connected in series with the third input/output module 120-3, and the third input/output module is connected with the second input/output module 120-2 through the EPA communication interface 131, thus forming the third input/output module of the programmable logic controller 100. An EPA communication bus, the first EPA communication bus can be used to implement EPA communication between the plurality of modules. In the embodiment shown in Figure 1, the first EPA communication bus implemented is a linear EPA communication bus. It should be understood that when the programmable logic controller 100 includes more modules, a corresponding linear first EPA communication bus can also be formed through a connection method similar to that in FIG. 1 .

图2示出了根据本公开的另一些实施例的示例性可编程逻辑控制器200的示意图。可编程逻辑控制器200也被实现为基于EPA总线的可编程逻辑控制器。如图2所示,可编程逻辑控制器200包括多个模块,即可编程控制单元模块210、第一输入/输出模块220-1、第二输入/输出模块220-2和第三输入/输出模块220-3,其分别与如图1所示的可编程控制单元模块110、第一输入/输出模块120-1、第二输入/输出模块120-2和第三输入/输出模块120-3类似 。图2所示的实施例与图1所示的实施例类似,只是在图2所示的实施例中,除了形成了如图2中的细实线所示的第一EPA通信总线之外,还形成了如图2中的粗实线所示的第二EPA通信总线,使得在第一EPA通信总线出现问题时,可编程逻辑控制器200中包括的各个模块之间可通过第二EPA通信总线来进行通信。Figure 2 shows a schematic diagram of an exemplary programmable logic controller 200 in accordance with further embodiments of the present disclosure. The programmable logic controller 200 is also implemented as an EPA bus-based programmable logic controller. As shown in Figure 2, the programmable logic controller 200 includes a plurality of modules, namely a programmable control unit module 210, a first input/output module 220-1, a second input/output module 220-2 and a third input/output module. Module 220-3, which is respectively related to the programmable control unit module 110, the first input/output module 120-1, the second input/output module 120-2 and the third input/output module 120-3 as shown in Figure 1 similar. The embodiment shown in FIG. 2 is similar to the embodiment shown in FIG. 1 , except that in the embodiment shown in FIG. 2 , in addition to forming a first EPA communication bus as shown by the thin solid line in FIG. 2 , A second EPA communication bus as shown by the thick solid line in Figure 2 is also formed, so that when a problem occurs with the first EPA communication bus, various modules included in the programmable logic controller 200 can communicate through the second EPA bus for communication.

具体地,在图2中,可编程控制单元模块210通过EPA通信接口201与第一输入/输出模块220-1连接,第一输入/输出模块220-1则分别通过EPA通信接口211和212与可编程控制单元模块210和第二输入/输出模块220-2串行连接,第二输入/输出模块220-2则分别通过EPA通信接口221和222与第一输入/输出模块220-1和第三输入/输出模块220-3串行连接,并且第三输入/输出模块220-3则通过EPA通信接口231与第二输入/输出模块220-2连接,从而形成了可编程逻辑控制器200的第一EPA通信总线(如图2中的细实线所示),该第一 EPA通信总线可用于实现该多个模块之间的EPA通信。Specifically, in Figure 2, the programmable control unit module 210 is connected to the first input/output module 220-1 through the EPA communication interface 201, and the first input/output module 220-1 is connected to the first input/output module 220-1 through the EPA communication interfaces 211 and 212 respectively. The programmable control unit module 210 and the second input/output module 220-2 are connected in series, and the second input/output module 220-2 is connected to the first input/output module 220-1 and the first input/output module 220-1 through the EPA communication interfaces 221 and 222 respectively. The three input/output modules 220-3 are connected in series, and the third input/output module 220-3 is connected to the second input/output module 220-2 through the EPA communication interface 231, thereby forming a programmable logic controller 200. A first EPA communication bus (shown as a thin solid line in Figure 2), the first EPA communication bus can be used to implement EPA communication between the multiple modules.

在图2中,可编程控制单元模块210还通过EPA通信接口202与第一输入/输出模块220-1连接,第一输入/输出模块220-1则还分别通过EPA通信接口213和214与可编程控制单元模块210和第二输入/输出模块220-2串行连接,第二输入/输出模块220-2则还分别通过EPA通信接口223和224与第一输入/输出模块220-1和第三输入/输出模块220-3串行连接,并且第三输入/输出模块220-3则还通过EPA通信接口233与第二输入/输出模块220-2连接,从而形成了可编程逻辑控制器200的第二EPA通信总线(如图2中的粗实线所示),该第二EPA通信总线也可用于实现该多个模块之间的EPA通信。In Figure 2, the programmable control unit module 210 is also connected to the first input/output module 220-1 through the EPA communication interface 202, and the first input/output module 220-1 is also connected to the programmable control unit module 220-1 through the EPA communication interfaces 213 and 214 respectively. The programming control unit module 210 and the second input/output module 220-2 are connected in series, and the second input/output module 220-2 is also connected to the first input/output module 220-1 and the first input/output module 220-1 through the EPA communication interfaces 223 and 224 respectively. The three input/output modules 220-3 are connected in series, and the third input/output module 220-3 is also connected to the second input/output module 220-2 through the EPA communication interface 233, thereby forming the programmable logic controller 200 A second EPA communication bus (shown as a thick solid line in Figure 2), this second EPA communication bus can also be used to implement EPA communication between the multiple modules.

如图2所示,所实现的第一EPA通信总线和第二EPA通信总线均为线形EPA通信总线。应领会,当可编程逻辑控制器200包括更多的模块时,也可通过与图2类似连接的方式来形成相应的线形的第一EPA通信总线和线形的第二EPA通信总线,其中第一EPA通信总线和第二EPA通信总线为可编程逻辑控制器的冗余通信总线。例如,第一EPA通信总线和第二EPA通信总线收发的系统数据相同且同步,当第一EPA通信总线和第二EPA通信总线中的任一者因故障断掉时,另一者仍可继续工作。As shown in Figure 2, the first EPA communication bus and the second EPA communication bus implemented are both linear EPA communication buses. It should be understood that when the programmable logic controller 200 includes more modules, the corresponding linear first EPA communication bus and the linear second EPA communication bus can also be formed in a manner similar to that shown in FIG. 2 , where the first The EPA communication bus and the second EPA communication bus are redundant communication buses of the programmable logic controller. For example, the system data sent and received by the first EPA communication bus and the second EPA communication bus are the same and synchronized. When either one of the first EPA communication bus and the second EPA communication bus is disconnected due to a fault, the other one can still continue. Work.

图3示出了根据本公开的再一些实施例的示例性可编程逻辑控制器300的示意图。可编程逻辑控制器300也被实现为基于EPA总线的可编程逻辑控制器。如图3所示,可编程逻辑控制器300包括多个模块,即可编程控制单元模块310、第一输入/输出模块320-1、第二输入/输出模块320-2和第三输入/输出模块320-3 ,其分别与如图1所示的可编程控制单元模块110、第一输入/输出模块120-1、第二输入/输出模块120-2和第三输入/输出模块120-3类似。图3所示的实施例与图1所示的实施例类似,只是在图3所示的实施例中,第三输入/输出模块320-3除了通过EPA通信接口331与第二输入/输出模块串行连接外,还通过通信接口332与可编程控制单元模块310串行连接,从而使得第一EPA通信总线闭合成为环形EPA通信总线。应领会,当可编程逻辑控制器300包括更多的模块时,也可通过与图3类似连接的方式来形成相应的环形的第一EPA通信总线。在采用环形总线结构时,该总线中任一模块断开,都不会造成整条总线的瘫痪。Figure 3 shows a schematic diagram of an exemplary programmable logic controller 300 in accordance with further embodiments of the present disclosure. The programmable logic controller 300 is also implemented as an EPA bus-based programmable logic controller. As shown in Figure 3, the programmable logic controller 300 includes a plurality of modules, namely a programmable control unit module 310, a first input/output module 320-1, a second input/output module 320-2 and a third input/output module. Module 320-3, which is respectively related to the programmable control unit module 110, the first input/output module 120-1, the second input/output module 120-2 and the third input/output module 120-3 as shown in Figure 1 similar. The embodiment shown in Figure 3 is similar to the embodiment shown in Figure 1, except that in the embodiment shown in Figure 3, the third input/output module 320-3 communicates with the second input/output module in addition to the EPA communication interface 331. In addition to the serial connection, it is also connected serially to the programmable control unit module 310 through the communication interface 332, thereby closing the first EPA communication bus into a ring-shaped EPA communication bus. It should be understood that when the programmable logic controller 300 includes more modules, a corresponding ring-shaped first EPA communication bus can also be formed through a similar connection method as shown in FIG. 3 . When using a ring bus structure, the disconnection of any module in the bus will not cause the entire bus to be paralyzed.

图4示出了根据本公开的又一些实施例的示例性可编程逻辑控制器400的示意图。可编程逻辑控制器400也被实现为基于EPA总线的可编程逻辑控制器。如图4所示,可编程逻辑控制器400包括多个模块,即可编程控制单元模块410、第一输入/输出模块420-1、第二输入/输出模块420-2和第三输入/输出模块420-3 ,其分别与如图2所示的可编程控制单元模块210、第一输入/输出模块220-1、第二输入/输出模块220-2和第三输入/输出模块220-3类似。图4所示的实施例与图2所示的实施例类似,只是在图4所示的实施例中,第三输入/输出模块420-3除了通过EPA通信接口431与第二输入/输出模块串行连接外,还通过通信接口432与可编程控制单元模块310串行连接,从而使得相应的第一EPA通信总线(如图4中的细实线所示)闭合成为环形EPA通信总线,此外第三输入/输出模块420-3除了通过EPA通信接口433与第二输入/输出模块串行连接外,还通过通信接口434与可编程控制单元模块410串行连接,从而使得相应的第二EPA通信总线(如图4中的粗实线所示)也闭合成为环形EPA通信总线。应领会,当可编程逻辑控制器400包括更多的模块时,也可通过与图4类似的连接方式来形成相应的环形的第一EPA通信总线和环形的第二EPA通信总线,其中第一EPA通信总线和第二EPA通信总线为可编程逻辑控制器的冗余通信总线。例如,第一EPA通信总线和第二EPA通信总线收发的系统数据相同且同步,当第一EPA通信总线和第二EPA通信总线中的任一者因故障断掉时,另一者仍可继续工作。Figure 4 shows a schematic diagram of an exemplary programmable logic controller 400 in accordance with further embodiments of the present disclosure. The programmable logic controller 400 is also implemented as an EPA bus-based programmable logic controller. As shown in Figure 4, the programmable logic controller 400 includes a plurality of modules, namely a programmable control unit module 410, a first input/output module 420-1, a second input/output module 420-2 and a third input/output module. Module 420-3, which is respectively related to the programmable control unit module 210, the first input/output module 220-1, the second input/output module 220-2 and the third input/output module 220-3 as shown in Figure 2 similar. The embodiment shown in Figure 4 is similar to the embodiment shown in Figure 2, except that in the embodiment shown in Figure 4, the third input/output module 420-3 communicates with the second input/output module in addition to the EPA communication interface 431. In addition to the serial connection, it is also connected serially to the programmable control unit module 310 through the communication interface 432, so that the corresponding first EPA communication bus (shown as a thin solid line in Figure 4) is closed into a ring-shaped EPA communication bus. In addition In addition to being serially connected to the second input/output module through the EPA communication interface 433, the third input/output module 420-3 is also serially connected to the programmable control unit module 410 through the communication interface 434, so that the corresponding second EPA The communication bus (shown as a thick solid line in Figure 4) is also closed into a ring-shaped EPA communication bus. It should be understood that when the programmable logic controller 400 includes more modules, the corresponding ring-shaped first EPA communication bus and the ring-shaped second EPA communication bus can also be formed through a connection method similar to that shown in FIG. 4 , where the first The EPA communication bus and the second EPA communication bus are redundant communication buses of the programmable logic controller. For example, the system data sent and received by the first EPA communication bus and the second EPA communication bus are the same and synchronized. When either one of the first EPA communication bus and the second EPA communication bus is disconnected due to a fault, the other one can still continue. Work.

图5示出了根据本公开的实施例的用于可编程逻辑控制器的数据通信方法500的示意图。该可编程逻辑控制器是本公开所述的基于EPA总线的可编程逻辑控制器,其示例为例如可编程逻辑控制器100、200、300或400。方法500可由可编程逻辑控制器所包括的每一个模块执行。应当理解的是,方法500还可以包括未示出的附加框和/或可以省略所示出的框,本公开的范围在此方面不受限制。FIG. 5 shows a schematic diagram of a data communication method 500 for a programmable logic controller according to an embodiment of the present disclosure. The programmable logic controller is an EPA bus-based programmable logic controller described in the present disclosure, and an example thereof is, for example, the programmable logic controller 100, 200, 300 or 400. Method 500 may be performed by each module included in the programmable logic controller. It should be understood that method 500 may also include additional blocks not shown and/or blocks shown may be omitted, and the scope of the present disclosure is not limited in this regard.

在步骤502,在可编程逻辑控制器的每一模块处,接收可编程逻辑控制器的组态配置信息,该组态配置信息包括该可编程逻辑控制器中包括的各个模块的优先级顺序。In step 502, at each module of the programmable logic controller, configuration configuration information of the programmable logic controller is received, where the configuration configuration information includes the priority order of each module included in the programmable logic controller.

在本公开中,可编程逻辑控制器中包括的每一个模块都被分配了一定的优先级顺序,因此各个模块在通信周期的周期时间段和非周期时间段需占用的时间片可根据这样的优先级顺序来进行分配。In the present disclosure, each module included in the programmable logic controller is assigned a certain priority order, so the time slices that each module needs to occupy in the periodic time period and non-periodic time period of the communication cycle can be based on such allocated in order of priority.

在一些实施例中,各个数据输入类型的模块的优先级顺序高于各个数据输入输出类型的模块所包括的数据接收单元的优先级顺序,各个数据输入输出类型的模块所包括的数据接收单元的优先级顺序高于可编程控制单元模块的优先级顺序,可编程控制单元模块的优先级顺序高于各个数据输入输出类型的模块所包括的数据发送单元的优先级顺序,各个数据输入输出类型的模块所包括的数据发送单元的优先级顺序高于各个数据输出类型的模块的优先级顺序。在不同的数据输入类型的模块之间也存在一定的优先级顺序的排序,在不同的数据输入输出类型的模块的数据接收单元之间也存在一定的优先级顺序的排序,在不同的数据输出类型的模块之间也存在一定的优先级顺序的排序,在不同的数据输入输出类型的模块的数据发送单元之间也存在一定的优先级顺序的排序。例如,在图6所示的示例中,就采用了这样的优先级排序方式。在本公开中,由于各个数据输出类型的模块的优先级顺序是连续的,并且其需要接收的数据都是由可编程控制单元模块发出的,因此这些数据输出类型的模块可共用32字节的网络信息。In some embodiments, the priority order of the modules of each data input type is higher than the priority order of the data receiving units included in the modules of each data input and output type. The priority order of the data receiving units included in the modules of each data input and output type is higher. The priority order is higher than the priority order of the programmable control unit module. The priority order of the programmable control unit module is higher than the priority order of the data sending unit included in the modules of each data input and output type. The priority order of each data input and output type is The priority order of the data sending unit included in the module is higher than the priority order of the modules of the respective data output types. There is also a certain priority ordering between modules of different data input types. There is also a certain priority ordering between the data receiving units of modules of different data input and output types. Between different data output types, there is also a certain priority ordering. There is also a certain priority ordering between types of modules, and there is also a certain priority ordering between the data sending units of modules of different data input and output types. For example, in the example shown in Figure 6, such a priority sorting method is adopted. In this disclosure, since the priority order of the modules of each data output type is continuous, and the data they need to receive are all sent by the programmable control unit module, these modules of the data output type can share a 32-byte Internet Information.

在步骤504,确定该模块(即步骤502中提到的模块,其可以是可编程逻辑控制器中包括的任一模块)在通信周期的周期时间段期间需占用的第一时间片的长度。在本公开中,第一时间片的长度与模块所属的模块类型有关。In step 504, determine the length of the first time slice that the module (ie, the module mentioned in step 502, which may be any module included in the programmable logic controller) needs to occupy during the cycle time period of the communication cycle. In the present disclosure, the length of the first time slice is related to the module type to which the module belongs.

在本公开中,每一个通信周期都可包括周期时间段和非周期时间段,其中周期时间段用于传输实时性要求较高的周期数据,非周期时间段用于传输实时性要求不高的非周期数据。例如,下面将详细描述的由数据输入类型的模块采集到的数据、由数据输入输出类型的模块采集到的数据、需要发送给数据输出类型的模块的数据以及需要发送给数据输入输出类型的模块的数据都属于实时性要求较高的周期数据,因此需要在周期时间段期间进行传输。非周期数据可包括关于相应模块的诊断信息数据,如断线诊断数据、超量程诊断数据等。在本公开中,为了实现在周期时间段和非周期时间段期间的确定性通信,需要为每一模块确定其在周期时间段需要占用的第一时间片。例如,图6示出了根据本公开的实施例的示例性可编程逻辑控制器的通信周期的示意图。在图6所示的示例中,在可编程逻辑控制器包括数字量输入模块、模拟量输入模块、以太网通信模块、串口通信模块、可编程控制单元模块、模拟量输出模块,因此需要为所有这些模块确定第一时间片的长度和第二时间片的长度。如图6所示,对于通信周期的周期时间段,可编程逻辑控制器中包括的每一个模块分别具有相应的第一时间片t1到t8,该第一时间片的长度的确定将在下面更详细的描述。In the present disclosure, each communication cycle may include a periodic time period and a non-periodic time period, where the periodic time period is used to transmit periodic data with high real-time requirements, and the aperiodic time period is used to transmit data with low real-time requirements. Aperiodic data. For example, the data collected by the data input type module, the data collected by the data input and output type module, the data that needs to be sent to the data output type module and the data that needs to be sent to the data input and output type module will be described in detail below. The data are periodic data with high real-time requirements, so they need to be transmitted during the periodic time period. Aperiodic data may include diagnostic information data about the corresponding module, such as disconnection diagnostic data, over-range diagnostic data, etc. In the present disclosure, in order to achieve deterministic communication during the periodic time period and the non-periodic time period, it is necessary to determine for each module the first time slice that it needs to occupy during the periodic time period. For example, FIG. 6 shows a schematic diagram of a communication cycle of an exemplary programmable logic controller according to an embodiment of the present disclosure. In the example shown in Figure 6, the programmable logic controller includes digital input modules, analog input modules, Ethernet communication modules, serial communication modules, programmable control unit modules, and analog output modules. Therefore, all These modules determine the length of the first time slice and the length of the second time slice. As shown in Figure 6, for the periodic period of the communication cycle, each module included in the programmable logic controller has a corresponding first time slice t1 to t8. The length of the first time slice will be determined later. Detailed description.

在第一方面,如果步骤502中提到的模块属于数据输入类型的模块,则该模块仅包括数据接收单元,而不包括数据发送单元,因此该模块仅占用一个第一时间片。具体地,可基于该模块的多通道数据采集接口所包括的数据采集通道的数量、每一数据采集通道每次所能采集的数据量、相应EPA通信总线的数据传输速率以及该第一时间片的网络信息的长度确定该模块需占用的第一时间片的长度。在本文中,该相应EPA通信总线指的是用于将该模块采集到的数据输入到可编程控制单元模块的EPA通信总线,其可以是前面提到的第一EPA通信总线,也可以是前面提到的第二EPA通信总线。In the first aspect, if the module mentioned in step 502 belongs to the data input type module, the module only includes a data receiving unit and does not include a data sending unit, so the module only occupies one first time slice. Specifically, it can be based on the number of data collection channels included in the multi-channel data collection interface of the module, the amount of data that each data collection channel can collect each time, the data transmission rate of the corresponding EPA communication bus, and the first time slice. The length of the network information determines the length of the first time slice that the module needs to occupy. In this article, the corresponding EPA communication bus refers to the EPA communication bus used to input the data collected by the module to the programmable control unit module, which can be the first EPA communication bus mentioned above, or the previous one. The second EPA communication bus mentioned.

在一些实现中,这种数据输入类型的模块所占的第一时间片的长度可采用以下公式(1)来确定:In some implementations, the length of the first time slice occupied by a module of this data input type can be determined using the following formula (1):

(1) (1)

在以上公式(1)中,n表示所述模块的多通道数据采集接口所包括的数据采集通道的数量,x表示每一数据采集通道每次所能采集的数据的字节数,v表示相应EPA通信总线的数据传输速率(例如,千兆网络的数据传输速率为1*109,百兆网络的数据传输速率为1*108),y表示该第一时间片的网络信息的长度。在以上公式(1)中,所计算出的第一时间片的长度的单位为秒。In the above formula (1), n represents the number of data collection channels included in the multi-channel data collection interface of the module, x represents the number of bytes of data that each data collection channel can collect each time, and v represents the corresponding The data transmission rate of the EPA communication bus (for example, the data transmission rate of the Gigabit network is 1*109 and the data transmission rate of the Hundred Mbit network is 1*108 ), y represents the length of the network information of the first time slice. In the above formula (1), the unit of the calculated length of the first time slice is seconds.

另外,在本公开中,当nx小于最小数据字节数时,则nx取最小数据字节数。该最小数据字节数可以为32字节,并且网络信息的长度y也可以为32字节。In addition, in the present disclosure, when nx is less than the minimum number of data bytes, then nx takes the minimum number of data bytes. The minimum number of data bytes can be 32 bytes, and the length y of the network information can also be 32 bytes.

假设步骤502中提到的模块为数字量输入模块,其多通道数据采集接口所包括的数据采集通道的数量n为16,每一数据采集通道每次所能采集的数据量x为1bit,因此nx为16bit(即2个字节)。由于16bit小于最小数据字节数,因此将nx取为32字节。假设相应EPA通信总线的数据传输速率v为1*109,并且网络信息的长度也为32字节,因此该数字量输入模块的第一时间片的长度为Assume that the module mentioned in step 502 is a digital input module, the number n of data acquisition channels included in its multi-channel data acquisition interface is 16, and the amount of data x that can be collected by each data acquisition channel at a time is 1 bit, so nx is 16bit (ie 2 bytes). Since 16bit is less than the minimum number of data bytes, nx is taken as 32 bytes. Assume that the data transmission rate v of the corresponding EPA communication bus is 1*109 and the length of the network information is also 32 bytes, so the length of the first time slice of the digital input module is .

在第二方面,如果步骤502中提到的模块属于数据输出类型的模块,则该模块仅包括数据发送单元,而不包括数据接收单元,因此该模块仅占用一个第一时间片。具体地,可基于该模块的多通道数据输出接口所包括的数据输出通道的数量、每一数据输出通道每次所能传输的数据量以及相应EPA通信总线的数据传输速率来确定该模块需占用的第一时间片的长度。同样,该相应EPA通信总线指的是用于将可编程控制单元模块的数据发送给该数据输出类型的模块的EPA通信总线,其可以是前面提到的第一EPA通信总线,也可以是前面提到的第二EPA通信总线。In the second aspect, if the module mentioned in step 502 belongs to the data output type module, the module only includes a data sending unit and does not include a data receiving unit, so the module only occupies one first time slice. Specifically, the module can be determined based on the number of data output channels included in the module's multi-channel data output interface, the amount of data that each data output channel can transmit each time, and the data transmission rate of the corresponding EPA communication bus. The length of the first time slice. Similarly, the corresponding EPA communication bus refers to the EPA communication bus used to send the data of the programmable control unit module to the module of this data output type, which can be the first EPA communication bus mentioned above, or the previous one. The second EPA communication bus mentioned.

在一些实现中,这种数据输入类型的模块所占的第一时间片的长度可采用以下公式(2)来确定:In some implementations, the length of the first time slice occupied by a module of this data input type can be determined using the following formula (2):

(2) (2)

在以上公式(2)中,n表示该模块的多通道数据输出接口所包括的数据输出通道的数量,x表示每一数据输出通道每次所能输出的数据的字节数,v表示相应EPA通信总线的数据传输速率。In the above formula (2), n represents the number of data output channels included in the multi-channel data output interface of the module, x represents the number of bytes of data that each data output channel can output at a time, and v represents the corresponding EPA. The data transfer rate of the communication bus.

假设步骤502中提到的模块为数字量输出模块,该数字量输出模块的多通道数据输出接口所包括的数据输出通道的数量n为16,每一数据输出通道每次所能采集的数据量x为1bit,因此nx为16bit(即2个字节)。假设相应EPA通信总线的数据传输速率v为1*109,因此该数字量输出模块的第一时间片的长度为Assume that the module mentioned in step 502 is a digital output module. The number n of data output channels included in the multi-channel data output interface of the digital output module is 16. The amount of data that each data output channel can collect each time is x is 1bit, so nx is 16bit (ie 2 bytes). Assume that the data transmission rate v of the corresponding EPA communication bus is 1*109 , so the length of the first time slice of the digital output module is .

假设步骤502中提到的模块为模拟量输出模块,该模拟量输出模块的多通道数据输出接口所包括的数据输出通道的数量n为8,每一数据输出通道每次所能采集的数据量x为4字节,因此nx为32个字节。假设相应EPA通信总线的数据传输速率v为1*109,因此该模拟量输出模块的第一时间片的长度为Assume that the module mentioned in step 502 is an analog output module. The number n of data output channels included in the multi-channel data output interface of the analog output module is 8. The amount of data that each data output channel can collect each time is x is 4 bytes, so nx is 32 bytes. Assume that the data transmission rate v of the corresponding EPA communication bus is 1*109 , so the length of the first time slice of the analog output module is .

在本公开中,可编程逻辑控制器所包括的各个数据输出类型的模块可共用一个网络信息,因此这些数据输出类型的模块中的每一个数据输出类型的模块的第一时间片实际上相当于这些数据输出类型的模块在通信周期期间共用的一个时间片的子时间片,这些子时间片也可按照前面提到的优先级顺序在该共用的时间片之间进行排序。在本公开中,该共用的时间片的长度为y/v加上每一个数据输出类型的模块的第一时间片的长度,其中v表示相应EPA通信总线的数据传输速率,y表示网络信息的长度网络信息的长度为例如32字节。在本公开中,当该共用的时间片的长度小于时,可将该共用的时间片的长度设为等于/>,在本公开中该最小数据字节数可以为32字节,但是每一个数据输出类型的模块的第一时间片的长度可保持不变。In the present disclosure, each data output type module included in the programmable logic controller may share one network information, so the first time slice of each data output type module in these data output type modules is actually equivalent to These data output type modules share a sub-time slice of a time slice during the communication cycle, and these sub-time slices can also be ordered between the shared time slices according to the previously mentioned priority order. In the present disclosure, the length of the shared time slice is y/v plus the length of the first time slice of each data output type module, where v represents the data transmission rate of the corresponding EPA communication bus, and y represents the network information Length The length of the network information is, for example, 32 bytes. In the present disclosure, when the length of the shared time slice is less than When , the length of the shared time slice can be set equal to/> , in the present disclosure, the minimum number of data bytes may be 32 bytes, but the length of the first time slice of each data output type module may remain unchanged.

在第三方面,如果步骤502中提到的模块属于数据输入和输出类型的模块,则该数据输入和输出类型的模块既包括数据接收单元又包括数据发送单元,因此需要在两个方向上通过相应的EPA总线进行通信,因此该模块需占用两个第一时间片,即该模块所包括的数据接收单元需占用一个第一时间片,并且该模块所包括的数据发送单元也需占用一个第一时间片。在本公开中,可基于该模块所包括的数据接收单元通过相应的数据采集接口每次所能采集的第一数据量以及相应的EPA通信总线的数据传输速率确定该数据接收单元需占用的第一时间片的长度,并基于该模块所包括的数据发送单元通过相应的数据输出接口每次所能输出的第二数据量以及相应EPA通信总线的数据传输速率确定该数据发送单元需占用的第一时间片的长度。In the third aspect, if the module mentioned in step 502 belongs to the data input and output type module, then the data input and output type module includes both the data receiving unit and the data sending unit, so it needs to pass in both directions. The corresponding EPA bus communicates, so the module needs to occupy two first time slices, that is, the data receiving unit included in the module needs to occupy a first time slice, and the data sending unit included in the module also needs to occupy a first time slice. A time slice. In the present disclosure, the first amount of data that the data receiving unit included in the module can collect each time through the corresponding data collection interface and the data transmission rate of the corresponding EPA communication bus can be determined based on the first data amount that the data receiving unit needs to occupy. The length of a time slice, and based on the second data amount that the data sending unit included in the module can output each time through the corresponding data output interface and the data transmission rate of the corresponding EPA communication bus, it is determined that the data sending unit needs to occupy the third The length of a time slice.

在一些实现中,数据输入和输出类型的模块所包括的数据接收单元需占用的第一时间片的长度以及数据发送单元需占用的第一时间片的长度可分别采用以下公式(3)和(4)来确定:In some implementations, the length of the first time slice that needs to be occupied by the data receiving unit and the length of the first time slice that needs to be occupied by the data sending unit included in the data input and output type modules can respectively adopt the following formulas (3) and ( 4) To determine:

(3) (3)

(4) (4)

在以上公式(3)和(4)中,z1为该模块所包括的数据接收单元通过相应的数据采集接口每次所能采集的第一数据量,n2为该模块所包括的数据发送单元通过相应的数据输出接口每次所能输出的第二数据量,v为相应EPA通信总线的数据传输速率,y为网络信息的长度。在一些实施例中,该网络信息的长度可以为32字节。In the above formulas (3) and (4), z1 is the first data amount that the data receiving unit included in the module can collect each time through the corresponding data acquisition interface, and n2 is the data sending unit included in the module. The second amount of data that the unit can output each time through the corresponding data output interface, v is the data transmission rate of the corresponding EPA communication bus, and y is the length of the network information. In some embodiments, the length of the network information may be 32 bytes.

例如,假设步骤502中提到的模块为以太网通信模块,该以太网通信模块所包括的数据接收单元通过相应的数据采集接口每次所能采集的第一数据量x1为300字节,并且该以太网通信模块所包括的数据发送单元通过相应的数据输出接口每次所能输出的第二数据量x2为400字节,并且相应EPA通信总线的数据传输速率v为1*109,则可确定该以太网通信模块的该数据接收单元需占用的第一时间片的长度为,并且该以太网通信模块的该数据发送单元需占用的第一时间片的长度为/>For example, assuming that the module mentioned in step 502 is an Ethernet communication module, the first data amount x1 that the data receiving unit included in the Ethernet communication module can collect each time through the corresponding data collection interface is 300 bytes, And the second data amount x2 that the data sending unit included in the Ethernet communication module can output each time through the corresponding data output interface is 400 bytes, and the data transmission rate v of the corresponding EPA communication bus is 1*109 , then it can be determined that the length of the first time slice that the data receiving unit of the Ethernet communication module needs to occupy is , and the length of the first time slice that the data sending unit of the Ethernet communication module needs to occupy is/> .

在第四方面,如果步骤502中提到的模块为可编程控制单元模块,则可基于该可编程控制单元模块所需进行的处理的复杂度以及相应的CPU的性能确定所述模块所占的第一时间片的长度。这可使用确定现有的各种EPA设备的时间片的长度的方法来确定,本文中不再进一步进行赘述。In the fourth aspect, if the module mentioned in step 502 is a programmable control unit module, the proportion occupied by the module can be determined based on the complexity of the processing required by the programmable control unit module and the performance of the corresponding CPU. The length of the first time slice. This can be determined using a method of determining the length of time slices of various existing EPA devices, which will not be described further in this article.

回到图5,在步骤506,基于该多个模块(即可编程逻辑控制器中包括的多个)的优先级顺序确定该模块(即步骤502中提到的模块)需占用的第一时间片在周期时间段中的位置。Returning to Figure 5, in step 506, the first time that the module (ie, the module mentioned in step 502) needs to occupy is determined based on the priority order of the multiple modules (ie, the plurality of modules included in the programmable logic controller). The position of the piece in the period of time.

如上所述,可编程逻辑控制器中包括的每一个模块都被分配了一定的优先级顺序,并且每一个模块需占用的第一时间片的长度都可被事先确定,因此通过根据这些优先级顺序进行排序,就可确定每一个模块在周期时间段中的位置。As mentioned above, each module included in the programmable logic controller is assigned a certain priority order, and the length of the first time slice that each module needs to occupy can be determined in advance, so by based on these priorities By sorting in sequence, the position of each module in the cycle time period can be determined.

在步骤508,在每一通信周期的周期时间段期间,在该模块对应的第一时间片内,经由该模块的EPA通信接口在相应EPA通信总线上传输相应的数据。In step 508, during the cycle time period of each communication cycle, corresponding data is transmitted on the corresponding EPA communication bus via the EPA communication interface of the module within the first time slice corresponding to the module.

例如,该相应EPA通信总线可以是以上提到的第一EPA通信总线,也可以是以上提到的第二EPA通信总线,该第一EPA通信总线可以是线形EPA通信总线或环形EPA通信总线,同样该第二EPA通信总线也可以是线形EPA通信总线或环形EPA通信总线。For example, the corresponding EPA communication bus may be the first EPA communication bus mentioned above, or the second EPA communication bus mentioned above, and the first EPA communication bus may be a linear EPA communication bus or a ring EPA communication bus, Similarly, the second EPA communication bus can also be a linear EPA communication bus or a ring EPA communication bus.

通过本公开的以上技术方案,可保证该可编程逻辑控制器中的每一模块在通信周期的周期时间段内都具有确定的时间片来传输相应的数据,由于该时间片是根据各个模块需要发送或接收的数据量来确定的,因此可以避免通信的等待时间,因此可有效提高各个模块之间的数据通信效率,而且这种确定的时间片可确保即使在大容量逻辑运算控制时也不会出现数据丢包或拥堵,因此有效缩小了通信周期,保证了可编程逻辑控制器内部通信数据收发的确定性和同步性,进而解决了可编程逻辑控制器网络带宽利用率低的问题,并且提高了实时通信性能。因此,本公开的基于EPA总线的可编程逻辑控制器具有具备大容量运算控制能力以及执行能力。Through the above technical solution of the present disclosure, it can be ensured that each module in the programmable logic controller has a determined time slice to transmit corresponding data within the period of the communication cycle, because the time slice is based on the needs of each module. It is determined by the amount of data sent or received, so the waiting time of communication can be avoided, so the efficiency of data communication between various modules can be effectively improved, and this determined time slice can ensure that even when controlling large-capacity logic operations Data packet loss or congestion will occur, thus effectively shortening the communication cycle, ensuring the certainty and synchronization of communication data transmission and reception within the programmable logic controller, thereby solving the problem of low network bandwidth utilization of the programmable logic controller, and Improved real-time communication performance. Therefore, the programmable logic controller based on the EPA bus of the present disclosure has large-capacity computing control capabilities and execution capabilities.

在本公开中,数据通信方法500还可包括如果该模块(即步骤502中提到的模块)需要在当前通信周期的非周期时间段期间传输相应的非周期数据,则确定该模块在该非周期时间段期间需占用的第二时间片的长度。例如,在图6所示的示例中,仅数字量输入模块、以太网通信模块和模拟量输出模块需要在相应通信周期的非周期时间段期间传输相应的非周期数据。因此,这些模块需要确定相应的第二时间片的长度。然后,可基于可编程逻辑控制器所包括的多个模块中需要在该非周期时间段期间传输非周期数据的一个或多个模块的优先级顺序,确定该模块需占用的第二时间片在该非周期时间段中的位置。假设可编程逻辑控制器中有三个模块需要在该非周期时间段期间传输相应的非周期数据,则可按照该三个模块的优先级顺序,该三个模块的第二时间片进行排序,从而可以确定各个第二时间片在该非周期时间段中的位置。例如,在图6所示的示例中,需基于数字量输入模块、以太网通信模块和模拟量输出模块的优先级顺序来确定各个第二时间片在非周期时间段中的位置。在确定了第二时间片的位置之后,就可在通信周期的非周期时间段期间,在该模块对应的第二时间片内,经由该模块的EPA通信接口在相应EPA通信总线上传输相应的非周期数据。In the present disclosure, the data communication method 500 may further include if the module (ie, the module mentioned in step 502) needs to transmit corresponding aperiodic data during the aperiodic time period of the current communication cycle, then determining whether the module needs to transmit the corresponding aperiodic data during the non-periodic time period of the current communication cycle. The length of the second time slice to occupy during the period period. For example, in the example shown in FIG. 6 , only the digital input module, the Ethernet communication module and the analog output module need to transmit corresponding aperiodic data during the aperiodic time period of the corresponding communication cycle. Therefore, these modules need to determine the length of the corresponding second time slice. Then, based on the priority order of one or more modules that need to transmit aperiodic data during the aperiodic time period among the multiple modules included in the programmable logic controller, it can be determined that the second time slice that the module needs to occupy is in The position in this non-periodic time period. Assuming that there are three modules in the programmable logic controller that need to transmit corresponding aperiodic data during the aperiodic time period, the second time slices of the three modules can be sorted according to the priority order of the three modules, so that The position of each second time slice in the aperiodic time period can be determined. For example, in the example shown in FIG. 6 , the position of each second time slice in the aperiodic time period needs to be determined based on the priority order of the digital input module, the Ethernet communication module, and the analog output module. After determining the position of the second time slice, during the non-periodic time period of the communication cycle, in the second time slice corresponding to the module, the corresponding data can be transmitted on the corresponding EPA communication bus via the EPA communication interface of the module. Aperiodic data.

在本公开中,可基于相应模块需传输的非周期数据的数据量、相应EPA通信总线的数据传输速率以及网络信息的长度确定该模块在非周期时间段期间需占用的第二时间片的长度。In the present disclosure, the length of the second time slice that the module needs to occupy during the aperiodic time period can be determined based on the amount of aperiodic data that the corresponding module needs to transmit, the data transmission rate of the corresponding EPA communication bus, and the length of the network information. .

在一些实现中,各个模块需要占用的第二时间片的长度可采用以下公式(5)来确定:In some implementations, the length of the second time slice that each module needs to occupy can be determined using the following formula (5):

(5) (5)

在以上公式(5)中,l表示该模块需在当前通信周期的非周期时间段期间传输的非周期数据的数据量,v表示相应EPA通信总线的数据传输速率,y表示网络信息的长度。在以上公式(5)中,所计算出的第一时间片的长度的单位为秒。In the above formula (5), l represents the amount of aperiodic data that the module needs to transmit during the aperiodic time period of the current communication cycle, v represents the data transmission rate of the corresponding EPA communication bus, and y represents the length of the network information. In the above formula (5), the unit of the calculated length of the first time slice is seconds.

另外,在本公开中,当l小于最小数据字节数时,则可将l取为最小数据字节数。该最小数据字节数可以为32字节,并且网络信息的长度y也可以为32字节。In addition, in the present disclosure, when l is less than the minimum number of data bytes, then l may be taken as the minimum number of data bytes. The minimum number of data bytes can be 32 bytes, and the length y of the network information can also be 32 bytes.

另一方面,如果该模块(即步骤502中提到的模块)不需要在当前通信周期(即步骤502中提到的通信周期)的非周期时间段期间传输相应的非周期数据,则不需要确定该模块在该非周期时间段期间需占用的第二时间片的长度更不需要确定相应的第二时间片在该非周期时间段的位置。On the other hand, if the module (i.e., the module mentioned in step 502) does not need to transmit corresponding aperiodic data during the aperiodic time period of the current communication cycle (i.e., the communication cycle mentioned in step 502), then there is no need Determining the length of the second time slice that the module needs to occupy during the aperiodic time period does not require determining the position of the corresponding second time slice in the aperiodic time period.

通过以上技术手段,可在通信周期的非周期时间段中实现对第二时间片的动态分配,因此可以减小可编程逻辑控制器对总线实时区网络带宽的占用,进而有助于缩小可编程逻辑控制器的通信周期。Through the above technical means, the second time slice can be dynamically allocated in the non-periodic time period of the communication cycle. Therefore, the occupation of the network bandwidth in the real-time area of the bus by the programmable logic controller can be reduced, which in turn helps to reduce the size of the programmable logic controller. Logic controller communication cycle.

以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present disclosure have been described above. The above description is illustrative, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements in the market of the embodiments, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

6. The data communication method according to claim 5, wherein the priority order of the modules of the respective data input and output types is higher than the priority order of the data receiving units included in the modules of the respective data input and output types, the priority order of the data receiving units included in the modules of the respective data input and output types is higher than the priority order of the programmable control unit modules, the priority order of the programmable control unit modules is higher than the priority order of the data transmitting units included in the modules of the respective data input and output types, and the priority order of the data transmitting units included in the modules of the respective data input and output types is higher than the priority order of the modules of the respective data output types.
CN202311011486.4A2023-08-112023-08-11 Programmable logic controller and its data communication methodActiveCN116760659B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202311011486.4ACN116760659B (en)2023-08-112023-08-11 Programmable logic controller and its data communication method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202311011486.4ACN116760659B (en)2023-08-112023-08-11 Programmable logic controller and its data communication method

Publications (2)

Publication NumberPublication Date
CN116760659A CN116760659A (en)2023-09-15
CN116760659Btrue CN116760659B (en)2023-11-14

Family

ID=87953566

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202311011486.4AActiveCN116760659B (en)2023-08-112023-08-11 Programmable logic controller and its data communication method

Country Status (1)

CountryLink
CN (1)CN116760659B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117478501B (en)*2023-12-252024-10-11浙江国利信安科技有限公司 Method, control device and storage medium for configuration of EPA network

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
FR2864268A1 (en)*2003-12-172005-06-24Neurasis SocAutomatic process controlling system for industry, has reception module receiving digital data converted into binary configurations by data processing module, and recognition module recognizing pre-identified configurations
CN101510082A (en)*2009-03-192009-08-19大连理工大学Model building and optimizing method for functional block program of EPA distributing control system
CN101807070A (en)*2010-03-252010-08-18浙江中控电气技术有限公司Numerical control system and method based on EPA field bus
WO2013085121A1 (en)*2011-12-082013-06-13전자부품연구원Programmable logic controller using multiple buses
CN103744342A (en)*2014-01-222014-04-23大连理工计算机控制工程有限公司PAC (programmable automatic controller) real-time control system based on dual-core processor
CN105426562A (en)*2015-08-182016-03-23杭州优稳自动化系统有限公司UART communication method and apparatus between multiple IO modules and multiple communication modules
CN113518044A (en)*2021-09-152021-10-19浙江国利信安科技有限公司EPA equipment
CN115061793A (en)*2022-06-142022-09-16杭州和利时自动化有限公司Multitask execution method, multitask execution device, multitask execution equipment and multitask execution medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US10027699B2 (en)*2016-03-102018-07-17Siemens AktiengesellschaftProduction process knowledge-based intrusion detection for industrial control systems

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
FR2864268A1 (en)*2003-12-172005-06-24Neurasis SocAutomatic process controlling system for industry, has reception module receiving digital data converted into binary configurations by data processing module, and recognition module recognizing pre-identified configurations
CN101510082A (en)*2009-03-192009-08-19大连理工大学Model building and optimizing method for functional block program of EPA distributing control system
CN101807070A (en)*2010-03-252010-08-18浙江中控电气技术有限公司Numerical control system and method based on EPA field bus
WO2013085121A1 (en)*2011-12-082013-06-13전자부품연구원Programmable logic controller using multiple buses
CN103744342A (en)*2014-01-222014-04-23大连理工计算机控制工程有限公司PAC (programmable automatic controller) real-time control system based on dual-core processor
CN105426562A (en)*2015-08-182016-03-23杭州优稳自动化系统有限公司UART communication method and apparatus between multiple IO modules and multiple communication modules
CN113518044A (en)*2021-09-152021-10-19浙江国利信安科技有限公司EPA equipment
CN115061793A (en)*2022-06-142022-09-16杭州和利时自动化有限公司Multitask execution method, multitask execution device, multitask execution equipment and multitask execution medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于IEC61131-3标准的可编程控制器的研究与实现;仲崇权;于诗杰;;工业控制计算机(第10期);全文*

Also Published As

Publication numberPublication date
CN116760659A (en)2023-09-15

Similar Documents

PublicationPublication DateTitle
CN102170430A (en)Multi-port multi-network protocol converter
CN102035688B (en)Design method for rapidly controlling network link access
JP2021068200A (en)Control device and distributed control system
CN104767598B (en) A system and method for data transmission between field devices of energy storage power station
CN116760659B (en) Programmable logic controller and its data communication method
CN104009976B (en)A kind of real-time communication method being used between more main station systems and its equipment
US9019959B2 (en)Node, switch, and system
CN112769514A (en)Time-sensitive based communication device
CN111464466A (en) A multi-bus network communication architecture
CN108551423A (en) Industrial metering pump cluster remote monitoring dedicated multi-channel intelligent gateway
CN106168933B (en) A method of realizing virtual dual-port shared memory based on high-speed serial communication
CN108614789B (en)Communication system and method of serial port bus with handshake mechanism
US9843506B2 (en)Distributed control system and control method thereof
JPH0345042A (en)Data transmitter
CN107559182A (en)A kind of water pump control method and control system
CN101106504A (en) Distributed communication system for intelligent autonomous robot based on CAN bus
CN108667706A (en)The adjustable Ethernet serial server of serial ports quantity dynamic and its data transmission method
CN105262658A (en)Switching device, field-bus topological structure, and data transmission method
CN114461554A (en) Redundant communication control system, redundant communication control method, and integrated device
CN112511397B (en)Self-healing method of EPA (Ethernet for plant Automation) annular network
CN201167335Y (en) Profibus-DP bus serial port server
CN212276260U (en)Communication control device and motion control system based on multiple Ethernet
CN110663226A (en)Status signal output
CN210129113U (en)EtherCAT control structure with main line control and independent control
CN114205180A (en)High-speed bus transmission system for oil and gas pipeline

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
EE01Entry into force of recordation of patent licensing contract
EE01Entry into force of recordation of patent licensing contract

Application publication date:20230915

Assignee:Zhejiang Zhike Zhiyuan Technology Co.,Ltd.

Assignor:ZHEJIANG GUOLI XIN'AN TECHNOLOGY Co.,Ltd.

Contract record no.:X2024980042276

Denomination of invention:Programmable Logic Controller and Its Data Communication Method

Granted publication date:20231114

License type:Common License

Record date:20241231

PE01Entry into force of the registration of the contract for pledge of patent right
PE01Entry into force of the registration of the contract for pledge of patent right

Denomination of invention:Programmable Logic Controller and Its Data Communication Method

Granted publication date:20231114

Pledgee:Bank of Beijing Limited by Share Ltd. Hangzhou branch

Pledgor:ZHEJIANG GUOLI XIN'AN TECHNOLOGY Co.,Ltd.

Registration number:Y2025330000939


[8]ページ先頭

©2009-2025 Movatter.jp