CN113778041B - Method, system, equipment and storage medium for generating communication data between DCS controllers - Google Patents

Method, system, equipment and storage medium for generating communication data between DCS controllers Download PDF

Info

Publication number
CN113778041B
CN113778041B CN202111335499.8A CN202111335499A CN113778041B CN 113778041 B CN113778041 B CN 113778041B CN 202111335499 A CN202111335499 A CN 202111335499A CN 113778041 B CN113778041 B CN 113778041B
Authority
CN
China
Prior art keywords
controller
inter
reference point
configuration file
communication data
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
CN202111335499.8A
Other languages
Chinese (zh)
Other versions
CN113778041A (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.)
China Huaneng Group Co Ltd
Xian Thermal Power Research Institute Co Ltd
Huaneng Power International Inc
Original Assignee
China Huaneng Group Co Ltd
Xian Thermal Power Research Institute Co Ltd
Huaneng Power International Inc
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 China Huaneng Group Co Ltd, Xian Thermal Power Research Institute Co Ltd, Huaneng Power International Inc filed Critical China Huaneng Group Co Ltd
Priority to CN202111335499.8A priority Critical patent/CN113778041B/en
Publication of CN113778041A publication Critical patent/CN113778041A/en
Application granted granted Critical
Publication of CN113778041B publication Critical patent/CN113778041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • G05B19/4185Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by the network communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/33Director till display
    • G05B2219/33273DCS distributed, decentralised controlsystem, multiprocessor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention provides a method, a system, equipment and a storage medium for generating communication data between DCS controllers, which comprises the steps of obtaining a configuration file of a tool end, wherein a logic function block of a reference point between the DCS controllers is configured in the configuration file; pre-parsing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of the analysis tool terminal according to the configuration downloading mark; acquiring the variable, and registering inter-controller communication data in a local controller according to the variable value of the variable; and operating the inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block. The invention ensures the accuracy of data information in a reference point queue between controllers and the validity of data values in a logic function block, improves the configuration operation efficiency and maintains the stability and reliability of system operation.

Description

Method, system, equipment and storage medium for generating communication data between DCS controllers
Technical Field
The invention belongs to the technical field of controller data processing, and particularly relates to a method, a system, equipment and a storage medium for generating communication data between DCS controllers.
Background
A Distributed Control System (DCS) is a specially designed Control System for controlling complex and large-scale applications in industrial processes. The controller is the brain of a distributed control system that controls various parts of the control area geographically distributed and that executes control algorithms and configurations for various devices, processes and engineering network communications between PCs, which is done through simplex or redundant configurations to better control the performance of complex processes. The reliability, stability and high timeliness of the controller are the guarantee of high reliability, flexibility, coordination and stability of the distributed control system, so the design and implementation of any function in the controller must be premised on the reliability, stability and high timeliness.
With the continuous improvement of the industrial automation control level, the calculation process of the logic configuration file in the distributed control system is complex, the requirement for data interaction among the process controllers is increased, and the logic of data interaction among a plurality of process controllers is not simple, so that the problem that how to efficiently register and display the communication data among the controllers is urgently needed to be solved when the logic configuration file is analyzed is solved.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method, a system, a device, and a storage medium for generating communication data between DCS controllers. The method can analyze the reference logic between the controllers and register, delete and display the communication data between the controllers in real time.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for generating communication data between DCS controllers comprises the following steps:
acquiring a configuration file of a tool end, wherein reference point logic function blocks among controllers are configured in the configuration file;
pre-parsing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
acquiring the variable, and registering inter-controller communication data in a local controller according to the variable value of the variable;
and operating the inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block.
As a further improvement of the present invention, before the updating the configuration file newly downloaded by the analysis tool according to the configuration downloading mark, the method further includes:
after the configuration file is pre-analyzed, a configuration downloading device mark 1 in a local controller enters a periodic algorithm task according to a time sequence, and then the configuration downloading device mark is detected:
if the configuration downloading mark is 1, the local controller updates a configuration file newly downloaded by the analysis tool end; if the configuration download flag is 0, then no update is performed.
As a further improvement of the present invention, the updating of the configuration file newly downloaded by the analysis tool end according to the configuration downloading flag specifically includes:
positioning the configuration file object according to the page number of the newly downloaded configuration file, and copying the same data items in the configuration file object to the newly downloaded configuration file;
after copying is finished, the page number of the newly downloaded configuration file is used as an index, all inter-controller reference point information related to the page number of the newly downloaded configuration file in the inter-controller reference point registration queue is deleted, the configuration device is marked 1, and the page number of the updated configuration file is recorded;
and copying the content in the newly downloaded configuration file to a configuration file object corresponding to the page number of the newly downloaded configuration file in the memory of the local controller.
As a further improvement of the present invention, deleting all inter-controller reference point information related to a page number of a newly downloaded configuration file in the inter-controller reference point registration queue specifically includes:
acquiring the offset of the number of registered maximum communication data points stored in an inter-controller reference point registration queue in a local controller; setting the offset of the point number of the next largest communication data in the reference point registration queue between the controllers to zero;
traversing the registered communication data in the reference point registration queue between the controllers from 0 to the end of the point number offset of the maximum communication data;
judging whether the page number of the configuration file to which the traversed communication data belongs is the page number of the newly-downloaded configuration file:
if not, assigning the traversal times to the offset of the next largest communication point and starting to traverse the next communication data;
if yes, setting all related information of the communication data in the inter-controller reference point registration queue to zero, subtracting 1 from the inter-controller communication points stored in the local controller, and judging whether the traversal times reach the maximum communication point offset:
if not, traversing the next communication data in the reference point registration queue between the controllers;
if so, the value of the sub-decimal point number offset is assigned to the value of the maximum point number offset.
As a further improvement of the present invention, the updating the variables in the inter-controller reference point logic function block in the configuration file object specifically includes:
when the configuration downloading mark is 1, judging whether the page number of the configuration file where the reference point logic function block between the controllers is located is the same as the page number of the updated configuration file stored in the previous step:
if the difference is equal to the preset value, clearing 0 the variable in the logic function block of the reference point between the controllers;
if not, the variable is not processed.
As a further improvement of the present invention, before registering inter-controller communication data in the local controller according to the variable value of the variable, the method further includes:
judging the variable value of the variable in the logic function block of the reference point between the controllers;
if the variable value is 1, communication data corresponding to the logic function blocks of the reference points among the controllers are generated and do not need to be registered in the local controller;
if the variable value is 0, inter-controller communication data is registered in the local controller according to the basic information stored in the inter-controller reference point logic function block, after the registration is completed, the variable value is set to be 1, and the inter-controller communication data is generated in the local controller.
As a further improvement of the present invention, the basic information stored in the inter-controller reference point logic function block includes:
the method comprises the steps of obtaining a measurement point label name of communication data, a source controller number of the communication data, a configuration file page number in a source controller of the communication data and a data offset of a configuration file data area of the communication data in a local controller.
As a further improvement of the present invention, the registering of inter-controller communication data in the local controller according to the variable value of the variable specifically includes:
basic information of communication data stored in the inter-controller reference point logic function block is pressed into an inter-controller reference point registration queue of the local controller, and values are filled in the inter-controller reference point registration queue according to the following method:
traversing the inter-controller reference point registration queue within the maximum number of points which can be accommodated by the inter-controller reference point registration queue, if the currently traversed position in the inter-controller reference point registration queue is not occupied, pressing reference information of the reference point stored in the inter-controller reference point logic function block in the current position, and updating the reference point number of the reference controller stored in the local controller after successful registration.
As a further improvement of the present invention, the computing an inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block specifically includes:
before a periodic operation task starts, a local controller requests communication data information from a source end controller according to the communication data information in a reference point registration queue among the controllers, and the local controller stores the data information of the communication data to the local after acquiring the data information of the communication data returned by the source end controller; the communication data information comprises a communication data value and a data offset of the communication data in a configuration file in the source terminal controller;
when the inter-controller reference point logic function block is operated, the local controller fills the data value of the communication data stored to the local and the data offset of the communication data in the configuration file of the source-end controller into the data area of the inter-controller reference point logic function block, and judges whether the data offset of the communication data is valid:
if the data deviation of the communication data is invalid, setting the quality of an output value of a reference point logic function block between controllers as a non-reference source end, and uploading the output value to a tool end;
and if the data deviation of the reference point is effective, normally outputting the data value of the requested communication data.
A communication data generation system between DCS controllers comprises:
the system comprises an acquisition module, a configuration module and a processing module, wherein the acquisition module is used for acquiring a configuration file of a tool end, and reference point logic function blocks among controllers are configured in the configuration file;
the pre-analysis and update module is used for pre-analyzing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
the register communication module is used for acquiring the variable and registering inter-controller communication data in the local controller according to the variable value of the variable;
and the output module is used for calculating the inter-controller reference point logic function block according to the registered inter-controller communication data and generating an output value of the inter-controller reference point logic function block.
An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method for generating communication data between DCS controllers when executing the computer program.
A computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the inter-DCS controller communication data generation method.
The invention has the beneficial effects that:
according to the invention, the communication data is increased or deleted by the program according to the configuration, so that the burden of engineering personnel is reduced; before updating the configuration file, deleting the communication data between the controllers, when detecting that the configuration file is updated in the local controller, registering the communication data between the controllers when the analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI are operated, and after the registration is finished, the local controller can carry out communication request with other controllers according to the registered communication data information and store the requested data information of the communication data to the local, so that the disturbance to a real-time operation task is reduced; when the inter-controller analog quantity reference point logic function block NAI and the inter-controller switch quantity reference point logic function block NDI are formally operated, the data information of the communication data stored to the local is loaded to the output items of the inter-controller analog quantity reference point logic function block NAI and the inter-controller switch quantity reference point logic function block NDI, and the loaded data information of the communication data is analyzed for reasonability so as to ensure the accuracy of the communication data information in the inter-controller reference point queue and the validity of the data values in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switch quantity reference point logic function block NDI, thereby improving the configuration operation efficiency and maintaining the stability and the reliability of the system operation.
Drawings
FIG. 1 is a flow chart of a method for generating communication data between DCS controllers according to the invention;
FIG. 2 is a step of deleting point information associated with the page number of the POU page in the inter-controller reference point registration queue according to the preferred embodiment of the present invention;
FIG. 3 is a schematic diagram of a communication data generation system between DCS controllers;
fig. 4 is a schematic structural diagram of an electronic device.
Detailed Description
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The following detailed description is exemplary in nature and is intended to provide further details of the invention. Unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention.
As shown in fig. 1, the method for generating communication data between DCS controllers of the present invention includes the following steps:
acquiring a configuration file of a tool end, wherein reference point logic function blocks among controllers are configured in the configuration file;
pre-parsing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
acquiring the variable, and registering inter-controller communication data in a local controller according to the variable value of the variable;
and operating the inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block.
According to the invention, the communication data is increased or deleted by the program according to the configuration, so that the burden of engineering personnel is reduced; before updating the configuration file, the operation of deleting the communication data between the controllers is carried out, when the operation of updating the configuration file in the local controller is detected, the operation of registering the communication data between the controllers is carried out when the analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI are operated, and after the registration is finished, the local controller can carry out communication request with other controllers according to the registered communication data information and store the requested data information of the communication data to the local, so that the disturbance to a real-time operation task is reduced. The invention ensures the accuracy of data information in a reference point queue between controllers and the validity of data values in a logic function block, improves the configuration operation efficiency and maintains the stability and reliability of system operation.
The present invention will be described in detail below with reference to specific embodiments and the accompanying drawings.
Examples
As shown in fig. 1, the method for generating communication data between DCS controllers of the present invention includes the following steps:
s1, acquiring a configuration file downloaded from a tool end, and configuring inter-controller reference point logic function blocks in the configuration file; the controller enters a periodic algorithm task according to a time sequence, and whether a configuration file which is updated and installed by a tool end and corresponds to the periodic algorithm task is received in a local controller or not is judged;
the inter-controller reference point logic function block comprises the following variables:
enable: an enabling module, wherein the variable type is Boolean;
TAG: a source terminal roll call is detected, and the variable type is a character string;
a DPU: the source end controller number, the variable type is integer, and the variable type is the source end controller number where the quoted point is located;
PAGE: a source end page number, wherein the variable type is integer, and the source end page number is a configuration file page number where the quoted point is located;
OUT: outputting, wherein the variable type is a floating point type or a switching value and is the value of the quoted point;
QA: the quality variable type is Boolean, which indicates whether the indexing is successful or not.
RegOK: a registration mark, wherein the variable type is Boolean and represents whether the reference point is registered in the local controller or not;
OffSet: and the remote data offset, wherein the variable type is integer, represents the data offset of the reference point in the configuration file in the source controller.
The inter-controller reference point logic function block comprises an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI, the two function blocks have the same variable types, the only difference is the type of an OUT value, the type of the OUT of the NAI is a floating point type, and the type of the OUT of the NDI is a switching quantity.
The tool terminal configures inter-controller reference points, and is configured by using an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI, the inter-controller analog quantity reference point logic function block NAI can configure the inter-controller analog quantity reference points, and the inter-controller switching quantity reference point logic function block NDI can configure the inter-controller switching quantity reference points. When it is desired to refer to the value of another controller, the tag name of the reference point is filled in the variable of the inter-controller analog quantity reference point logic function block NAI or the inter-controller switching quantity reference point logic function block NDI. Downloading the configured configuration file to the controllers, and starting to register the inter-controller reference points by the local controllers.
A tool end configures an inter-controller reference point logic function block NAI and an inter-controller switching value reference point logic function block NDI in a configuration file, the inter-controller analog reference point logic function block NAI configures an inter-controller analog reference point, and the inter-controller switching value reference point is configured by the inter-controller analog reference point logic function block NDI; during configuration, a measurement point tag name of data expected to be communicated with a source-end controller needs to be filled in variables of an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI; and automatically generating the serial number of the source end controller to which the communication data belongs and the page number of the configuration file in the source end controller in which the communication data belongs in the configuration file according to the label name of the measuring point.
S2, pre-analyzing the configuration file, updating the newly-downloaded configuration file at the analysis tool end according to the pre-analyzed configuration downloading mark, and updating the variable in the logic function block in the configuration file corresponding to the periodic algorithm task;
as a preferred embodiment, the controller enters the periodic algorithm task in time sequence, and the step of judging whether the configuration file corresponding to the periodic algorithm task downloaded by the tool end update is received in the local controller specifically includes:
after receiving a configuration file downloaded from a tool end, a local controller performs pre-analysis on the configuration file, marks the configuration downloading device in the local controller by a mark 1, after entering a periodic algorithm task according to a time sequence, detects the configuration downloading mark at first, and if the configuration downloading mark is 1, the local controller updates and analyzes the configuration file newly downloaded from the tool end; otherwise, carrying out the subsequent steps;
if the configuration downloading mark is 1, the updating of the newly downloaded configuration file of the analysis tool end by the local controller is specifically as follows:
copying the same data items in the configuration file object corresponding to the page number of the newly downloaded configuration file in the local controller memory as those in the newly downloaded configuration file, deleting all inter-controller reference point information related to the page number of the newly downloaded configuration file in the inter-controller reference point registration queue by using the page number of the newly downloaded configuration file as an index after copying is completed, marking the configuration file by a configuration lower device mark 1, recording the updated configuration file page number, and finally copying the content in the newly downloaded configuration file to the configuration file object corresponding to the page number of the newly downloaded configuration file in the local controller memory.
Further, as shown in fig. 2, deleting all inter-controller reference point information related to the page number of the newly downloaded configuration file in the inter-controller reference point registration queue specifically includes:
acquiring the offset of the number of registered maximum communication data points stored in an inter-controller reference point registration queue in a local controller;
setting the offset of the point number of the next largest communication data in the reference point registration queue between the controllers to zero;
traversing the registered communication data in the reference point registration queue between the controllers from 0 within the maximum communication data point number offset;
judging whether the page number of the configuration file to which the traversed communication data belongs is the page number of the newly downloaded configuration file;
if not, assigning the traversal times to the offset of the next largest communication point and starting to traverse the next communication data;
if yes, setting all related information of the communication data in the inter-controller reference point registration queue to zero, subtracting 1 from the inter-controller communication points stored in the local controller, namely the communication data in the inter-controller reference point registration queue, and judging whether the traversal times reach the maximum communication point offset:
if not, traversing the next communication data in the reference point registration queue between the controllers;
if so, the value of the sub-decimal point number offset is assigned to the value of the maximum point number offset.
As a preferred embodiment, the RegOK variable in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI logic function block in the configuration file corresponding to the update cycle algorithm task is specifically:
when the configuration downloading mark is 1, judging whether the page numbers of the configuration file where the inter-controller analog quantity reference point logic function block NAI and the inter-controller switch quantity reference point logic function block NDI are located are the same as the page number of the configuration file updated at the time stored in the previous step:
if the values are the same, clearing 0 a RegOK variable in an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI;
otherwise, the RegOK variable is not processed.
S3, updating and acquiring a RegOK variable in an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI in a configuration file corresponding to the periodic algorithm task, and judging whether inter-controller communication data is registered in the local controller or not according to the RegOK value;
as a preferred embodiment, acquiring a RegOK variable in an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI in a configuration file corresponding to the periodic algorithm task, and determining whether to register inter-controller communication data in the local controller according to a RegOK value specifically includes:
judging the values of RegOK in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI,
if RegOK = 1, it is proved that communication data corresponding to the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI have been generated without being registered in the local controller;
if RegOK = 0, the inter-controller communication data needs to be registered in the local controller according to the basic information stored in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI, after the registration is completed, RegOK is set to 1, and the inter-controller communication data can be generated in the local controller.
Further, as optimization, the basic information stored in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI is specifically: a tool end configures an inter-controller reference point logic function block NAI and an inter-controller switching value reference point logic function block NDI in a configuration file, the logic function block NAI configures an inter-controller analog quantity reference point, and the inter-controller switching value reference point logic function block NDI configures an inter-controller switching value reference point; during configuration, a variable of a switch quantity reference point logic function block NDI between a logic function block NAI and a controller needs to be filled with a measuring point tag name of data expected to be communicated with a source-end controller; and automatically generating a source controller number to which the communication data belongs and a configuration file page number in the source controller in which the communication data belongs in the configuration file according to the measuring point tag name, so that basic information stored in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switch quantity reference point logic function block NDI comprises the measuring point name of the communication data, the source controller number to which the communication data belongs, the configuration file page number in the source controller in which the communication data belongs and the data offset of a configuration file data area to which the communication data belongs in the local controller.
Wherein, registering inter-controller communication data in the local controller specifically includes:
the method comprises the steps of pressing basic information of communication data stored in an inter-controller analog quantity reference point logic function block NAI and an inter-controller switching quantity reference point logic function block NDI into an inter-controller reference point registration queue of a local controller, selecting a near filling value in the registration queue when the basic information of the communication data is pressed into the inter-controller reference point registration queue of the local controller, namely traversing the inter-controller reference point registration queue within the maximum number of points which can be accommodated by the queue, pressing reference information of reference points stored in the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI at the current position if the current traversed position in the inter-controller reference point registration queue is not occupied, and updating the number of the referenced points of the reference controller stored in the local controller after successful registration.
And S4, calculating the inter-controller analog quantity reference point logic function block NAI and the inter-controller analog quantity reference point logic function block NDI according to the communication data among the registered controllers, and generating the output value of the inter-controller reference point logic function block.
As a preferred embodiment, the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI are operated to generate an output value of the inter-controller reference point logic function block:
before a periodic operation task starts, a local controller requests communication data information from a source-end controller according to the communication data information in a reference point registration queue among the controllers, the local controller stores the data information of the communication data to the local after acquiring the data information of the communication data returned by the source-end controller, and the communication data information comprises a communication data value and data offset of the communication data in a configuration file in the source-end controller;
when the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI are operated, the local controller fills the data value of the communication data stored to the local and the data offset of the communication data in the configuration file of the source-end controller into the data area of the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI and judges whether the data offset of the communication data is effective or not; if the data deviation of the communication data is invalid, setting the quality of the output values of the inter-controller analog quantity reference point logic function block NAI and the inter-controller switching quantity reference point logic function block NDI as a non-reference source end and uploading the non-reference source end to a tool end; and if the data offset verification of the reference point passes, the data value of the requested communication data can be normally output.
The data information of the reference point comprises a data value and a data offset of the reference point in a configuration file in the source controller, and the data offset of the reference point is invalid, namely the data offset of the reference point is negative or equal to 65535.
As shown in fig. 3, another objective of the present invention is to provide a system for generating communication data between DCS controllers, comprising:
the system comprises an acquisition module, a configuration module and a processing module, wherein the acquisition module is used for acquiring a configuration file of a tool end, and reference point logic function blocks among controllers are configured in the configuration file;
the pre-analysis and update module is used for pre-analyzing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
the register communication module is used for acquiring the variable and registering inter-controller communication data in the local controller according to the variable value of the variable;
and the output module is used for calculating the inter-controller reference point logic function block according to the registered inter-controller communication data and generating an output value of the inter-controller reference point logic function block.
A third object of the present invention is to provide an electronic device, as shown in fig. 4, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the DCS inter-controller communication data generation method when executing the computer program.
In the figure, the communication interface is used for accessing an external device to acquire data.
The method for generating the communication data among the DCS controllers comprises the following steps:
acquiring a configuration file of a tool end, wherein reference point logic function blocks among controllers are configured in the configuration file;
pre-parsing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
acquiring the variable, and registering inter-controller communication data in a local controller according to the variable value of the variable;
and operating the inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block.
A fourth object of the present invention is to provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method for generating communication data between DCS controllers.
The method for generating the communication data among the DCS controllers comprises the following steps:
acquiring a configuration file of a tool end, wherein reference point logic function blocks among controllers are configured in the configuration file;
pre-parsing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
acquiring the variable, and registering inter-controller communication data in a local controller according to the variable value of the variable;
and operating the inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

Claims (9)

1. A method for generating communication data between DCS controllers is characterized by comprising the following steps:
acquiring a configuration file of a tool end, wherein reference point logic function blocks among controllers are configured in the configuration file;
pre-parsing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
acquiring the variable, and registering inter-controller communication data in a local controller according to the variable value of the variable;
computing an inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block;
the updating of the configuration file newly downloaded by the analysis tool end according to the configuration downloading mark specifically comprises the following steps:
positioning the configuration file object according to the page number of the newly downloaded configuration file, and copying the same data items in the configuration file object to the newly downloaded configuration file;
after copying is finished, the page number of the newly downloaded configuration file is used as an index, all inter-controller reference point information related to the page number of the newly downloaded configuration file in the inter-controller reference point registration queue is deleted, the configuration device is marked 1, and the page number of the updated configuration file is recorded;
copying the content in the newly downloaded configuration file to a configuration file object corresponding to the page number of the newly downloaded configuration file in the memory of the local controller;
the updating of the variables in the inter-controller reference point logic function block in the configuration file object specifically includes:
when the configuration downloading mark is 1, judging whether the page number of the configuration file where the reference point logic function block between the controllers is located is the same as the page number of the updated configuration file stored in the previous step:
if the difference is equal to the preset value, clearing 0 the variable in the logic function block of the reference point between the controllers;
if the variables are different, the variables are not processed;
the calculating an inter-controller reference point logic function block according to the registered inter-controller communication data to generate an output value of the inter-controller reference point logic function block specifically includes:
before a periodic operation task starts, a local controller requests communication data information from a source end controller according to the communication data information in a reference point registration queue among the controllers, and the local controller stores the data information of the communication data to the local after acquiring the data information of the communication data returned by the source end controller; the communication data information comprises a communication data value and a data offset of the communication data in a configuration file in the source terminal controller;
when the inter-controller reference point logic function block is operated, the local controller fills the data value of the communication data stored to the local and the data offset of the communication data in the configuration file of the source-end controller into the data area of the inter-controller reference point logic function block, and judges whether the data offset of the communication data is valid:
if the data deviation of the communication data is invalid, setting the quality of an output value of a reference point logic function block between controllers as a non-reference source end, and uploading the output value to a tool end;
and if the data deviation of the reference point is effective, normally outputting the data value of the requested communication data.
2. The method of claim 1, wherein the updating the configuration file newly downloaded by the parsing tool according to the configuration downloading flag further comprises:
after the configuration file is pre-analyzed, a configuration downloading device mark 1 in a local controller enters a periodic algorithm task according to a time sequence, and then the configuration downloading device mark is detected:
if the configuration downloading mark is 1, the local controller updates a configuration file newly downloaded by the analysis tool end; if the configuration download flag is 0, then no update is performed.
3. The method of claim 1, wherein deleting all inter-controller reference point information in the inter-controller reference point registration queue associated with a newly downloaded configuration file page number specifically comprises:
acquiring the offset of the number of registered maximum communication data points stored in an inter-controller reference point registration queue in a local controller; setting the offset of the point number of the next largest communication data in the reference point registration queue between the controllers to zero;
traversing the registered communication data in the reference point registration queue between the controllers from 0 to the end of the point number offset of the maximum communication data;
judging whether the page number of the configuration file to which the traversed communication data belongs is the page number of the newly-downloaded configuration file:
if not, assigning the traversal times to the offset of the next largest communication point and starting to traverse the next communication data;
if yes, setting all related information of the communication data in the inter-controller reference point registration queue to zero, subtracting 1 from the inter-controller communication points stored in the local controller, and judging whether the traversal times reach the maximum communication point offset:
if not, traversing the next communication data in the reference point registration queue between the controllers;
if so, the value of the sub-decimal point number offset is assigned to the value of the maximum point number offset.
4. The DCS inter-controller communication data generation method of claim 1, wherein before registering inter-controller communication data in the local controller based on the variable value of the variable, further comprising:
judging the variable value of the variable in the logic function block of the reference point between the controllers;
if the variable value is 1, communication data corresponding to the logic function blocks of the reference points among the controllers are generated and do not need to be registered in the local controller;
if the variable value is 0, inter-controller communication data is registered in the local controller according to the basic information stored in the inter-controller reference point logic function block, after the registration is completed, the variable value is set to be 1, and the inter-controller communication data is generated in the local controller.
5. The method of claim 1, wherein the basic information stored in the inter-controller reference point logic function block includes:
the method comprises the steps of obtaining a measurement point label name of communication data, a source controller number of the communication data, a configuration file page number in a source controller of the communication data and a data offset of a configuration file data area of the communication data in a local controller.
6. The method of claim 1, wherein registering inter-controller communication data in a local controller according to the variable value of the variable specifically includes:
basic information of communication data stored in the inter-controller reference point logic function block is pressed into an inter-controller reference point registration queue of the local controller, and values are filled in the inter-controller reference point registration queue according to the following method:
traversing the inter-controller reference point registration queue within the maximum number of points which can be accommodated by the inter-controller reference point registration queue, if the currently traversed position in the inter-controller reference point registration queue is not occupied, pressing reference information of the reference point stored in the inter-controller reference point logic function block in the current position, and updating the reference point number of the reference controller stored in the local controller after successful registration.
7. A system for generating communication data between DCS controllers, the system being based on the method for generating communication data between DCS controllers of any one of claims 1 to 6, the system comprising:
the system comprises an acquisition module, a configuration module and a processing module, wherein the acquisition module is used for acquiring a configuration file of a tool end, and reference point logic function blocks among controllers are configured in the configuration file;
the pre-analysis and update module is used for pre-analyzing the configuration file; analyzing the configuration file after pre-analysis to obtain a configuration file object; updating a newly downloaded configuration file of an analysis tool end according to the configuration downloading mark, and updating variables in inter-controller reference point logic function blocks in a configuration file object;
the register communication module is used for acquiring the variable and registering inter-controller communication data in the local controller according to the variable value of the variable;
and the output module is used for calculating the inter-controller reference point logic function block according to the registered inter-controller communication data and generating an output value of the inter-controller reference point logic function block.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of generating DCS inter-controller communication data according to any of claims 1-6 when executing the computer program.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method for generating DCS inter-controller communication data according to any one of claims 1 to 6.
CN202111335499.8A 2021-11-11 2021-11-11 Method, system, equipment and storage medium for generating communication data between DCS controllers Active CN113778041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111335499.8A CN113778041B (en) 2021-11-11 2021-11-11 Method, system, equipment and storage medium for generating communication data between DCS controllers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111335499.8A CN113778041B (en) 2021-11-11 2021-11-11 Method, system, equipment and storage medium for generating communication data between DCS controllers

Publications (2)

Publication Number Publication Date
CN113778041A CN113778041A (en) 2021-12-10
CN113778041B true CN113778041B (en) 2022-02-15

Family

ID=78956906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111335499.8A Active CN113778041B (en) 2021-11-11 2021-11-11 Method, system, equipment and storage medium for generating communication data between DCS controllers

Country Status (1)

Country Link
CN (1) CN113778041B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311772B (en) * 2023-11-30 2024-02-06 中控技术股份有限公司 Configuration updating method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810081A (en) * 2011-06-01 2012-12-05 国际商业机器公司 Fibre channel input/output data routing system and method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006344090A (en) * 2005-06-10 2006-12-21 Hitachi Ltd San disaster recovery system
CN101566839B (en) * 2009-06-01 2011-03-30 杭州电子科技大学 Realizing method of trapezoidal pattern embedded configuration algorithm
CN103279418B (en) * 2013-06-05 2016-01-13 浙江中控技术股份有限公司 A kind of method of testing of configuration control information and device
CN204406186U (en) * 2015-02-13 2015-06-17 西安热工研究院有限公司 A kind of fieldbus controller
CA3085708A1 (en) * 2019-07-16 2021-01-16 Thomas Watson Multi-user audit system, method, and techniques
CN111221892A (en) * 2019-12-25 2020-06-02 深圳供电局有限公司 Configuration logic linkage system and construction method
CN113156902B (en) * 2021-04-13 2023-01-31 西安热工研究院有限公司 Configuration consistency checking and processing method of DCS (distributed control system)

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810081A (en) * 2011-06-01 2012-12-05 国际商业机器公司 Fibre channel input/output data routing system and method

Also Published As

Publication number Publication date
CN113778041A (en) 2021-12-10

Similar Documents

Publication Publication Date Title
CN113778041B (en) Method, system, equipment and storage medium for generating communication data between DCS controllers
CN110161983B (en) Control device, control system, control method, and storage medium
CN113703413B (en) Data interaction method, system, equipment and storage medium based on secondary index
US20210182101A1 (en) Program generating device, program generating method, and information storage medium
CN114095535B (en) Method for automatically mapping time sequence variable of physical equipment into digital model
CN115439019A (en) Constraint programming-based multi-target production scheduling method, equipment and storage medium
CN115185818A (en) Program dependence cluster detection method based on binary set
CN114083770A (en) Method, device, equipment and storage medium for adjusting process parameters and training models
CN113671924B (en) DCS real-time value setting method and system, equipment and storage medium
CN116362428A (en) Short-term load prediction method based on VMD-PCF-ARIMA
CN103631228A (en) Control system virtualization method
CN108763127B (en) Method for realizing Modbus adapter capable of realizing interconversion of source data and target data
CN113127413B (en) Operator data processing method, device, server and storage medium
JP6576884B2 (en) Control application generation support apparatus and control application generation support method
CN110076626B (en) Machining time prediction device
WO2020166432A1 (en) Control device, control program, and control system
JP4366576B2 (en) Programmable controller equipment
CN107861725B (en) iOS data reverse automatic analysis strategy
KR100614573B1 (en) System for maintaining consistency for created information of lot in manufacturing semiconductor process and method using for the same
CN113791596B (en) Memory hour mean value calculation method, system, equipment and medium based on dynamic application
CN112598535B (en) Power distribution network equipment measurement and reservation method during SVG (static var generator) conversion into G file
CN114356709A (en) Script device state analysis method and system, storage medium and computing device
US11474985B2 (en) Data processing apparatus, method, and recording medium
CN106656639B (en) Method and system for communicating with equipment
CN114328664A (en) Charging station operation and maintenance data acquisition method and system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant