CN117742680A - Control system program generation method, device, equipment and readable storage medium - Google Patents

Control system program generation method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN117742680A
CN117742680A CN202311766421.0A CN202311766421A CN117742680A CN 117742680 A CN117742680 A CN 117742680A CN 202311766421 A CN202311766421 A CN 202311766421A CN 117742680 A CN117742680 A CN 117742680A
Authority
CN
China
Prior art keywords
program
page
data
template
measuring point
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.)
Pending
Application number
CN202311766421.0A
Other languages
Chinese (zh)
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.)
Shenyang Blower Works Group Automatic Control System Engineering Co ltd
Original Assignee
Shenyang Blower Works Group Automatic Control System Engineering Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang Blower Works Group Automatic Control System Engineering Co ltd filed Critical Shenyang Blower Works Group Automatic Control System Engineering Co ltd
Priority to CN202311766421.0A priority Critical patent/CN117742680A/en
Publication of CN117742680A publication Critical patent/CN117742680A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a control system program generation method, a device, equipment and a readable storage medium, relates to the technical field of automation, does not need to repeatedly write codes manually, can save a great deal of time and labor workload, reduces the possibility of human errors, and further improves programming efficiency and the quality of generated programs. The method comprises the following steps: determining survey point list data and at least one program template page in response to a program generation instruction; reading the number of measuring points recorded in the measuring point list data, and calculating the page number of each program template page in at least one program template page based on the number of measuring points; pasting at least one program template page according to the page number of each program template page to obtain a prefabricated program page; and modifying or deleting template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.

Description

Control system program generation method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of automation technologies, and in particular, to a control system program generating method, apparatus, device, and readable storage medium.
Background
Along with the extremely fast growth speed of the engineering quantity of the control system, a great deal of manpower is consumed by manually completing the programming configuration of the control system, the manual participation degree is higher, and the setting process is more complicated. In order to improve the working efficiency, a set of intelligent system is urgently needed to replace the traditional manual work, and the traditional manual programming configuration is changed into the digital, intelligent and automatic control system program generation work.
Disclosure of Invention
In view of this, the present application provides a method, apparatus, device and readable storage medium for generating a control system program, which is mainly aimed at solving the problems of too much labor consumption and low programming efficiency when manually completing the control system programming configuration.
According to a first aspect of the present application, there is provided a control system program generating method, which is applicable to a target function module, including:
determining survey point list data and at least one program template page in response to a program generation instruction;
reading the number of measuring points recorded in the measuring point list data, and calculating the number of pages of each program template page in the at least one program template page based on the number of measuring points;
pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with a template program code;
And modifying or deleting template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.
Optionally, after determining the measurement point list data, the method further includes:
determining a data identifier corresponding to each measuring point data for the measuring point data recorded by each cell in the measuring point list data, and inquiring a preset data standard corresponding to the data identifier in a preset storage space so as to perform data identification on the measuring point data according to the preset data standard to obtain an identification result;
if the identification result of each measuring point data indicates that the standard is met, generating the target control system program according to the measuring point list data;
if the identification result of any measuring point data indicates that the standard is not met, recording the determined times, and continuously determining the measuring point list data to conduct data identification until the identification result of each measuring point data in the measuring point list data indicates that the standard is met before the determined times are larger than a threshold value of the determined times.
Optionally, the method further comprises:
if the identification result of the measurement point list data obtained when the determined times are equal to the threshold value of the determined times still has the measurement point data, generating alarm information and sending the alarm information to a management terminal, wherein the alarm information carries the measurement point data identification of the measurement point data which does not accord with the specification, so that a manager modifies the measurement point list data according to the measurement point data identification;
And generating the target control system program by adopting the modified measuring point list data.
Optionally, the reading the number of measurement points recorded in the measurement point list data, calculating the number of pages of each program template page in the at least one program template page based on the number of measurement points, including:
counting the number of input card identification numbers in the measuring point list data, and taking the number of the input card identification numbers as the number of the measuring points;
and carrying out the following processing on each program template page to obtain the page number of each program template page: and inquiring the coefficient of the program template page, and taking the product of the coefficient and the number of the measuring points as the page number of the program template page.
Optionally, said pasting said at least one program template page according to the number of pages of each of said program template pages to obtain a prefabricated program page, including:
for each program template page in at least one program template page, continuously pasting the program template page until the number of the pasted program template page is equal to the calculated number of the program template page, and inquiring the corresponding template program code of the program template page in a program code library to associate the template program code for the pasted program template page;
Pasting the program template pages according to the page number of each program template page, and associating template program codes for the pasted program template pages to obtain the prefabricated program pages.
Optionally, modifying or deleting template program codes associated with each program template page in the prefabricated program pages based on the measurement point data recorded in the measurement point list data to obtain a target control system program, including:
any measuring point data recorded in the measuring point list data is read, programming actions and execution coordinates corresponding to the measuring point data are determined according to a preset program generation rule, the programming actions comprise an input data action and a deleting action, and the execution coordinates are used for indicating the position for executing the programming actions;
and determining a template program code corresponding to the execution coordinates, and modifying or deleting the template program code according to the programming action to obtain a target control system program.
Optionally, the determining the survey point list data and the at least one program template page in response to the program generation instruction comprises:
responding to a control system generation instruction, and reading a measuring point list corresponding to a module identifier and at least one program template page in a preset storage space according to the module identifier of a target functional module, wherein the measuring point list records measuring point data identifiers to be acquired, the number of the target functional modules is at least one, and the at least one target functional module is determined according to the at least one module identifier in a control system program generation device based on the at least one module identifier uploaded by a user;
And acquiring corresponding measuring point data according to the measuring point data identification, and correspondingly filling the measuring point data into the cells in the measuring point list to obtain the measuring point list data.
According to a second aspect of the present application, there is provided a control system program generating apparatus, the apparatus comprising: each functional module comprises an acquisition unit, an analysis unit and an execution unit;
the acquisition unit is used for responding to the program generation instruction and determining measuring point list data and at least one program template page;
the analysis unit is used for reading the number of the measuring points recorded in the measuring point list data, and calculating the page number of each program template page in the at least one program template page based on the number of the measuring points;
the execution unit is used for pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, and each program template page in the prefabricated program pages is associated with one template program code;
and the execution unit is used for modifying or deleting the template program code associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.
Optionally, the collection unit 301 is configured to determine, for the measurement point data recorded by each cell in the measurement point list data, a data identifier corresponding to each measurement point data, and query, in a preset storage space, a preset data standard corresponding to the data identifier, so as to perform data identification on the measurement point data according to the preset data standard, thereby obtaining an identification result; if the identification result of each measuring point data indicates that the standard is met, generating the target control system program according to the measuring point list data; if the identification result of any measuring point data indicates that the standard is not met, recording the determined times, and continuously determining the measuring point list data to conduct data identification until the identification result of each measuring point data in the measuring point list data indicates that the standard is met before the determined times are larger than a threshold value of the determined times.
Optionally, the collecting unit 301 is further configured to generate alarm information and send the alarm information to a management terminal if the identification result of the measurement point data still exists in the measurement point list data obtained when the determined number of times is equal to the determined number of times threshold, where the alarm information carries a measurement point data identifier of the measurement point data that does not meet the specification, so that a manager modifies the measurement point list data according to the measurement point data identifier; and generating the target control system program by adopting the modified measuring point list data.
Optionally, the analyzing unit 302 is configured to count the number of input card identification numbers in the measurement point list data, and take the number of input card identification numbers as the number of measurement points; and carrying out the following processing on each program template page to obtain the page number of each program template page: and inquiring the coefficient of the program template page, and taking the product of the coefficient and the number of the measuring points as the page number of the program template page.
Optionally, the executing unit 303 is configured to continuously paste, for each program template page in at least one program template page, the program template page in a program production page until the number of pages of the pasted program template page is equal to the calculated number of pages of the program template page, and query a program code library for a template program code corresponding to the program template page, and associate the template program code for the pasted program template page; pasting the program template pages according to the page number of each program template page, and associating template program codes for the pasted program template pages to obtain the prefabricated program pages.
Optionally, the executing unit 303 is configured to read any one of the measurement point data recorded in the measurement point list data, determine a programming action and an execution coordinate corresponding to the measurement point data according to a preset program generating rule, where the programming action includes an input data action and a deletion action, and the execution coordinate is used to indicate a location where the programming action is executed; and determining a template program code corresponding to the execution coordinates, and modifying or deleting the template program code according to the programming action to obtain a target control system program.
Optionally, the collecting unit 301 is configured to respond to a control system generation instruction, read, in a preset storage space, a measurement point list corresponding to a module identifier and at least one program template page according to the module identifier of a target function module, where the measurement point list records measurement point data identifiers to be acquired, the number of the target function modules is at least one, and at least one of the target function modules is determined in a control system program generating device according to the at least one module identifier based on at least one module identifier uploaded by a user; and acquiring corresponding measuring point data according to the measuring point data identification, and correspondingly filling the measuring point data into the cells in the measuring point list to obtain the measuring point list data.
According to a third aspect of the present application there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the first aspects described above when the computer program is executed by the processor.
According to a fourth aspect of the present application there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the first aspects described above.
By means of the technical scheme, the control system program generating method, the control system program generating device, the control system program generating equipment and the readable storage medium are characterized in that the target function module firstly responds to a program generating instruction to determine measuring point list data and at least one program template page. Subsequently, the number of measurement points recorded in the measurement point list data is read, and the number of pages of each program template page in the at least one program template page is calculated based on the number of measurement points. Next, pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with one template program code. Finally, modifying or deleting the template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain the target control system program. According to the method and the device, the prefabricated program page is constructed, template program codes in the prefabricated program page can be modified or deleted based on accurate measuring point data when the program is generated, repeated code writing is not needed, a large amount of time and labor workload can be saved, the possibility of human errors is reduced, and programming efficiency and the generated program quality are improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a control system program generating method according to an embodiment of the present application;
fig. 2A is a schematic flow chart of a control system program generating method according to an embodiment of the present application;
FIG. 2B is a schematic diagram of measurement point list data of a control system program generating method according to an embodiment of the present disclosure;
FIG. 2C is a schematic diagram of a prefabricated program page of a control system program generating method according to an embodiment of the present application;
FIG. 2D is a schematic view of a target control system program page of a control system program generating method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a control system program generating device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Along with the extremely fast growth speed of the engineering quantity of the control system, a great deal of manpower is consumed by manually completing the programming configuration of the control system, the manual participation degree is higher, and the setting process is more complicated. In order to improve the working efficiency, a set of intelligent system is urgently needed to replace the traditional manual work, and the traditional manual programming configuration is changed into the digital, intelligent and automatic control system program generation work. Accordingly, the present application provides a control system program generation method in which a target function module in the present application first determines survey point list data and at least one program template page in response to program generation instructions. Subsequently, the number of measurement points recorded in the measurement point list data is read, and the number of pages of each program template page in the at least one program template page is calculated based on the number of measurement points. Next, pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with one template program code. Finally, modifying or deleting the template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain the target control system program. In the embodiment of the application, by constructing the prefabricated program page, the template program codes in the prefabricated program page can be modified or deleted based on accurate measurement point data when the program is generated, the code is not required to be repeatedly written manually, a great deal of time and labor workload can be saved, the possibility of human errors is reduced, and the programming efficiency and the generated program quality are improved
The embodiment of the application provides a control system program generating method, as shown in fig. 1, comprising the following steps:
101. in response to the program generation instruction, survey point inventory data and at least one program template page are determined.
In this step, the target function module determines, in response to a program generation instruction initiated by the control module in the control system program generation device, measurement point list data and at least one program template page required by the target function module to generate the target control system program. The measuring point list data refer to a list of related information of different measuring points recorded in the process of monitoring, testing or data acquisition, and the measuring points refer to positions, equipment or parameters to be measured or monitored. The program template pages are preset by a manager, and each program template page is associated with a pre-edited template program code. The target function module is a function module selected by the user to execute the program generation instruction, and the control system program generation apparatus includes a plurality of function modules, and the types of the plurality of function modules are not particularly limited in this application.
102. And reading the number of the measuring points recorded in the measuring point list data, and calculating the page number of each program template page in at least one program template page based on the number of the measuring points.
In this step, the target function module identifies the measurement point list data based on the natural language processing technique, and counts the number of measurement points recorded in the measurement point list. And further, calculating the number of the measuring points according to the page number coefficient corresponding to each program template page to obtain the page number corresponding to each program template page.
103. Pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with one template program code.
In this step, the target function module will paste at least one program template page according to the calculated page number of each program template page, for example, 3 AI conversion pages and 2 AI offline alarm pages are calculated and determined to be needed, and then the target function module will paste 3 AI conversion pages and 2 AI offline alarm pages on the program generation page to obtain the prefabricated program page.
104. And modifying or deleting template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.
In this step, considering that the measurement point data in the cells in the measurement point list data is empty, that is, a null value, the corresponding template program code does not need to be present in the preset program page, and the corresponding template program code can be found in the preset program page for deletion. In addition, if specific values exist in the measurement point data in some cells, the corresponding template program code needs to be changed according to the specific values, namely, the parameter values in the template program code are changed.
In the method provided by the embodiment of the application, the target function module firstly responds to the program generation instruction to determine the measuring point list data and at least one program template page. Subsequently, the number of measurement points recorded in the measurement point list data is read, and the number of pages of each program template page in the at least one program template page is calculated based on the number of measurement points. Next, pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with one template program code. Finally, modifying or deleting the template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain the target control system program. According to the method and the device, the prefabricated program page is constructed, template program codes in the prefabricated program page can be modified or deleted based on accurate measuring point data when the program is generated, repeated code writing is not needed, a large amount of time and labor workload can be saved, the possibility of human errors is reduced, and programming efficiency and the generated program quality are improved.
The embodiment of the application provides a control system program generating method, as shown in fig. 2A, including:
201. In response to the program generation instruction, survey point inventory data and at least one program template page are determined.
In the embodiment of the present application, first, an application environment of the method is described, the method is applicable to a target function sub-module in a control system program generating device, a plurality of function modules exist in the control system program generating device, and an overall function is a modular assembly mode, and any sub-function modules can be combined to achieve an intended purpose. Engineers can adjust the appropriate submodule according to specific industries and control major categories so as to adapt to intelligent programming of various engineering control programs. Specifically, the engineer may initiate a program generation instruction according to the project requirement based on the management terminal, and control a control module in the system program generation apparatus to read at least one module identifier carried in the program generation instruction, determine at least one function module indicated by the at least one module identifier, and use the at least one function module as at least one target function module. That is, the target function modules are function modules selected by the user to perform control system program generation, the number of which is at least one, and at least one target function module operates independently of the other while performing control system program generation. It should be noted that, after determining at least one target functional module, the control module in the control system program generating device sends the received control system generating instruction to the target functional module to drive the target functional module to start operating, and the following describes an operating process of one target functional module:
In the step, a module identifier exists in the target functional module, the target functional module responds to a control system generation instruction, and a measuring point list and at least one program template page corresponding to the module identifier are read in a preset storage space according to the module identifier. For example, the LIST of io_list measurement points corresponding to the AI program conversion module records a plurality of measurement point data identifiers to be acquired, including, but not limited to, a loop bit number, a loop description, an input card identification number, a rack slot number, an upper range limit, a lower range limit, an engineering unit, a digital quantity closing message, a digital quantity opening message, PID positive and negative effects, valve characteristics, an alarm or interlocking low set value, an alarm or interlocking high set value, and a normal set value of a starting condition. It should be noted that, the measurement point list lists corresponding to different functional modules are different, and thus the obtained measurement point list data are also different, and the application does not specifically limit the identification of the measurement point data. In addition, the at least one program template page corresponding to the AI program conversion module can be an AI conversion page, an AI offline alert page, an AI interlocking memory rem page, and so forth. The preset program template pages include, but are not limited to, an AI conversion page, an AI offline alarm page, a PI conversion page, a PI danger alarm page, a PI interlocking memory n page, a BTL communication page, a BTL conversion page, a DI conversion page, a DO conversion page, a DI interlocking page, a PID page, a start permission condition judgment page, a start permission page, and program template pages required by different functional modules are different, and related technicians can upload the written program template pages to a preset storage space according to requirements. Further, the target function module obtains corresponding measurement point data according to the identification of the measurement point data, and fills the measurement point data into the cells in the measurement point list correspondingly, as shown in fig. 2B, to obtain measurement point list data.
202. Identifying the measuring point list data, determining the rationality of the measuring point list data, and when the identification result of each measuring point data in the measuring point list data indicates that the standard is met, reading the number of the measuring points recorded in the measuring point list data, and calculating the number of pages of each program template page in at least one program template page based on the number of the measuring points.
In this step, in order to ensure the quality of the subsequently generated control system program, the target function module needs to identify the measurement point list data, determine the rationality of the measurement point list data, specifically, determine the data identifier corresponding to each measurement point data for the measurement point data recorded by each cell in the measurement point list data, and query the preset data standard corresponding to the data identifier in the preset storage space, so as to identify the data of the measurement point according to the preset data standard, and obtain the identification result. For example, reading the detection bit number data from the cells under the detection bit number, determining that the preset data standard of the detection bit number data must not contain special symbols and the number of the bit number characters must not exceed 20 bits, and identifying the detection bit number data according to the standard, if the detection bit number data does not contain special characters and the number of the bit number characters does not exceed 20 bits, generating an identification result indicating that the specification is met, otherwise, generating an identification result indicating that the specification is not met. It should be noted that, the preset data standards corresponding to different data identifiers are different, at least one judgment rule is recorded in the preset data standards, and the content of the judgment rule under the preset data standards is not specifically limited in the application.
Further, if the identification result of each measurement point data indicates that the specification is met, the target control system program is generated according to the measurement point list data, that is, after the number of pages of each program template page is calculated, the following step 203 is continuously executed. If the identification result of any measuring point data indicates that the standard is not met, recording the determined times, and continuously determining the measuring point list data to conduct data identification until the identification result of each measuring point data in the measuring point list data indicates that the standard is met before the determined times are larger than a threshold value of the determined times. In the actual operation process, if the identification result of the measurement point list data obtained when the determined times are equal to the threshold value of the determined times still has the measurement point data, generating alarm information and sending the alarm information to the management terminal, wherein the alarm information carries the measurement point data identification of the measurement point data which does not accord with the specification, so that the management personnel can modify the measurement point list data according to the measurement point data identification. And further generating a target control system program by using the modified measurement point list data, namely, after calculating the number of pages of each program template page, continuing to execute the following step 203.
Then, counting the number of the input card identification numbers in the measuring point list data, and taking the number of the input card identification numbers as the measuring point number; each program template page is processed as follows to obtain the number of pages of each program template page: the coefficient of the program template page is inquired, and the product of the coefficient and the number of measured points is taken as the page number of the program template page. For example, for an AI conversion page, 3 AI conversion pages are required for one measuring point, and there are 4 measuring points in the measuring point list data, and then the product 12 of the number of measuring points 4 and the coefficient 3 is taken as the number of pages of the AI conversion page.
The step can monitor the identification result of the measuring point list data in real time by setting the threshold value of the determined times, and send alarm information when the problem is found, so that the manager can modify and process the data in time. Meanwhile, the page number of the program template page is automatically calculated, so that the complexity and probability of manual calculation are avoided, and the target control system program can be generated more quickly.
203. Pasting at least one program template page according to the page number of each program template page to obtain a prefabricated program page.
In this step, the target function module pastes at least one program template according to the calculated page number of each program template, specifically, as shown in fig. 2C, for each program template in at least one program template, pastes the program template continuously until the page number of the pasted program template is equal to the calculated page number of the program template, and searches the program code library for the template program code corresponding to the program template, and associates the template program code for the pasted program template. Pasting program template pages according to the page number of each program template page, and associating template program codes for the pasted program template pages to obtain prefabricated program pages. For example, if the calculation determines that 3 AI conversion pages and 2 AI offline alarm pages are needed, the target function module will paste 3 AI conversion pages associated with AI conversion template program codes and 2 AI offline alarm pages associated with AI offline alarm template program codes on the program generation page to obtain a prefabricated program page.
204. And modifying or deleting template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.
In this step, considering that the measurement point data in the cells in the measurement point list data is empty, that is, a null value, the corresponding template program code does not need to be present in the preset program page, and the corresponding template program code can be found in the preset program page for deletion. In addition, if specific values exist in the measurement point data in some cells, the corresponding template program code needs to be changed according to the specific values, namely, the parameter values in the template program code are changed.
Specifically, as shown in fig. 2D, any one of the measurement point data recorded in the measurement point list data is read, a programming action and an execution coordinate corresponding to the measurement point data are determined according to a preset program generation rule, the programming action includes an input data action and a deletion action, and the execution coordinate is used for indicating a position where the programming action is executed. And determining a template program code corresponding to the execution coordinates, and modifying or deleting the template program code according to programming actions to obtain the target control system program. And executing the operation of filling the address name of the variable after the execution coordinates are the horizontal coordinate point value and the vertical coordinate point value of the predetermined variable are obtained. The operations of filling in the constants and the necessary remark information are performed to increase the readability of the program and to modify the convenience of the search. When the programming action is a delete action, the program template page associated with the template program code is deleted. When the programming action is an input data action, the specified measurement point data and the data generation rule are determined based on the preset program generation rule, the data processing is carried out on the specified measurement point data according to the data generation rule, the input data is generated, and the template program code is modified according to the input data. For example, the AI conversion function module may read the "loop description" in the measurement point list data, determine the template program code corresponding to the "loop description" and the preset program generation rule, and the preset program generation rule indicates to automatically fill in the loop description, determine that the specified measurement point data is specific content under the "loop description", determine that the data generation rule is to read the data to fill in, and input the specific content under the "loop description" read into the template program code. For another example, the AI conversion function module may read the "low alarm" in the measurement point list data, determine a template program code and a preset program generation rule corresponding to the "low alarm", and the preset program generation rule indicates whether the data under the "low alarm" has a low alarm set value, if the low alarm set value has the low alarm set value, input the low alarm set value and the low alarm boolean indication bit variable, determine that the specified measurement point data is the low alarm set value under the "low alarm", read the low alarm set value under the "low alarm", and input the low alarm set value and the low alarm boolean indication bit variable according to the preset data generation rule, and when the low alarm set value is determined to have the low alarm set value, determine the low alarm boolean indication bit variable according to the low alarm set value, and input the low alarm set value and the low alarm boolean indication bit variable into the template program code.
In the method provided by the embodiment of the application, the target function module firstly responds to the program generation instruction to determine the measuring point list data and at least one program template page. Subsequently, the number of measurement points recorded in the measurement point list data is read, and the number of pages of each program template page in the at least one program template page is calculated based on the number of measurement points. Next, pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with one template program code. Finally, modifying or deleting the template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain the target control system program. According to the method and the device, the prefabricated program page is constructed, template program codes in the prefabricated program page can be modified or deleted based on accurate measuring point data when the program is generated, repeated code writing is not needed, a large amount of time and labor workload can be saved, the possibility of human errors is reduced, and programming efficiency and the generated program quality are improved.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present application provides a control system program generating apparatus, as shown in fig. 3, where the apparatus includes: a plurality of functional modules, wherein each functional module comprises an acquisition unit 301, an analysis unit 302 and an execution unit 303.
The acquisition unit 301 is configured to determine measurement point list data and at least one program template page in response to a program generation instruction;
the analysis unit 302 is configured to read the number of measurement points recorded in the measurement point list data, and calculate the number of pages of each program template page in the at least one program template page based on the number of measurement points;
the execution unit 303 is configured to paste the at least one program template page according to the page number of each program template page, so as to obtain prefabricated program pages, where each program template page in the prefabricated program pages is associated with a template program code;
the execution unit 303 is configured to modify or delete template program codes associated with each program template page in the prefabricated program pages based on the measurement point data recorded in the measurement point list data, so as to obtain a target control system program.
In a specific application scenario, the collection unit 301 is configured to determine, for measurement point data recorded by each cell in the measurement point list data, a data identifier corresponding to each measurement point data, and query, in a preset storage space, a preset data standard corresponding to the data identifier, so as to perform data identification on the measurement point data according to the preset data standard, thereby obtaining an identification result; if the identification result of each measuring point data indicates that the standard is met, generating the target control system program according to the measuring point list data; if the identification result of any measuring point data indicates that the standard is not met, recording the determined times, and continuously determining the measuring point list data to conduct data identification until the identification result of each measuring point data in the measuring point list data indicates that the standard is met before the determined times are larger than a threshold value of the determined times.
In a specific application scenario, the collecting unit 301 is further configured to generate alarm information and send the alarm information to a management terminal if an identification result of the measurement point data still exists in the measurement point list data obtained when the determined number of times is equal to the determined number of times threshold, where the identification result indicates that the identification result is not in accordance with a specification, and the alarm information carries a measurement point data identifier of the measurement point data which is not in accordance with the specification, so that a manager modifies the measurement point list data according to the measurement point data identifier; and generating the target control system program by adopting the modified measuring point list data.
In a specific application scenario, the analysis unit 302 is configured to count, in the measurement point list data, the number of input card identification numbers, and take the number of the input card identification numbers as the number of measurement points; and carrying out the following processing on each program template page to obtain the page number of each program template page: and inquiring the coefficient of the program template page, and taking the product of the coefficient and the number of the measuring points as the page number of the program template page.
In a specific application scenario, the executing unit 303 is configured to, for each program template page in at least one program template page, continuously paste the program template page on a program production page until the number of pages of the pasted program template page is equal to the calculated number of pages of the program template page, and query a program code library for a template program code corresponding to the program template page, and associate the template program code for the pasted program template page; pasting the program template pages according to the page number of each program template page, and associating template program codes for the pasted program template pages to obtain the prefabricated program pages.
In a specific application scenario, the execution unit 303 is configured to read any one of the measurement point data recorded in the measurement point list data, determine a programming action and an execution coordinate corresponding to the measurement point data according to a preset program generation rule, where the programming action includes an input data action and a deletion action, and the execution coordinate is used to indicate a position for executing the programming action; and determining a template program code corresponding to the execution coordinates, and modifying or deleting the template program code according to the programming action to obtain a target control system program.
In a specific application scenario, the acquisition unit 301 is configured to respond to a control system generation instruction, read, in a preset storage space, a measurement point list corresponding to the module identifications and at least one program template page according to the module identifications of target function modules, where the measurement point list records measurement point data identifications to be acquired, the number of the target function modules is at least one, and at least one of the target function modules is determined according to the at least one module identification in a control system program generating device, where the number of the target function modules is at least one and the at least one module identification is uploaded by a user; and acquiring corresponding measuring point data according to the measuring point data identification, and correspondingly filling the measuring point data into the cells in the measuring point list to obtain the measuring point list data.
The device provided by the embodiment of the application, the target function module of the application firstly responds to the program generation instruction to determine measuring point list data and at least one program template page. Subsequently, the number of measurement points recorded in the measurement point list data is read, and the number of pages of each program template page in the at least one program template page is calculated based on the number of measurement points. Next, pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with one template program code. Finally, modifying or deleting the template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain the target control system program. According to the method and the device, the prefabricated program page is constructed, template program codes in the prefabricated program page can be modified or deleted based on accurate measuring point data when the program is generated, repeated code writing is not needed, a large amount of time and labor workload can be saved, the possibility of human errors is reduced, and programming efficiency and the generated program quality are improved.
It should be noted that, other corresponding descriptions of each functional unit related to the control system program generating apparatus provided in the embodiment of the present application may refer to corresponding descriptions in fig. 1 and fig. 2A to fig. 2D, and are not repeated herein.
In an exemplary embodiment, a device is also provided, where the device includes a communication bus, a processor, a memory, and a communication interface, and may further include an input-output interface and a display device, where each functional unit may perform communication with each other through the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the control system program generating method in the above embodiment.
A computer readable storage medium having stored thereon a computer program which when executed by a processor realizes the steps of the control system program generating method.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented in hardware, or may be implemented by means of software plus necessary general hardware platforms. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to perform the methods described in various implementation scenarios of the present application.
Those skilled in the art will appreciate that the drawings are merely schematic illustrations of one preferred implementation scenario, and that the modules or flows in the drawings are not necessarily required to practice the present application.
Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The foregoing application serial numbers are merely for description, and do not represent advantages or disadvantages of the implementation scenario.
The foregoing disclosure is merely a few specific implementations of the present application, but the present application is not limited thereto and any variations that can be considered by a person skilled in the art shall fall within the protection scope of the present application.

Claims (10)

1. A control system program generation method, wherein the method is applied to a target function module, and comprises:
determining survey point list data and at least one program template page in response to a program generation instruction;
reading the number of measuring points recorded in the measuring point list data, and calculating the number of pages of each program template page in the at least one program template page based on the number of measuring points;
Pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, wherein each program template page in the prefabricated program pages is associated with a template program code;
and modifying or deleting template program codes associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.
2. The method of claim 1, wherein after the determination of the survey point inventory data, the method further comprises:
determining a data identifier corresponding to each measuring point data for the measuring point data recorded by each cell in the measuring point list data, and inquiring a preset data standard corresponding to the data identifier in a preset storage space so as to perform data identification on the measuring point data according to the preset data standard to obtain an identification result;
if the identification result of each measuring point data indicates that the standard is met, generating the target control system program according to the measuring point list data;
if the identification result of any measuring point data indicates that the standard is not met, recording the determined times, and continuously determining the measuring point list data to conduct data identification until the identification result of each measuring point data in the measuring point list data indicates that the standard is met before the determined times are larger than a threshold value of the determined times.
3. The method according to claim 2, wherein the method further comprises:
if the identification result of the measurement point list data obtained when the determined times are equal to the threshold value of the determined times still has the measurement point data, generating alarm information and sending the alarm information to a management terminal, wherein the alarm information carries the measurement point data identification of the measurement point data which does not accord with the specification, so that a manager modifies the measurement point list data according to the measurement point data identification;
and generating the target control system program by adopting the modified measuring point list data.
4. The method of claim 1, wherein the reading the number of stations recorded in the station inventory data, calculating the number of pages of each of the at least one program template page based on the number of stations, comprises:
counting the number of input card identification numbers in the measuring point list data, and taking the number of the input card identification numbers as the number of the measuring points;
and carrying out the following processing on each program template page to obtain the page number of each program template page: and inquiring the coefficient of the program template page, and taking the product of the coefficient and the number of the measuring points as the page number of the program template page.
5. The method of claim 1, wherein pasting the at least one program template page according to the number of pages of each program template page to obtain a pre-program page comprises:
for each program template page in at least one program template page, continuously pasting the program template page until the number of the pasted program template page is equal to the calculated number of the program template page, and inquiring the corresponding template program code of the program template page in a program code library to associate the template program code for the pasted program template page;
pasting the program template pages according to the page number of each program template page, and associating template program codes for the pasted program template pages to obtain the prefabricated program pages.
6. The method of claim 1, wherein said modifying or deleting template program code associated with each of said pre-program pages based on station data recorded in said station inventory data to obtain a target control system program comprises:
any measuring point data recorded in the measuring point list data is read, programming actions and execution coordinates corresponding to the measuring point data are determined according to a preset program generation rule, the programming actions comprise an input data action and a deleting action, and the execution coordinates are used for indicating the position for executing the programming actions;
And determining a template program code corresponding to the execution coordinates, and modifying or deleting the template program code according to the programming action to obtain a target control system program.
7. The method of claim 1, wherein determining survey point inventory data and at least one program template page in response to program generation instructions comprises:
responding to a control system generation instruction, and reading a measuring point list corresponding to a module identifier and at least one program template page in a preset storage space according to the module identifier of a target functional module, wherein the measuring point list records measuring point data identifiers to be acquired, the number of the target functional modules is at least one, and the at least one target functional module is determined according to the at least one module identifier in a control system program generation device based on the at least one module identifier uploaded by a user;
and acquiring corresponding measuring point data according to the measuring point data identification, and correspondingly filling the measuring point data into the cells in the measuring point list to obtain the measuring point list data.
8. A control system program generating apparatus, characterized in that the apparatus comprises: each functional module comprises an acquisition unit, an analysis unit and an execution unit;
The acquisition unit is used for responding to the program generation instruction and determining measuring point list data and at least one program template page;
the analysis unit is used for reading the number of the measuring points recorded in the measuring point list data, and calculating the page number of each program template page in the at least one program template page based on the number of the measuring points;
the execution unit is used for pasting at least one program template page according to the page number of each program template page to obtain prefabricated program pages, and each program template page in the prefabricated program pages is associated with one template program code;
and the execution unit is used for modifying or deleting the template program code associated with each program template page in the prefabricated program pages based on the measuring point data recorded in the measuring point list data to obtain a target control system program.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311766421.0A 2023-12-20 2023-12-20 Control system program generation method, device, equipment and readable storage medium Pending CN117742680A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311766421.0A CN117742680A (en) 2023-12-20 2023-12-20 Control system program generation method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311766421.0A CN117742680A (en) 2023-12-20 2023-12-20 Control system program generation method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117742680A true CN117742680A (en) 2024-03-22

Family

ID=90260472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311766421.0A Pending CN117742680A (en) 2023-12-20 2023-12-20 Control system program generation method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117742680A (en)

Similar Documents

Publication Publication Date Title
CN111835582B (en) Configuration method and device of Internet of things inspection equipment and computer equipment
CN111026460B (en) Method and device for rapidly allocating points by using regional templates in configuration tool
CN113901162B (en) Unmanned aerial vehicle environment monitoring method and system based on city management and cloud platform
CN111105150A (en) Project risk analysis system
CN115657890A (en) PRA robot customizable method
CN109375146B (en) Supplementary collection method and system for electricity consumption data and terminal equipment
CN116843107B (en) Building information intelligent management system based on BIM technology
CN117742680A (en) Control system program generation method, device, equipment and readable storage medium
CN102053571B (en) Data acquisition method of information acquisition terminal
CN112527610A (en) Method and device for monitoring operation state of equipment
CN114387123B (en) Data acquisition management method
CN112379656A (en) Processing method, device, equipment and medium for detecting abnormal data of industrial system
CN111694752B (en) Application testing method, electronic device and storage medium
CN109813954B (en) Current monitoring method and device for mobile robot
CN112561388A (en) Information processing method, device and equipment based on Internet of things
CN114124679A (en) Internet of things terminal log uploading method and device and internet of things terminal
CN109639520B (en) Computer-aided test method for network communication of reactor protection system
CN111722977A (en) System inspection method and device and electronic equipment
CN114792209B (en) Method, equipment and storage medium for engineering construction risk assessment
CN113741815B (en) Storage system management and control method, device and equipment and readable storage medium
CN117311257B (en) PLC centralized control method and system applied to cell formation composition
CN111934910B (en) Fault processing method, equipment and storage medium
CN112598816B (en) Vehicle data acquisition method and device and vehicle diagnosis system
CN115185735A (en) Software fault identification self-healing method and related equipment
CN110084514B (en) Automatic process pushing method and system

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