This application claims the benefit under 35 U.S.C. § 371 of International Application No. PCT/EP2020/074059 filed on Aug. 28, 2020, which in turn claims the benefit of German Application No. 10 2019 123 271.6 filed on Aug. 30, 2019, the entire contents of each of which are hereby incorporated by reference in their entirety.
Embodiments of the invention relate to a method for calling of a function block of a control program of an industrial controller, wherein the industrial controller has an OPC UA server and communicates with an OPC UA client by means of the OPC UA communication protocol, and wherein the function block of the control program is requested by the OPC UA client by a call of a method of the OPC UA server. Furthermore, the invention relates to a suitably adapted industrial controller for carrying out the method.
Traditionally, programmed controllers process a control code, which is to say, an executable program piece, contained in a control program in tasks, which is to say, application-related, interrelated tasks, which are called up cyclically by a “thread”, which is to say, an execution thread or execution sequence, of the controller.
Furthermore, as is well known, methods, functions and function blocks can be used in a PLC program (“PLC”=programmable logic controller). Methods, as well as functions, are usually state-independent, or alternatively have no internal status information, which is to say, all parameters are transferred at the time of a respective call and are not stored. Function blocks, on the other hand, are program organizational units that are usually stateful and as a consequence maintain the parameters as part of their state. It is therefore possible to read and/or write the parameters of a function block at a different time than the call of the function block.
OPC UA servers (“OPC UA”; open platform communications unified architecture) can in turn provide methods that are requested by OPC UA clients. The method is then usually called up in the context of an OPC UA thread, which receives the request from an OPC UA client. Here, all input parameters are consistently passed on to the method and after execution all output parameters are consistently returned.
However, if an OPC UA server were to call the control code of the control program directly after calling the method, as a consequence it is possible that the control program would still be processed in parallel, which in turn could lead to inconsistencies in the returned parameters or the data processed in the control program.
Solutions are already known from the state of the art that allow OPC UA methods to be called up in a PLC program. Here, however, the OPC UA method is usually mapped as a PLC method or PLC function, which requires the parameters in the context of the call. One disadvantage of this method is, among other things, that the call must therefore occur either automatically before or after a task code in order to avoid inconsistencies, which, however, takes away the control of the user over the time point of processing, or that additional system functions must be called upon in order to transfer the parameters. The latter is known, for example, from EP 3 182 235 B1, which relates to method and an industrial controller for calling a function of a control program by means of an OPC UA call. Here, in a first step, an OPC UA call directed to calling the function is sent from an OPC UA client to the OPC UA server of the industrial controller. In a second step, the OPC UA call is stored by a system program of the industrial controller, and in a third step, a system function of the control program is called up at a defined point of the industrial control program, which checks whether an OPC UA call is stored, in such a way that in a fourth step, if such an OPC UA call is present, the function of the control program associated with this call is called up, and otherwise the industrial control program is continued without branching off to the function.
Although it is true that the method described in EP 3 182 235 B1 makes it possible to call a defined function or alternatively a defined function block at a previously defined point in the control program by means of the OPC UA call, this does however require, as mentioned above, the call of at least one additional system function, which as a consequence must initially, additionally, be accordingly set up in order to verify the presence of an OPC UA call. Thus, there is a need for an improved way to call a function block in a control program for processing.
An embodiment of the present invention comprises a way to call a function block in a control program for processing starting from an OPC UA client via a method of an OPC UA server without requiring such an additional system function.
Another embodiment of the present invention comprises a method according to the appended patent claim 1, wherein useful embodiments and further embodiments are the subject of the subclaims. A further embodiment of the present invention is described as an industrial controller according to the appended claim 7.
Another embodiment of the present invention comprises a method for calling a function block of a control program of an industrial controller, in which the industrial controller has an OPC UA server and communicates with an OPC UA client by means of the OPC UA communication protocol, wherein the function block is called up starting from an OPC UA call of the OPC UA client, which is to say, is called up for processing, in particular being called up starting from the OPC UA client via a method of the OPC LTA server.
According to another embodiment of the present invention, there is provided a method, wherein when the function block is requested, in a first step a call directed thereto, which is to say, in particular a call accordingly directed to the method of the OPC UA server, is sent from the OPC UA client to the OPC UA server, and in a second step the OPC UA call is stored by the OPC UA server of the industrial controller. In a third step, IN parameters transferred together with the OPC UA call, which is to say, IN parameters transferred from the OPC UA client to the OPC UA server, are copied on to corresponding IN parameters of the function block of the control program and, in a fourth step, the function block of the control program is called up at a previously defined point within a control task of the industrial controller and the IN parameters of the function block are processed.
A significant advantage is therefore that the function block itself is processed within a thread context of the control program and thus inconsistencies are avoided and, before the function block is processed, the IN parameters transferred by means of the call directed from the OPC UA client to the OPC UA server are first consistently transferred to the control program.
A further embodiment of the present invention comprises an industrial controller for synchronized calling of a function module in a control program. Another embodiment comprises an industrial controller with an OPC UA server, wherein the industrial controller is set up to run a control program and to communicate, in particular by means of the OPC UA communication protocol, with an OPC UA client and is furthermore set up to call a function block of the control program, which can be requested starting from an OPC UA call of the OPC UA client.
According to another embodiment, the OPC UA server is further designed to receive an OPC UA call directed to the request from the OPC UA client and to store the OPC UA call. Furthermore, the industrial controller copies IN parameters transferred together with the OPC UA call to corresponding IN parameters of the function block of the control program and calls the function block of the control program at a previously defined point within a control task of the industrial controller.
The advantages already discussed with reference to the method are also realized by this industrial control system.
In a further embodiment of the present invention, the method is comprises the industrial controller is set up, such that OUT parameters of the function block of the control program obtained by execution of the control task, and thus during processing of the function block of the control program, are copied to the OPC UA server after execution of the control task.
A further embodiment of the present invention comprises OUT parameters requested by means of the call directed by the OPC UA client to the OPC UA server and based on the transferred IN parameters are also consistently transferred from the control program to the OPC UA server. Another embodiment comprises the OUT parameters of the function block, which comprises a parameter for signaling a processing status and/or an error during the processing of the function block based on the OPC UA call.
Furthermore, in an embodiment, it is preferably provided that the OUT parameters copied to the OPC UA server are returned by the OPC UA server to the OPC UA client.
In another embodiment, it is furthermore provided that the IN parameters of the function block comprise a parameter for signaling the presence of an OPC UA call.
In another embodiment of the present invention, it is furthermore expediently provided that, for example, at the end of the execution of the control task, at least the IN parameter copied to the function block of the control program for signaling the presence of an OPC-UA call is reset to a default value.
Further advantages and features of the invention in preferred embodiments are described in more detail from the following description, with reference to the attached drawing.
More specifically, a control task 220 to be processed during a control thread 222 is shown in in the industrial controller 200 of an expedient embodiment, which in turn is designed to process a control program 221.
The industrial controller 200 may further comprise further control tasks which may be called within the control thread 222 or also other control threads, in particular cyclically for processing further control programs. As is known to one skilled in the art in and of itself, control programs, also referred to as application programs, conventionally serve to control or monitor an application, for example, within an industrial process or industrial manufacturing. Within the scope of these applications, corresponding function blocks, such as the function block 225, can then be called, which are designed to be application-dependent for processing a specific application or even function.
The control program 221 outlined at
In particular, in order to avoid inconsistencies between the IN parameters 226 and the OUT parameters 227, the industrial controller 200 is furthermore expediently designed such that the processing of the function block 225 always takes place, in particular takes place cyclically, during the control thread 222 at a previously defined point within the control task 220.
Furthermore, the industrial controller 200 also comprises, in particular as part of or as an extension of an operating system not shown in more detail, an OPC UA server 210 for communication, which is to say, in particular for the exchange of data, between the industrial controller and a client 100 arranged externally to the industrial controller, wherein, in this respect, an OPC UA client 110 is set up on the client 100 for communication. The communication or alternatively the exchange of data between the industrial controller 200 and the client 100 is thus carried out via the OPC UA server 210 and the OPC UA client 110, expediently by means of an OPC UA communication protocol known per se to the person skilled in the art.
A method 215 is further defined on the OPC UA server 210, which is preferably directed to the call A215 of the function corresponding to the function block 225 of the control program, and can be called via a call A110 of the OPC UA client 110.
In particular, within the scope of such a call A110, it is provided that, together with the call A110, certain IN parameters 216, indicated in
As a consequence, a request of the function block 225, which is to say, the request for a processing of specific IN parameters to OUT parameters can, in particular, ensue spontaneously or at any moment from the industrial process or the industrial production and thus external to the industrial control system.
Preferably, it is provided that the method 215 called by the call A110 is processed by the OPC UA server 210 within a corresponding UA thread 212. In this case, a call A110 is consequently received by the OPC UA client 110, if present, and expediently the IN parameters 216 received with the call of the method from the OPC UA client are on the one hand stored in the OPC UA server 210 and on the other hand copied to the IN parameters 226 of the function block 225 of the control program 221, indicated in
The dashed arrows between the components in
Expediently, the IN parameters 226 additionally contain a parameter for signaling the presence of an OPC UA call. If such an IN parameter is consequently copied to a corresponding parameter input of the function block 225, it signals to the function block that a call from the OPC UA server is pending. This IN parameter signaling a pending call can preferably be reset by the control program 221 or also by the OPC UA server 210, for example, at the end of the execution of the control task, which is to say, in particular, reset to a default value. By means of such a default value, it is thus expediently signaled that no renewed OPC UA call and thus no renewed processing of the function block is pending. Alternatively, the reset could also take place before the start of the next execution of the control task.
In an alternative or complementary preferred embodiment, the OUT parameters 227 of the function block 225 receive, after processing of the IN parameters 226, at least one further parameter which signals a processing status and/or an error during the processing of the function block based on the OPC UA call.
In particular, this can consequently signal the function block that the method call A215 for calling the function block has been completely processed and/or an error code relating to the processing can be represented, which can expediently be returned to the OPC UA client 110 in the event of an error.
Significant advantages of the method according to the invention are consequently to be seen in the fact that, in the case of a call of an OPC UA client for a function block in a control program via a method of an OPC UA server, the function block can be processed in the thread context of the control program, the in-parameters of the method are consistently transferred to the control program, wherein on the basis of the processing of the function block 225 at a previously defined point within a control task 220, a user of the control program always retains complete control over the point in time of the processing of the function block, and the OUT parameters of the method can expediently be transferred in a consistent manner from the control program to the OPC UA server. As a consequence, there is no need for an additional system function, in particular similar to the method described in EP 3 182 235 B1, for verifying whether an OPC UA call is stored, which once again speeds up the overall processing.
In a practical embodiment, an industrial controller 200 as sketched in
Number | Date | Country | Kind |
---|---|---|---|
10 2019 123 271.6 | Aug 2019 | DE | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2020/074059 | 8/28/2020 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2021/038028 | 3/4/2021 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5598149 | Schreiter et al. | Jan 1997 | A |
8423608 | Mahnke | Apr 2013 | B2 |
8724640 | Gerdes et al. | May 2014 | B2 |
9632494 | Neubert et al. | Apr 2017 | B2 |
10313268 | Goetz et al. | Jun 2019 | B2 |
10530897 | Goetz et al. | Jan 2020 | B2 |
10908574 | Macha et al. | Feb 2021 | B2 |
11088962 | Chen et al. | Aug 2021 | B2 |
20020194365 | Jammes | Dec 2002 | A1 |
20070147268 | Kelley et al. | Jun 2007 | A1 |
20090282165 | Jammes | Nov 2009 | A1 |
20100131076 | Colombo et al. | May 2010 | A1 |
20100281097 | Mahnke | Nov 2010 | A1 |
20100306313 | Mahnke | Dec 2010 | A1 |
20110144931 | Smit | Jun 2011 | A1 |
20120029656 | Colombo et al. | Feb 2012 | A1 |
20120188063 | Abbot et al. | Jul 2012 | A1 |
20120265360 | Smit | Oct 2012 | A1 |
20150018980 | Heutger | Jan 2015 | A1 |
20150149745 | Eble | May 2015 | A1 |
20170163768 | Deiretsbacher et al. | Jun 2017 | A1 |
20170272366 | Bush et al. | Sep 2017 | A1 |
20180024537 | Chauvet et al. | Jan 2018 | A1 |
20180084055 | Mong | Mar 2018 | A1 |
20180237039 | Mong et al. | Aug 2018 | A1 |
20180237040 | Mong et al. | Aug 2018 | A1 |
20180321662 | Nixon et al. | Nov 2018 | A1 |
20190286076 | Caldwell | Sep 2019 | A1 |
Number | Date | Country |
---|---|---|
101903837 | Dec 2010 | CN |
108199897 | Jun 2018 | CN |
41 25 374 | Feb 1993 | DE |
199 06 695 | Aug 2000 | DE |
102 27 241 | Jan 2004 | DE |
10 2006 058 282 | Jun 2008 | DE |
10 2007 043 652 | Apr 2009 | DE |
10 2007 062 986 | Jun 2009 | DE |
10 2007 062985 | Jun 2009 | DE |
10 2008 037 446 | May 2010 | DE |
10 2008 057 751 | May 2010 | DE |
10 2011 053 757 | Mar 2013 | DE |
10 2012 011 295 | Dec 2013 | DE |
10 2012 214 846 | Feb 2014 | DE |
10 2015 003 219 | Sep 2016 | DE |
0 698 837 | Feb 1996 | EP |
2 048 561 | Apr 2009 | EP |
2 325 748 | May 2011 | EP |
1 068 708 | Mar 2012 | EP |
2 506 098 | Mar 2016 | EP |
3 018 958 | May 2016 | EP |
3 088 971 | Nov 2016 | EP |
3182235 | Jun 2017 | EP |
3 295 266 | Mar 2018 | EP |
3 182 235 | Mar 2019 | EP |
03088620 | Oct 2003 | WO |
2005059572 | Jun 2005 | WO |
2006079569 | Aug 2006 | WO |
2014044298 | Mar 2014 | WO |
2015169352 | Nov 2015 | WO |
2015188822 | Dec 2015 | WO |
2015188852 | Dec 2015 | WO |
2017028932 | Feb 2017 | WO |
2018141435 | Aug 2018 | WO |
2019007516 | Jan 2019 | WO |
Entry |
---|
OPC Foundation, “OPC Unified Architecture Part 4: Services”, Nov. 2017, OPC Foundation OPC Unified Architecture Release 1.04, pp. 60 (Year: 2017). |
International Search Report and Written Opinion mailed Oct. 22, 2020, issued in connection with corresponding International application No. PCT/EP2020/074059 with English translation (16 pages total). |
German Office Action mailed May 18, 2020, issued in connection with corresponding German Application No. 10 2019 123 271.6 with English translation (13 pages total). |
International Preliminary Report on Patentability issued Mar. 1, 2022 in connection with corresponding international application No. PCT/EP2020/074059—English translation only—(9 pages total). |
Chinese Office action and Search Report issued Jun. 28, 2024 in connection with Chinese patent application No. 202080061070.1 (19 pages total). |
Number | Date | Country | |
---|---|---|---|
20220276641 A1 | Sep 2022 | US |