Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
ROS-BASED PROGRAMMABLE LOGIC CONTROLLER, SYSTEM AND METHOD
Document Type and Number:
WIPO Patent Application WO/2019/063693
Kind Code:
A1
Abstract:
The present invention provides a programmable logic controller (PLC), comprising: an ROS container, the ROS container comprising an ROS module for acquiring data from a peripheral unit; a PLC module, the PLC module comprising a data region and a function region; and an adapter arranged between the ROS module and the PLC module, wherein the adapter comprises an I/O module and a storage module, and the PLC module is configured to acquire, by means of the I/O module, data processed by the ROS module, or acquire, by means of the storage module, the data acquired by the ROS module from the peripheral unit. By means of the PLC, a message exchange based on a publish/subscribe mechanism can be realized among a plurality of PLCs.

Inventors:
ZHUO, Yue (XueQing Road 29, HaiDian district XueQing Garden, Building 10, unit 2, ro, Beijing 4, 100084, CN)
LI, Dong (107 ChaoYangBei Road, 44-303 ZhuJiangLuoMaJiaYua, Beijing 5, 100025, CN)
YANG, Kai (jia no. 19, fushilu haidian District, zhonghaojiayuan 14-6-62, Beijing 6, 100036, CN)
Application Number:
EP2018/076263
Publication Date:
April 04, 2019
Filing Date:
September 27, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SIEMENS AKTIENGESELLSCHAFT (Werner-von-Siemens-Str. 1, München, 80333, DE)
International Classes:
G05B19/042
Foreign References:
US20040117535A12004-06-17
US20090210070A12009-08-20
US20120010772A12012-01-12
DE102006040416A12008-03-20
Other References:
None
Attorney, Agent or Firm:
ISARPATENT - PATENT- UND RECHTSANWÄLTE BEHNISCH BARTH CHARLES HASSA PECKMANN UND PARTNER MBB (Friedrichstraße 31, München, 80801, DE)
Download PDF:
Claims:
Claims

1. A programmable logic controller, comprising:

a robot operating system container (20) , the robot operating system container (20) comprising a robot operating system module (21) for acquiring data from a peripheral unit; a programmable logic controller module (10), the programmable logic controller module (10) comprising a data region (11) and a function region (12); and

an adapter (30) arranged between the robot operating system module (21) and the programmable logic controller module (10) ,

wherein the adapter (30) comprises an input/output module

(31) and a storage module (32), and the programmable logic controller module (10) is configured to acquire, by means of the input/output module (31), data processed by the robot operating system module (21), or acquire, by means of the storage module (32), the data acquired by the robot operating system module (21) from the peripheral unit.

2. The programmable logic controller as claimed in claim 1, wherein

when a data processing mode of the acquired data is a real-time processing mode, the robot operating system module (21) is configured to store the acquired data in the storage module (32), and the function region (12) is configured to have a piece of processing logic for the data in the storage module

(32) , so as to process the data in the storage module (32), or when the data processing mode of the acquired data is a non-real-time processing mode, the robot operating system module (21) is configured to have a piece of processing logic for the acquired data so as to process the acquired data, and the function region (12) is configured to acquire the processed data from the robot operating system module (21) by means of the input/output module (31) .

3. The programmable logic controller as claimed in claim

2, said programmable logic controller further comprising:

a peripheral mode detection unit (40) , which is used for detecting a data processing mode of the data from the peripheral unit; and

a configuration unit (50), which is used for configuring the robot operating system module (21) or the function region (12) according to the data processing mode detected by the peripheral mode detection unit (40), such that

when the detected data processing mode is the real-time processing mode, the robot operating system module (21) is configured to store the acquired data in the storage module (32), and the function region (12) is configured to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the data in the storage module (32), or

when the detected data processing mode is the non-realtime processing mode, the robot operating system module (21) is configured to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the acquired data, and the function region (12) is configured to acquire the processed data from the robot operating system module (21) by means of the input/output module ( 31 ) ,

wherein the plurality of pieces of pre-set processing logic are stored in association with the data processing mode in the programmable logic controller.

4. The programmable logic controller as claimed in claim

3, wherein the plurality of pieces of pre-set processing logic are stored in the robot operating system module (21) or the function region (12), or are stored in the configuration unit (50) .

5. The programmable logic controller as claimed in any of claims 1 to 4, said programmable logic controller further comprising :

a program management unit (60) for scheduling the robot operating system module (21) and the programmable logic controller module (10) to invoke various processing resources.

6. A programmable logic controller system, comprising a plurality of programmable logic controllers of any of claims 1 to 5, wherein data communication is performed among the plurality of programmable logic controllers by means of the adapter (30) and based on a publish/subscribe mechanism.

7. A method for controlling a programmable logic controller, wherein the programmable logic controller comprises a robot operating system container (20), an adapter (30) and a programmable logic controller module (10) , with the robot operating system container (20) comprising a robot operating system module (21) for acquiring data from a peripheral unit, the programmable logic controller module (10) comprising a data region (11) and a function region (12), and the adapter (30) comprising an input/output module (31) and a storage module (32); and the method comprises:

when a data processing mode of the data from the peripheral unit is determined to be a real-time processing mode, the robot operating system module (21) is configured to store the acquired data in the storage module (32) of the adapter (30), and the function region (12) is configured to have a piece of processing logic for the data in the storage module (32), so as to process the data in the storage module (32), and

when the data processing mode of the data from the peripheral unit is determined to be a non-real-time processing mode, the robot operating system module (21) is configured to have a piece of processing logic for the data acquired from the peripheral unit so as to process the acquired data, and the function region (12) is configured to acquire the processed data from the robot operating system module (21) by means of the input /output module (31) of the adapter (30) .

8. The method as claimed in claim 7, said method further comprising :

detecting the data processing mode of the data from the peripheral unit, and

when the detected data processing mode is the real-time processing mode, configuring the robot operating system module (21) to store the acquired data in the storage module (32), and configuring the function region (12) to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the data in the storage module ( 32 ) , or

when the detected data processing mode is the non-realtime processing mode, configuring the robot operating system module (21) to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the acquired data, and configuring the function region (12) to acquire the processed data from the robot operating system module (21) by means of the input/output module (31), wherein the plurality of pieces of pre-set processing logic are stored in association with the data processing mode in the programmable logic controller.

9. The method as claimed in claim 8, wherein the plurality of pieces of pre-set processing logic are stored in the robot operating system module (21) or the function region (12), or are stored in the configuration unit (50) .

10. A programmable logic controller, comprising:

one or more processors; and

a memory for storing instructions, which, when executed by the one or more processors, cause the one or more processors to execute the method of any of claims 7 to 9.

11. A non-transient machine-readable storage medium, wherein same stores executable instructions, which when executed, cause a machine to execute the method of any of claims 7 to 9.

Description:
Description

ROS-based programmable logic controller, system and method

Technical Field

The present application generally relates to the field of programmable logic controllers (PLCs), and in particular to a robot operating system (ROS) -based PLC, a PLC system, and a method for the PLC.

Background Art

PLC is an electronic digital computing operation system specifically designed for application in an industrial environment. It uses a programmable memory, stores instructions therein for executing logical operations, sequence control, timing, counting, arithmetical operations, etc., and controls various types of mechanical devices or production processes by means of a digital or analog input/output (I/O) .

Fig. 1 shows a schematic diagram of the structure of an existing PLC. As shown in Fig. 1, a PLC 10 generally comprises a data region 11 (also referred to as a data block) and a function region 12 (also referred to as a function block) . The data region 11 is used for storing data, such as data acquired from a peripheral unit or data output by the function region 12. The function region 12 is used for storing processing programs in the PLC, such as common processing logic of the PLC. In the structure shown in Fig. 1, since the processing logic of data is generally different, it is required to separately write an execution program in the function region 12 and to follow the writing rule specifically regulated in the PLC for each kind of data in the peripheral unit, and this writing method requires a writer to be familiar with the PLC writing rule and have rich programming experience. In addition, in the structure shown in Fig. 1, data exchange is generally performed in a centralized control manner among a plurality of PLCs, and this communication mechanism is not suitable for autonomous systems and applications.

Summary of the Invention

In order to solve the above-mentioned and/or the other technical problems, the present application provides a robot operating system (ROS) -based PLC, a PLC system, and a method for the PLC. By means of the structure, an ROS container comprising an ROS module and an adapter are arranged in the structure, and the ROS module performs ROS protocol-based processing on acquired data and interacts with the PLC module via the adapter, such that a PLC which is suitable for autonomous applications can be realized.

According to one aspect of the present application, a programmable logic controller (PLC) is provided, comprising: a robot operating system (ROS) container, the ROS container comprising an ROS module for acquiring data from a peripheral unit; a PLC module, the PLC module comprising a data region and a function region; and an adapter arranged between the ROS module and the PLC module, wherein the adapter comprises an I/O module and a storage module, and the PLC module is configured to acquire, by means of the I/O module, data processed by the ROS module, or acquire, by means of the storage module, the data acquired by the ROS module from the peripheral unit.

Preferably, in one example of the above-mentioned aspect, when a data processing mode of the acquired data is a real-time processing mode, the ROS module is configured to store the acquired data in the storage module, and the function region is configured to have a piece of processing logic for the data in the storage module, so as to process the data in the storage module; or when the data processing mode of the acquired data is a non-real-time processing mode, the ROS module is configured to have a piece of processing logic for the acquired data so as to process the acquired data, and the function region is configured to acquire the processed data from the ROS module by means of the I/O module. Preferably, in one example of the above-mentioned aspect, the PLC may further comprise: a peripheral mode detection unit, which is used for detecting a data processing mode of the data from the peripheral unit; and a configuration unit, which is used for configuring the ROS module or the function region according to the data processing mode detected by the peripheral mode detection unit, such that: when the detected data processing mode is the real-time processing mode, the ROS module is configured to store the acquired data in the storage module, and the function region is configured to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the data in the storage module, or when the detected data processing mode is the non-real-time processing mode, the ROS module is configured to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the acquired data, and the function region is configured to acquire the processed data from the ROS module by means of the I/O module, wherein the plurality of pieces of pre-set processing logic are stored in association with the data processing mode in the programmable logic controller.

Preferably, in one example of the above-mentioned aspect, the plurality of pre-set modes may be stored in the ROS module or the function region, or may be stored in the configuration unit .

Preferably, in one example of the above-mentioned aspect, the PLC may further comprise: a program management unit for scheduling the ROS module and the PLC module to invoke various processing resources.

According to another aspect of the present application, a programmable logic controller (PLC) system is provided, comprising a plurality of PLCs as claimed above, wherein data communication is performed among the plurality of PLCs by means of the adapter and based on a publish/subscribe mechanism. According to another aspect of the present application, a method for a programmable logic controller (PLC) is provided, wherein the PLC comprises a robot operating system (ROS) container, an adapter and a PLC module, with the ROS container comprising an ROS module used for acquiring data from a peripheral unit, the PLC module comprising a data region and a function region, and the adapter comprising an I/O module and a storage module; and the method comprises: when a data processing mode of the data from the peripheral unit is determined to be a real-time processing mode, configuring the ROS module to store the acquired data in the storage module of the adapter, and configuring the function region to have a piece of processing logic for the data in the storage module, so as to process the data in the storage module, and when the data processing mode of the data from the peripheral unit is determined to be a non-real-time processing mode, configuring the ROS module to have a piece of processing logic for the data acquired from the peripheral unit so as to process the acquired data, and configuring the function region to acquire the processed data from the ROS module by means of the I/O module of the adapter.

Preferably, in one example of the above-mentioned aspect, the method may further comprise: detecting the data processing mode of the data from the peripheral unit, and when the detected data processing mode is the real-time processing mode, configuring the ROS module to store the acquired data in the storage module, and configuring the function region to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the data in the storage module, or when the detected data processing mode is the non-real-time processing mode, configuring the ROS module to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the acquired data, and configuring the function region to acquire the processed data from the ROS module by means of the I/O module, wherein the plurality of pieces of pre-set processing logic are stored in association with the data processing mode in the PLC.

Preferably, in one example of the above-mentioned aspect, the plurality of pre-set modes may be stored in the ROS module or the function region, or may be stored in the configuration unit .

By means of the PLC provided in the present application, an ROS container comprising an ROS module and an adapter are arranged in the structure, and the ROS module performs ROS mechanism-based processing on acquired data and interacts with the PLC module via the adapter, so as to be suitable for autonomous systems or autonomous applications.

In addition, by means of the PLC of the present application, whether to execute the processing logic of the acquired data by the PLC module or the ROS module is set based on whether the data processing mode of the data acquired from the peripheral unit is the real-time processing mode or the non-real-time processing mode, such that a delay problem brought about by the introduction of the ROS module into the PLC structure can be solved.

In addition, by means of the PLC of the present application, a peripheral mode detection unit is arranged to detect the data processing mode of the peripheral unit, and the ROS module and the PLC module are configured by the configuration unit based on the detected data processing mode, such that the ROS module and the PLC module can be automatically configured.

In addition, by means of the PLC of the present application, a program management unit is arranged to schedule the ROS module and the PLC module to invoke the processing core, such that processing resources in the PLC can be more effectively allocated.

Brief Description of the Drawings

Further understanding of the nature and advantages of the present disclosure can be realized with reference to the following drawings. In the figures, like assemblies or features may have the same reference signs.

Fig. 1 shows a schematic diagram of the structure of an existing PLC;

Fig. 2 shows a schematic diagram of one example of the structure of a PLC according to the present application;

Fig. 3 shows a schematic diagram of another example of the structure of the PLC according to the present application;

Fig. 4 shows a schematic diagram of another example of the structure of the PLC according to the present application;

Fig. 5 shows a schematic diagram of another example of the structure of the PLC according to the present application;

Fig. 6 shows a flowchart of a method for a PLC according to the present application; and

Fig. 7 shows a schematic diagram of a PLC system according to the present application.

Reference signs

10 : PLC module 11: Data region

12 : Function region 20: ROS container

21 : ROS module 30: Adapter

31 : I/O module 32: Storage module

40 : Peripheral mode detection unit

50 : Configuration unit 60: Program management

70 : Core 80: Shared memory

610: Determining a data processing mode

612: During a real-time processing mode, storing peripheral data in a storage module, and configuring a PLC module to execute a piece of processing logic for the peripheral data

614: During a non-real-time processing mode, configuring an ROS module to execute the processing logic for the peripheral data, and configuring the PLC module to acquire data from the ROS module by means of an I/O module

100-1/100-2/100-3: PLC 200: IPC

300: Profinet /EtherNet bus

400: EtherNet bus 500: Radar 600: Sensor 700: Camera

90: Motor driver

800-1: Navigation 800-2: Mobile planning

800-3: Computer vision 800-4: Intelligent algorithm

Detailed Description of Embodiments

The subject matter described herein is now discussed with reference to the exemplary embodiments. It should be understood that the discussion of these embodiments is merely to enable a person skilled in the art to better understand and thus realize the subject matter described herein, and same are not intended to limit the scope of protection, the applicability or the examples of the claims. The functions and arrangement of the discussed elements can be changed without departing from the scope of protection of the present disclosure. Various processes or assemblies can be omitted, substituted or added in various examples according to requirements. For example, the described method can be executed in a different order than that described, and various steps can be added, omitted or combined. Additionally, the features described in some examples may also be combined in the other examples.

As used herein, the term "comprise" and its variants represent open terms, and have the meaning "comprise, but not limited to". The term "based on" represents "at least partially based on". The terms "one embodiment" and "an embodiment" represent "at least one embodiment". The term "another embodiment" represents "at least one other embodiment". The terms "first", "second", etc. can refer to different objects or the same object. The other definitions can be comprised below, regardless of whether same are comprised explicitly or implicitly. The definition of one term is consistent throughout the description, unless explicitly stated in the context.

Herein, the term "ROS" refers to a robot operating system, which is a robot software platform and which can provide an operating-system-like function for heterogeneous computer clusters . The term "ROS node" or "ROS module" refers to a node or module having an ROS capability. Message exchange between the ROS nodes or the ROS modules is performed based on a publish and subscribe mechanism. For example, an ROS node can send a message by publishing the message to a given topic. The "topic" described here is a name for identifying the content of the message. An ROS node interested in a certain type of data can subscribe to an appropriate topic related to this type of data. As long as there is a message which is sent by the other nodes regarding the topic, an ROS node subscribing to the topic can receive the message. In addition, the term "ROS module" or "ROS node" herein has a data collection capability, for example, is capable of collecting data by communicating with the peripheral unit in a wireless or wired manner.

The ROS node publishing a message is referred to as a publisher, and the ROS node subscribing to a message is referred to as a subscriber. For a single topic, a plurality of publishers and subscribers may exist simultaneously. Generally, the subscribers do not know which publisher published the received message. In other words, the publisher and the subscriber are not familiar with each other.

In addition, compared with a PLC encoding mechanism, ROS writing is easier, and is easily mastered by a user.

The term "ROS container" herein refers to a sandbox independent execution environment which is generated by using a Container technique and related to the ROS. The Container technique means that relevant program codes, a function library and an environment configuration file required for one application program are all directly packed to establish a sandbox execution environment. The Container technique does not refer to establishing a virtual environment outside of an OS, but instead refers to creating a virtual execution environment in a core system layer inside the OS. Within the Container, the application program can be executed without the need to install an operating system. By means of the ROS container, an environment for running an autonomic function can be provided, wherein the autonomic function comprises mobile planning, detection or navigation, etc. The embodiments of the programmable logic controller, the programmable logic controller system, and the method for the programmable logic controller of the present application will now be described in conjunction with the drawings.

Fig. 2 shows a schematic diagram of one example of the structure of a PLC according to the present application. As shown in Fig. 2, the PLC comprises a PLC module 10, an ROS container 20 and an adapter 30. The PLC module 10 comprises at least one data region 11 and at least one function region 12. Here, the data region 11 is used for storing data, such as data from a peripheral unit acquired from an ROS module by polling an I/O module of the adapter, or data output by the function region 12. The function region 12 is used for storing processing programs in the PLC, such as common processing logic of the PLC or processing logic for data from the peripheral unit .

The ROS container 20 is used for providing a sandbox independent execution environment related to an ROS, such as an independent execution environment which is used for running an autonomous function, wherein the autonomous function comprises, for example, the function of mobile planning, detection, computer vision, 3D simulation, or navigation, etc. The ROS container comprises at least one ROS module, wherein the ROS module has an ROS capability and is used for acquiring data from the peripheral unit, such as collecting data from the peripheral unit. The peripheral unit may, for example, comprise various types of data acquisition devices, such as a radar, a sensor, a camera, and a point cloud device.

The adapter 30 is arranged between the PLC module 10 and the ROS container 20, and is used for interacting with the ROS container 20 and the PLC module 10. The adapter 30 can be run on various operating systems (for example, Windows or Linux) , and has various types of interfaces, such that data from different interfaces can be exchanged in real time. In addition, the adapter 30 is transparent to an interface. The interface may, for example, comprise one or more of the following: an ROS adaptation interface, a PLC adaptation interface, a Profinet interface or an EtherNet interface. The ROS adaptation interface is connected to the ROS module, and is used for parsing an ROS data packet. The PLC adaptation interface is connected to the PLC module, and is used for parsing a PLC data packet. The Profinet interface or the EtherNet interface is used for connection with the other PLCs or IPCs, and is used for parsing bus data. In addition, the adapter 30 also has the other well-known functions of an adapter, such as a message queue mechanism, and arbitration and conflict avoidance mechanisms. The above-mentioned well-known functions will not be described in detail in the present application. In addition, there is also a need to execute adaptive processing for the ROS module and the PLC module in the adapter.

In addition, the adapter 30 may preferably further comprise an I/O module 31 and a storage module 32. The I/O module 31 is used for providing data input and output functions. The I/O module 31 may comprise a digital I/O and an analog I/O. The storage module 32 is used for storing the data acquired by the ROS module from the peripheral unit. Here, with regard to various fields in the storage module 32, the meanings of the fields are predetermined in the ROS module and the PLC module. Moreover, when a function block in the PLC module is rewritten, the rewritten program comprises processing programs for various fields. Likewise, when the ROS module is rewritten, a program for rewriting comprises processing programs for various fields .

In an initial state of the PLC (for example, during the delivery of the PLC from a factory) , the ROS container, the ROS module, and the data region 11 and the function region 12 in the PLC module are created in advance. The ROS module 21 is configured to have the ability to acquire data from the peripheral unit, and to have a conventional ROS capability. The function block 12 in the PLC module is configured to have the basic functions of the PLC, but not to comprise processing logic for processing the data from the peripheral unit. During the working of the PLC, when a data processing mode required for data acquired, by the ROS module 21, from the peripheral unit is a real-time processing mode, the ROS module 21 is configured to store the acquired data in the storage module, and the function region 12 is configured to have processing logic for the data stored in the storage module, so as to process the data. Specifically, by rewriting the program in the function region 12, the function block 12 has a program instruction for executing the processing logic of the data. Thus, when the PLC is running, the PLC module polls the storage module 32 to acquire the data stored in the storage module 32, and processes the data in the function block 12 by using the written program instruction to execute the processing logic of the data.

When the data processing mode of the data acquired by the ROS module 21 from the peripheral unit is a non-real-time processing mode, the ROS module 21 is configured to have processing logic for the acquired data so as to process the acquired data, and the function region 12 is configured to acquire the processed data from the ROS module 21 by means of the I/O module 30. Specifically, by rewriting the program in the ROS module 21, the ROS module 21 has a program instruction for executing the processing logic of the data. Thus, when the PLC is running, the data is processed in the ROS module 12 by using the written program instruction for executing the processing logic of the data. Then, the function block 12 in the PLC module 10 acquires the processed data from the ROS module 21 by polling the I/O module in the adapter 30.

In addition, the adapter 30 may also preferably be comprised in the ROS container 20.

In the above-mentioned example, whether to execute the processing logic of the acquired data by the PLC module or the ROS module is set based on whether the data processing mode of the data acquired from the peripheral unit is the real-time processing mode or the non-real-time processing mode, such that a delay problem brought about by the introduction of the ROS module into the PLC structure can be solved. In addition, in the above-mentioned example, when the data processing mode is the non-real-time processing mode, programming can be performed in the ROS module based on an ROS mechanism, and since the programming performed based on the ROS mechanism is simpler than the programming performed based on a PLC mechanism, the programming is easier and more flexible.

Fig. 3 shows a schematic diagram of another example of the structure of the PLC according to the present application. Fig.

3 is a variation of the example in Fig. 2. Compared with Fig. 2, the ROS container in Fig. 3 comprises at least two types of ROS modules 21, namely, a first type of ROS module 21-1 and a second type of ROS module 21-2. The first type of ROS module 21-1 corresponds to non-real-time processed data, and the second type of ROS module 21-2 corresponds to real-time processed data. An output of the first type of ROS module 21-1 is connected to the I/O module 31 in the adapter 30, and an output of the second type of ROS module 21-2 is connected to the storage module 32 in the adapter 30. Moreover, a program in the first type of ROS module 21-1 can be rewritten, while a program in the second type of ROS module 21-2 cannot be rewritten .

In addition, the PLC in Fig. 3 further comprises at least two types of function regions 12, namely, a first type of function region 12-1 and a second type of function region 12-2. The first type of function region 12-1 corresponds to non-realtime processed data, and the second type of function region 12- 2 corresponds to real-time processed data. An input of the first type of function region 12-1 is connected to the I/O module 31 in the adapter 30 via a data region 11-1, and an input of the second type of function region 12-2 is connected to the storage module 32 in the adapter 30 via a data region

11-2. Moreover, a program in the first type of function region

12-1 cannot be rewritten, while a program in the second type of function region 12-2 can be rewritten.

Fig. 4 shows a schematic diagram of another example of the structure of the PLC according to the present application. Fig.

4 is a variation of the example in Fig. 2. Compared with Fig. 2, the PLC in Fig. 4 further comprises a peripheral mode detection unit 40 and a configuration unit 50.

The peripheral mode detection unit 40 is used for detecting a data processing mode of data from a peripheral unit. For example, the peripheral mode detection unit 40 can determine the data processing mode of the data from the peripheral unit by detecting the type of the peripheral unit, for example, by determining the data processing mode by judging whether the peripheral unit is a radar, a camera, a sensor or a point cloud device. Alternatively, the peripheral mode detection unit 40 can determine the data processing mode of the data by analyzing a message carried in the data from the peripheral unit, wherein the message comprises information related to the features of the peripheral unit itself.

After the data processing mode of the data from the peripheral unit is detected, the configuration unit 50 performs, according to the detected data processing mode, a corresponding configuration on the ROS module or the function region based on a plurality of pieces of pre-set processing logic. Here, the pre-set processing logic may, for example, be a pre-written processing logic program, and each kind of processing logic corresponds to one kind of processing for the data from the peripheral unit. The processing logic program may be pre-stored in the programmable logic controller, for example, during the delivery from the factory, but is not activated or enabled.

Specifically, when the data processing mode is the realtime processing mode, the ROS module 21 is configured to store the acquired data in the storage module, and the function region 12 is configured to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the data in the storage module. When the data processing mode is the non-real-time processing mode, the ROS module 21 is configured to have one piece of processing logic, which is selected from a plurality of pieces of pre-set processing logic and corresponds to the detected data processing mode, so as to process the data acquired from the peripheral unit, and the function region 12 is configured to acquire the processed data from the ROS module 21 by means of the I/O module 30. The plurality of pieces of pre-set processing logic are stored in association with the data processing mode in the programmable logic controller. In this case, the configuration unit 50 can select matched processing logic from the plurality of pieces of pre-set processing logic based on the detected data processing mode, and can activate (or enable) the selected processing logic to configure the ROS module or the function region, such that the ROS module or the function region has a corresponding data processing capability.

In one example of the present application, the plurality of pieces of pre-set processing logic may be stored (for example, built) in the configuration unit 50 for selection and installation into the corresponding ROS module or function region by the configuration unit 50. Alternatively, the plurality of pieces of pre-set processing logic may also be stored (for example, built) in the ROS module or the function region. In this case, after the data processing module is detected, the configuration unit 50 determines the corresponding processing logic based on the detected data processing mode, and sends a corresponding processing logic selection instruction to the ROS module or the function region, such that the ROS module or the function region selects the corresponding processing logic for configuration.

In the above-mentioned example, a peripheral mode detection unit is arranged to detect the data processing mode of the peripheral unit, and the ROS module and the PLC module are configured by the configuration unit based on the detected data processing mode, such that the ROS module and the PLC module can be automatically configured.

Fig. 5 shows a schematic diagram of another example of the structure of the PLC according to the present application. Fig. 5 is a variation of the example in Fig. 2. Compared with Fig. 2, the PLC in Fig. 5 further comprises a program management unit 60, one or more cores (two cores 70-1 and 70-2 are illustrated in the figure), and a shared memory 80. The program management unit 60 (for example, a program hypervisor) is used for scheduling the ROS module and the PLC module to invoke various processing resources (namely, the cores 70-1 and 70-2) . In addition, instead of an industrial bus, data/information communication can be performed between the core 70-1 and the core 70-2 via the shared memory 80.

In the above-mentioned example, operation resources can be fully utilized by arranging the program management unit as a manager for hardware resources. In addition, costs can be saved on and the real-time performance can be improved by replacing the industrial bus with the shared memory.

Fig. 6 shows a flowchart of a method for a PLC according to the present application. Here, the PLC comprises a robot operating system (ROS) container, an adapter and a PLC module, wherein the ROS container comprises an ROS module used for acquiring data from a peripheral unit, and the PLC module comprises a data region and a function region. The adapter comprises an I/O module and a storage module.

As shown in Fig. 6, in box 610, a data processing mode of data from a peripheral unit is determined. Here, the process for determining the data processing mode may be manually executed by a user, and it may also be the case that the data processing mode is detected by arranging a peripheral mode detection unit.

Next, in box 612, when a data processing mode of the data from the peripheral unit is determined to be a real-time processing mode, the ROS module is configured to store the acquired data in the adapter, and the function region is configured to have a piece of processing logic for the data in the storage module, so as to process the data in the storage module .

In box 614, when the data processing mode of the data from the peripheral unit is determined to be a non-real-time processing mode, the ROS module is configured to have a piece of processing logic for the data acquired from the peripheral unit so as to process the acquired data, and the function region is configured to acquire the processed data from the ROS module by means of the adapter.

In the case where the data processing mode is detected by arranging a peripheral mode detection unit, the operations in boxes 612 and 614 can be automatically executed by the configuration unit based on a plurality of pieces of pre-set processing logic. With regard to the configuration process of the configuration unit, reference is made to the detailed description above regarding Fig. 4.

Fig. 7 shows a schematic diagram of a PLC system according to the present application. As shown in Fig. 7, the PLC system comprises a plurality of PLCs described above, wherein the PLCs 100-1, 100-2 and 100-3 are connected to different peripheral units, such as a radar 500, a sensor 600, a camera 700, and a motor driver 90, and data communication is performed among the plurality of PLCs by means of the adapter 30 and based on the publish/subscribe mechanism. In addition, the PLC system can further comprise an IPC (Industry Personal Computer), and the IPC also further comprises an ROS container. Different autonomous applications can be run in the PLC and various ROS containers in the IPC in Fig. 7, such as navigation 800-1, mobile planning 800-2, computer vision 800-3, and an intelligence algorithm 800-4.

In addition, the PLC according to the present application can be implemented by one or more processors and a memory. Computer executable instructions are stored in the memory, which when executed, cause one or more processors to: when a data processing mode of data from a peripheral unit is determined to be a real-time processing mode, configure the ROS module 21 to store the acquired data in the storage module 32 of the adapter 30, and configure the function region 12 to have a piece of processing logic for the data in the storage module 32, so as to process the data in the storage module 32, and when the data processing mode of the data from the peripheral unit is determined to be a non-real-time processing mode, configure the ROS module 21 to have a piece of processing logic for the data acquired from the peripheral unit so as to process the acquired data, and configure the function region 12 to acquire the processed data from the ROS module 21 by means of the I/O module 31 of the adapter 30.

It should be understood that the computer executable instructions stored in the memory, when executed, cause one or more processors to perform various operations and functions as described in various embodiments of the present application.

According to one embodiment, a program product is provided, such as a non-transient machine-readable medium. The non-transient machine-readable medium can have instructions (namely, the elements above implemented in the form of software) , which when executed by a machine, cause the machine to perform various operations and functions as described in various embodiments of the present application.

The specific embodiments described above in conjunction with the drawings describe the exemplary embodiments, but not all the embodiments that can be implemented or fall within the scope of the protection of the claims. The term "exemplary" used throughout the description means "used as an example, instance or illustration", but does not mean that same is "preferable" or "has an advantage" over the other embodiments. For the purpose of providing an understanding of the described techniques, the embodiments comprise specific details. However, these techniques may be implemented without these specific details. In some instances, in order to prevent it from being difficult to understanding the concepts of the described embodiments, well-known structures and apparatuses are shown in block diagram form.

The above-mentioned descriptions of the present discourse are provided to enable any person of the ordinary skill in the art to implement or use the present discourse. Various changes which are made to the present discourse are obvious for a person of ordinary skill in the art, and the general principles defined herein can be applied to other variations without departing from the scope of the protection of the present discourse. Therefore, the present discourse is not limited to the examples and designs described herein, and is consistent with the widest scope which conforms to the principles and novel features disclosed herein.