CN112882408A - Online editing method and device for ST text language - Google Patents

Online editing method and device for ST text language Download PDF

Info

Publication number
CN112882408A
CN112882408A CN202011636954.3A CN202011636954A CN112882408A CN 112882408 A CN112882408 A CN 112882408A CN 202011636954 A CN202011636954 A CN 202011636954A CN 112882408 A CN112882408 A CN 112882408A
Authority
CN
China
Prior art keywords
text language
editing
window
content
displaying
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.)
Granted
Application number
CN202011636954.3A
Other languages
Chinese (zh)
Other versions
CN112882408B (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.)
Shenzhen Leadshine Control Technology Co Ltd
Original Assignee
Shenzhen Leadshine Control Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Leadshine Control Technology Co Ltd filed Critical Shenzhen Leadshine Control Technology Co Ltd
Priority to CN202011636954.3A priority Critical patent/CN112882408B/en
Publication of CN112882408A publication Critical patent/CN112882408A/en
Application granted granted Critical
Publication of CN112882408B publication Critical patent/CN112882408B/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/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence
    • 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/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23146Programmable, reconfigurable via microprocessor or coding switches

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an ST text language online editing method and an ST text language online editing device. Wherein, the method comprises the following steps: displaying the input keywords of the ST text language in an editing window; displaying a prompt box according to the keywords, wherein the prompt box at least comprises one item of content which has an association relation with the keywords, and the content comprises the keywords or functions; and receiving a first operation on the content in the prompt box, and displaying the content at a subsequent position of the keyword in the editing window. The invention solves the technical problems that ST text language in the related technology is weak in logic control, needs to be matched with a ladder diagram for use to realize more complex application and is low in editing efficiency.

Description

Online editing method and device for ST text language
Technical Field
The invention relates to the field of automatic control, in particular to an ST text language online editing method and an ST text language online editing device.
Background
In the Programmable Logic Controller (PLC) standard programming language, a structured ST (structured text) text language is a high-level language, is structured, is fast and efficient to program, has the advantages of condition judgment, four arithmetic operations, complex processing functions and the like, and overcomes the defects of complex realization of the trapezoidal graph operation function and difficult program analysis.
The ST language is flexible to use, has rich judgment, arithmetic operation, cycle statements and logic judgment statements, can be packaged into a standard library file for program calling, and realizes modular programming, but the ST text language is weak in logic control and needs to be matched with a ladder diagram for use to realize more complex application. In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an ST text language online editing method and an ST text language online editing device, which at least solve the technical problems that the ST text language in the related technology is weak in logic control, needs to be matched with a ladder diagram for use to realize more complex application and is low in editing efficiency.
According to an aspect of an embodiment of the present invention, there is provided an online editing method of an ST text language, including: displaying the input keywords of the ST text language in an editing window; displaying a prompt box according to the keywords, wherein the prompt box at least comprises one item of content which has an association relation with the keywords, and the content comprises the keywords or functions; and receiving a first operation on the content in the prompt box, and displaying the content at a subsequent position of the keyword in the editing window.
Optionally, after displaying the input keywords of the ST text language in the editing window, the method includes: and identifying the row where the input keyword is positioned.
Optionally, before receiving the first operation on the content in the prompt box, the method further includes: and displaying a first annotation window corresponding to the content according to the content in the prompt box where the cursor is located, wherein the first annotation window comprises annotation information of the content.
Optionally, the method further includes: and displaying a second comment window of the variable according to a second operation on the variable of the ST text language displayed in the editing window, wherein the second comment window comprises comment information of the variable.
Optionally, the method further includes: displaying an editing assistant window of the selected ST text language according to a third operation on the selected ST text language in the editing window, wherein the editing assistant window comprises an instruction list for operation of the selected ST text language; according to a fourth operation of the instruction of the editing assistant window, performing corresponding operation of the instruction on the selected ST text language, wherein the instruction comprises at least one of the following: copy, cut, paste, select, find, replace, undo, redo, go to define, expand all, collapse all.
Optionally, in a case that the fourth operation is performed on the searched instruction, performing, according to the fourth operation of the instruction of the editing assistant window, a corresponding operation of the instruction on the selected ST text language includes: displaying a search replacement window, wherein the search replacement window comprises input search items and search item attributes; according to the input search item and the selected search item attribute, performing progressive search on the ST text language in the editing window, and marking the ST text language matched with the search item and the search item attribute; under the condition that the fourth operation is carried out on the replaced instruction, the corresponding operation of the instruction on the selected ST text language according to the fourth operation of the instruction of the editing assistant window comprises the following steps: displaying a search replacement window, wherein the search replacement window further comprises an input replacement item and a replacement instruction; and according to the input search item, the selected search item attribute and the replacement instruction, carrying out progressive search on the ST text language in the editing window, and replacing the ST text language matched with the search item, the selected search item attribute and the replacement instruction with the input replacement item.
Optionally, the method further includes: receiving a debugging instruction, and operating a debugging program according to the debugging instruction, wherein the debugging instruction comprises that the debugging range is one line, multiple lines or all; identifying the ST text language variable hit by the debugging program, and displaying the current value of the hit variable; and modifying the current value of the variable according to the editing operation of the variable.
According to another aspect of the embodiments of the present invention, there is also provided an ST text language editing apparatus, including: the first display module is used for displaying the keywords of the input ST text language in an editing window; the second display module is used for displaying a prompt box according to the keyword, wherein the prompt box at least comprises one content which has a correlation with the keyword, and the content comprises the keyword or a function; and the third display module is used for receiving the first operation on the content in the prompt box and displaying the content at the subsequent position of the keyword in the editing window.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium, where the computer storage medium includes a stored program, and when the program runs, the apparatus where the computer storage medium is located is controlled to execute the online editing method of the ST text language.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to run a program, where the program executes an online editing method of an ST text language according to any one of the above.
In the embodiment of the invention, the method comprises the steps of displaying keywords of an input ST text language in an editing window; displaying a prompt box according to the keywords, wherein the prompt box at least comprises one item of content which has an association relation with the keywords, and the content comprises the keywords or functions; the method comprises the steps of receiving a first operation on the content in a prompt box, displaying the content at the subsequent position of a keyword in an editing window, displaying the content which has a correlation with the input keyword of the ST text language in the prompt box when the ST text language is written, and displaying the content of the prompt box at the subsequent position of the keyword according to the first operation, thereby achieving the purpose of automatically arranging codes of the ST text language, further achieving the technical effect of improving the logic of the ST text language, and further solving the technical problems that the ST text language in the related technology is weak in logic control, needs to be matched with a ladder diagram to realize more complex application, and is low in editing efficiency.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method for online editing of ST text language according to an embodiment of the present invention;
FIG. 2 is a diagram of an ST text editor keyword, variable hint, according to an embodiment of the present invention;
FIG. 3 is a diagram of an ST editor Assistant auto-match according to an embodiment of the present invention;
FIG. 4 is a diagram of ST text editor helper statement retrieval, according to an embodiment of the invention;
FIG. 5 is a schematic diagram of an ST text editor variable display according to an embodiment of the invention;
FIG. 6 is a diagram of an ST editor right button function menu, according to an embodiment of the invention;
FIG. 7 is a diagram of an ST text editor find replacement function according to an embodiment of the invention;
FIG. 8 is a diagram illustrating ST editor breakpoint debugging, according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of ST text editor variable monitoring according to an embodiment of the present invention;
fig. 10 is a schematic diagram of an editing apparatus for ST text language according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment of a method for on-line editing in ST text language, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
Fig. 1 is a flowchart of an online editing method of ST text language according to an embodiment of the present invention, as shown in fig. 1, the method includes the steps of:
step S102, displaying the keywords of the input ST text language in an editing window;
step S104, displaying a prompt box according to the keywords, wherein the prompt box at least comprises one item of content which has a correlation with the keywords, and the content comprises the keywords or functions;
and step S106, receiving a first operation on the content in the prompt box, and displaying the content at a subsequent position of the keyword in the editing window.
Through the steps, displaying the keywords of the input ST text language in an editing window; displaying a prompt box according to the keywords, wherein the prompt box at least comprises one item of content which has an association relation with the keywords, and the content comprises the keywords or functions; the method comprises the steps of receiving a first operation on the content in a prompt box, displaying the content at the subsequent position of a keyword in an editing window, displaying the content which has a correlation with the input keyword of the ST text language in the prompt box when the ST text language is written, and displaying the content of the prompt box at the subsequent position of the keyword according to the first operation, thereby achieving the purpose of automatically arranging codes of the ST text language, further achieving the technical effect of improving the logic of the ST text language, and further solving the technical problems that the ST text language in the related technology is weak in logic control, needs to be matched with a ladder diagram to realize more complex application, and is low in editing efficiency.
The ST text language may be an ST text language (structured ST text language) of a PLC programming language. Usually, the ST text language is edited in the form of a code, and the content having an association relationship with the keyword may be a sub-code in the code of the ST text language or an already edited code of the ST text language for realizing a fixed function.
The content having the association relationship with the keyword and the keyword of the input ST text language are preset to have a matching relationship, the matching relationship may be a one-to-one correspondence between the input ST text language and one content having the association relationship with the keyword, or a one-to-many correspondence between the input ST text language and a plurality of contents having the association relationship with the keyword, and the matching language which may be input next may be determined according to the input ST text language through the matching relationship. The above-mentioned input ST text language may be a first code of codes of a matching language.
The prompt box is displayed according to the keywords, wherein the prompt box at least comprises one content with a relation with the keywords, the content comprises the keywords or functions, the content which is possibly required to be input and has the relation with the keywords is displayed to a user, under the condition that the user has the content which is required to be input in a plurality of contents with the relations with the keywords, which are possibly required to be input, the user selects the first operation of the corresponding content in the prompt box, for example, the user selects the content which is required by the user in the prompt box through a mouse or a keyboard, and presses the user to enter after selecting the content, the program codes can be automatically arranged, and the prompt box is more convenient and more attractive.
And after the user selects the content in the prompt box, generating a selection instruction corresponding to the content, and taking the code of the selected matching language as the code of the ST text language according to the selection instruction, namely taking the selected matching language as the subsequent ST text language of the input ST text language. The matching language is the same language as the ST text language, for example, the ST text language.
Optionally, after displaying the input keywords of the ST text language in the editing window, the method includes: the row where the entered keyword is located is identified.
The line where the input keyword is located is identified, for example, the content of the line is highlighted or shaded, so that an operator can quickly find the line being edited in the editing process, and the editing speed is further increased.
Optionally, before receiving the first operation on the content in the prompt box, the method further includes: and displaying a first annotation window corresponding to the content according to the content in the prompt box where the cursor is positioned, wherein the first annotation window comprises annotation information of the content.
The prompt box can display the name of the content, automatically displays and displays a first comment window corresponding to the content when the cursor moves to the name, and displays corresponding comment information in the first comment window. The prompt box only displays the content name, the data volume of the prompt box can be reduced, the area of the prompt box can be effectively reduced, the prompt box can be displayed through the display, the prompt box can comprise a plurality of list items, the list items respectively correspond to the names or short names of a plurality of contents, a user selects target contents from the plurality of contents according to a first operation on the prompt box on the display, the display generates a corresponding selection instruction according to the operation, and the contents are used as subsequent contents of the keyword.
The plurality of contents which are displayed by the prompt box and have incidence relations with the key can be displayed according to a preset sequence, the preset sequence can be ordered according to the use frequency of the contents, and can also be ordered according to the incidence degree of the matching relations between the contents and the keywords of the input ST text language, so that a plurality of matching languages are displayed according to the preset sequence, and the searching and the selection of a user are facilitated.
The comment information of the first comment window can include the meaning, the usage, the information of starting and ending, key variables, functions and the like of the content, so that a user can conveniently determine whether the matched language meets the requirements, the user experience is further improved, and the ST text language editing efficiency is further improved.
The above-mentioned detection of the codes of the ST text language may be that the characters of the codes of the ST text language are converted into regular expressions, and the codes are automatically completed, and the character strings input into the editor are automatically retrieved and matched through the regular expressions, and the keywords or variables to be completed are determined and completed.
The matched parameter types are displayed and distinguished by different icons, so that the user can conveniently program, and the written code keywords, functions, variables, labels and the like can be displayed in fonts with different colors.
Optionally, the method further includes: and displaying a second comment window of the variable according to a second operation on the variable of the ST text language displayed in the editing window, wherein the second comment window comprises comment information of the variable.
The plurality of contents displayed in the above prompt box may have a variable, and in a case where the cursor clicks the variable of the contents, a second comment window for the variable is displayed, and comment information for the variable, which may include a definition, a current value, and the like of the variable, is displayed in the second comment information window.
Optionally, the method further includes: displaying an editing assistant window of the selected ST text language according to a third operation on the selected ST text language in the editing window, wherein the editing assistant window comprises an instruction list for performing operation on the selected ST text language; and performing corresponding operation of the instruction on the selected ST text language according to a fourth operation of editing the instruction of the assistant window, wherein the instruction comprises at least one of the following operations: copy, cut, paste, select, find, replace, undo, redo, go to define, expand all, collapse all.
And after a third operation, such as right-clicking, is carried out on the ST text language, an editing assistant window of the ST text is displayed, an instruction list is displayed, wherein the instruction list comprises a plurality of instructions, and the instructions comprise copying, cutting, pasting, full selection, searching, replacing, canceling, redoing, turning to definition, unfolding all, folding all and the like, and the edited ST text is operated.
And performing a fourth operation, such as clicking or double clicking, on the instruction of the editing assistant window, and performing an operation corresponding to the instruction on the selected ST text in response to the fourth operation. Therefore, editing is assisted, and the editing efficiency of the ST text is further improved.
Optionally, in the case of performing a fourth operation on the searched instruction, according to the fourth operation of editing the instruction of the assistant window, performing a corresponding operation on the selected ST text language includes: displaying a search replacement window, wherein the search replacement window comprises input search items and search item attributes; according to the input search item and the selected search item attribute, performing progressive search on the ST text language in the editing window, and marking the ST text language matched with the search item and the search item attribute; in the case of performing a fourth operation on the replaced instruction, the corresponding operation of performing an instruction on the selected ST text language according to the fourth operation of editing the instruction of the assistant window includes: displaying a search replacement window, wherein the search replacement window further comprises an input replacement item and a replacement instruction; and according to the input search item, the selected search item attribute and the replacement instruction, performing progressive search on the ST text language in the editing window, and replacing the ST text language matched with the search item, the selected search item attribute and the replacement instruction with the input replacement item.
Searching the inputted ST text language according to the search item, and positioning the language code corresponding to the search item; and replacing the language code corresponding to the search item with the code of the content corresponding to the selection instruction according to the selection instruction. The search item can be a keyword, the ST text language which is input can be retrieved and searched in a keyword searching mode, the language code corresponding to the keyword can be automatically positioned after being searched, the highlight display can also be carried out, so that the user can easily determine, when the language code corresponding to the search item needs to be replaced, the selection instruction of the user is received, and the user can replace the language code corresponding to the search item with the code of the matched language corresponding to the selection instruction conveniently.
The searching and replacing operations both need to search for the keyword, and the replacing may be performed by using a preset keyword after the searching. Which may be in one window, the performance is the alternate window described above, as shown in fig. 7.
Optionally, the method further includes: receiving a debugging instruction, and operating a debugging program according to the debugging instruction, wherein the debugging instruction comprises a debugging range of one line, multiple lines or all; identifying the ST text language variable hit by the debugging program, and displaying the current value of the hit variable; and modifying the current value of the variable according to the editing operation on the variable.
Debugging the codes of the ST text language which is input through a debugging instruction; receiving operation information of variables in a selection code in a debugging process; responding to the operation information, and displaying the value of the variable; and modifying the value of the variable according to the modification operation on the value of the variable so as to debug the code.
The debugging may be breakpoint debugging. Because the breakpoint debugging needs a plurality of breakpoints or values of variables corresponding to a plurality of endpoints, in the debugging process, a variable in a code is selected, the variable can be pointed to by a mouse, the value of the variable is displayed by clicking or operating the variable to call the value of the variable, the value of the variable is modified in response to the modification operation of the value of the variable, and the code is debugged.
Performing breakpoint debugging on codes of an ST text language which is input, wherein codes of lower breakpoints of the breakpoint debugging are highlighted; in the breakpoint debugging process, under the condition of hitting a breakpoint, changing the background color of a text box where an ST text language is located; and debugging the breakpoint according to the hit breakpoint, and displaying a line label of the currently running code of the hit breakpoint.
And carrying out breakpoint debugging on the ST text language, highlighting a program line of a lower breakpoint of the breakpoint debugging, supporting single-step operation in the debugging process, changing the background color of a text box after the breakpoint is hit, displaying a current operation line label, and simulating the operation of the program.
Carrying out syntax check on codes of an ST text language which is input, and determining error codes in the codes; and prompting according to the error code. The error code may be a code written with an error or a code logically contradicted with a preceding code and a following code. The error code may also be a code that runs in error. The error reminding function is provided for undefined variables or functions of users, wrong keywords and the like, grammatical and semantic wrong sentences can be quickly positioned, and the use of programmers is assisted. No checks are typically made for user-defined variables or functions. When a variable or a function is defined, the variable or the function is checked, and the definition is completed after the check is passed, so that the defined variable or function is skipped, and the efficiency of error code check is improved.
It should be noted that the present application also provides an alternative implementation, and the details of the implementation are described below.
The embodiment relates to a PLC standard programming language ST text language editor assistant, which can perform functions such as intelligent identification and associative input according to a regular expression according to characters input by a user, and can prompt or comment keywords, variables, labels, functions and the like.
The implementation mode provides the functions of automatically matching keywords, function bodies and modules for the text character strings, helps a user to pop up a matching result prompt box when programming a program, and the user can select a desired instruction through a mouse or a keyboard and press a carriage return after selecting the desired instruction, so that program codes can be automatically arranged, and the method is more convenient and more attractive.
The ST text editor has a code automatic completion function, the character strings input into the editor can be automatically searched, matched and completed with keywords or variables through regular expressions, matched parameter types are displayed and distinguished by different icons, the ST text editor is convenient for a user to program, and the written code keywords, functions, variables, labels and the like are displayed in fonts with different colors.
The ST editor has the functions of retrieving and replacing character strings, can match search terms in different subprograms in the whole project, and is highlighted, so that a client can conveniently search and replace the search terms.
In the process of debugging the break point of the ST text language, the variable can be pointed by a mouse, the change condition of the variable in the memory can be checked by an assistant of an editor, the value of the variable can be forcibly modified by double clicking the variable, and the online debugging of a program by a user is facilitated.
The ST language editing assistant supports ST text language breakpoint debugging, highlight display of a program line with a breakpoint down, single-step operation in the debugging process, change of background color of a text box after the breakpoint is hit, display of a current operation line label and simulation of program operation.
The ST text editing assistant has a grammar checking function, has an error reminding function for variables or functions undefined by a user, wrong keywords and the like, can quickly position sentences with wrong grammar and semantics, and assists a programmer in using.
Fig. 2 is a schematic diagram of keywords and variable prompts of an ST text editor according to an embodiment of the present invention, fig. 3 is a schematic diagram of an ST text editor assistant according to an embodiment of the present invention, fig. 4 is a schematic diagram of an ST text editor assistant sentence retrieval according to an embodiment of the present invention, as shown in fig. 2, fig. 3, and fig. 4, the present embodiment provides a text editor for an ST language string automatic retrieval, and an ST text prompt assistant capable of automatically indexing and matching corresponding keywords or functions according to user input, variables, and the like, and sorting all searched related items to display annotation information, and a user can select a corresponding item through a mouse or a shortcut key to assist user programming.
Fig. 5 is a schematic diagram of a variable display of an ST text editor according to an embodiment of the present invention, and fig. 6 is a schematic diagram of a right-key function menu of an ST text editor according to an embodiment of the present invention, as shown in fig. 5 and fig. 6, in a programming process, a user often has no way to accurately locate a variable for a cumbersome and bulky user variable, and the user can quickly go to a variable definition by an editing assistant, and a mouse click on the variable can display annotation information of a current variable to help the user understand a program process.
Fig. 7 is a schematic diagram of an ST text editor find and replace function according to an embodiment of the present invention, and as shown in fig. 7, this embodiment provides a find and replace function, which greatly assists the user in programming, and the user can quickly locate a variable or function call through keyword find.
The checking and modifying of the program are completed, and the functions of supporting character string case matching, full character matching, regular expression matching and the like are searched; in addition, in the process of writing the program, the replacement function is supported, so that a user can conveniently modify specified keywords, variables, functions and the like in batches, and the method is particularly important for programming.
Fig. 8 is a schematic diagram of the breakpoint debugging of the ST text editor according to the embodiment of the present invention, and fig. 9 is a schematic diagram of the monitoring of the ST text editor variables according to the embodiment of the present invention, as shown in fig. 8 and fig. 9, the present embodiment provides a function of software emulation debugging, which can assist a user in debugging a program offline, during the program running, the ST text editor supports breakpoint debugging, for a hit breakpoint line, highlights, and displays a value of a current variable, thereby facilitating the user to debug the program, supporting single step running, and debugging the program line by line, and further, during the debugging, supporting a forced modification of the value of the variable, and assisting the user to debug the program.
Fig. 10 is a schematic diagram of an editing apparatus for ST text language according to an embodiment of the present invention, and as shown in fig. 10, according to another aspect of the embodiment of the present invention, there is also provided an editing apparatus for ST text language, including: a first display module 1002, a second display module 1004, and a third display module 1006, which will be described in detail below.
A first display module 1002 for displaying the input keywords of the ST text language in an editing window; a second display module 1004, connected to the first display module 1002, for displaying a prompt box according to the keyword, wherein the prompt box at least includes a content having an association relationship with the keyword, and the content includes the keyword or a function; and a third display module 1006, connected to the second display module 1004, configured to receive the first operation on the content in the prompt box, and display the content at a position subsequent to the keyword in the editing window.
By the device, the first display module 1002 is adopted to display the keywords of the input ST text language in the editing window; the second display module 1004 displays a prompt box according to the keyword, wherein the prompt box at least comprises a content having an association relationship with the keyword, and the content comprises the keyword or a function; the third display module 1006 receives the first operation on the content in the prompt box, displays the content at the subsequent position of the keyword in the editing window, and displays the content of the prompt box at the subsequent position of the keyword according to the first operation by displaying the content related to the keyword of the ST text language in the prompt box when the ST text language is written, so as to achieve the purpose of automatically arranging the code of the ST text language, thereby achieving the technical effect of improving the logic of the ST text language, and further solving the technical problems that the ST text language in the related art is weak in logic control, needs to be used in cooperation with a ladder diagram to realize more complex application, and is low in editing efficiency.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium, which is characterized in that the computer storage medium includes a stored program, and when the program runs, the apparatus on which the computer storage medium is located is controlled to execute the online editing method of ST text language in any item.
According to another aspect of the embodiments of the present invention, there is also provided a processor, which is characterized in that the processor is configured to run a program, wherein the program is run to perform the online editing method of ST text language in any one of the above.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. An online editing method of an ST text language, comprising:
displaying the input keywords of the ST text language in an editing window;
displaying a prompt box according to the keywords, wherein the prompt box at least comprises one item of content which has an association relation with the keywords, and the content comprises the keywords or functions;
and receiving a first operation on the content in the prompt box, and displaying the content at a subsequent position of the keyword in the editing window.
2. The method of claim 1, wherein displaying the input ST text language keywords in an editing window comprises:
and identifying the row where the input keyword is positioned.
3. The method of claim 1, wherein prior to receiving the first operation on the content in the prompt box, further comprising:
and displaying a first annotation window corresponding to the content according to the content in the prompt box where the cursor is located, wherein the first annotation window comprises annotation information of the content.
4. The method of claim 1, further comprising:
and displaying a second comment window of the variable according to a second operation on the variable of the ST text language displayed in the editing window, wherein the second comment window comprises comment information of the variable.
5. The method of claim 1, further comprising:
displaying an editing assistant window of the selected ST text language according to a third operation on the selected ST text language in the editing window, wherein the editing assistant window comprises an instruction list for operation of the selected ST text language;
according to a fourth operation of the instruction of the editing assistant window, performing corresponding operation of the instruction on the selected ST text language, wherein the instruction comprises at least one of the following: copy, cut, paste, select, find, replace, undo, redo, go to define, expand all, collapse all.
6. The method of claim 5, wherein, in the case of performing the fourth operation on the found instruction, performing the corresponding operation on the selected ST text language according to the fourth operation of the instruction of the editing assistant window comprises:
displaying a search replacement window, wherein the search replacement window comprises input search items and search item attributes;
according to the input search item and the selected search item attribute, performing progressive search on the ST text language in the editing window, and marking the ST text language matched with the search item and the search item attribute;
under the condition that the fourth operation is carried out on the replaced instruction, the corresponding operation of the instruction on the selected ST text language according to the fourth operation of the instruction of the editing assistant window comprises the following steps:
displaying a search replacement window, wherein the search replacement window further comprises an input replacement item and a replacement instruction;
and according to the input search item, the selected search item attribute and the replacement instruction, carrying out progressive search on the ST text language in the editing window, and replacing the ST text language matched with the search item, the selected search item attribute and the replacement instruction with the input replacement item.
7. The method of claim 1, further comprising:
receiving a debugging instruction, and operating a debugging program according to the debugging instruction, wherein the debugging instruction comprises that the debugging range is one line, multiple lines or all;
identifying the ST text language variable hit by the debugging program, and displaying the current value of the hit variable;
and modifying the current value of the variable according to the editing operation of the variable.
8. An apparatus for editing an ST text language, comprising:
the first display module is used for displaying the keywords of the input ST text language in an editing window;
the second display module is used for displaying a prompt box according to the keyword, wherein the prompt box at least comprises one content which has a correlation with the keyword, and the content comprises the keyword or a function;
and the third display module is used for receiving the first operation on the content in the prompt box and displaying the content at the subsequent position of the keyword in the editing window.
9. A computer storage medium comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer storage medium resides to perform the method for online editing in ST text language of any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the method for online editing of ST text language according to any one of claims 1 to 7 when running.
CN202011636954.3A 2020-12-31 2020-12-31 Online editing method and device for ST text language Active CN112882408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011636954.3A CN112882408B (en) 2020-12-31 2020-12-31 Online editing method and device for ST text language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011636954.3A CN112882408B (en) 2020-12-31 2020-12-31 Online editing method and device for ST text language

Publications (2)

Publication Number Publication Date
CN112882408A true CN112882408A (en) 2021-06-01
CN112882408B CN112882408B (en) 2022-10-18

Family

ID=76046629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011636954.3A Active CN112882408B (en) 2020-12-31 2020-12-31 Online editing method and device for ST text language

Country Status (1)

Country Link
CN (1) CN112882408B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419721A (en) * 2021-08-20 2021-09-21 杭州未名信科科技有限公司 Web-based expression editing method, device, equipment and storage medium
CN116756196A (en) * 2023-08-16 2023-09-15 麒麟软件有限公司 Method and plug-in for rapidly editing Makefile
CN116880899A (en) * 2023-09-08 2023-10-13 国网信息通信产业集团有限公司 Task information association method, device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012106901A1 (en) * 2011-07-18 2012-08-16 华为技术有限公司 Web-based script language editing method, system and web client
CN102667753A (en) * 2009-12-23 2012-09-12 诺基亚公司 Method and apparatus for facilitating text editing and related computer program product and computer readable medium
US20130132814A1 (en) * 2009-02-27 2013-05-23 Adobe Systems Incorporated Electronic content editing process
US20140059518A1 (en) * 2012-08-24 2014-02-27 Velocio Networks, Inc. Method for Object Oriented Programming of Programmable Logic Controllers in Graphical Programming Languages
CN103793126A (en) * 2012-10-29 2014-05-14 深圳市金蝶中间件有限公司 Floating tooltip achieving method and system
CN107797794A (en) * 2017-10-17 2018-03-13 北京华航唯实机器人科技股份有限公司 Edit methods, device, storage medium, processor and the terminal of program code
CN109254776A (en) * 2018-09-29 2019-01-22 深圳市雷赛控制技术有限公司 Multilingual code compiling method and compiler

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130132814A1 (en) * 2009-02-27 2013-05-23 Adobe Systems Incorporated Electronic content editing process
CN102667753A (en) * 2009-12-23 2012-09-12 诺基亚公司 Method and apparatus for facilitating text editing and related computer program product and computer readable medium
WO2012106901A1 (en) * 2011-07-18 2012-08-16 华为技术有限公司 Web-based script language editing method, system and web client
US20140059518A1 (en) * 2012-08-24 2014-02-27 Velocio Networks, Inc. Method for Object Oriented Programming of Programmable Logic Controllers in Graphical Programming Languages
CN103793126A (en) * 2012-10-29 2014-05-14 深圳市金蝶中间件有限公司 Floating tooltip achieving method and system
CN107797794A (en) * 2017-10-17 2018-03-13 北京华航唯实机器人科技股份有限公司 Edit methods, device, storage medium, processor and the terminal of program code
CN109254776A (en) * 2018-09-29 2019-01-22 深圳市雷赛控制技术有限公司 Multilingual code compiling method and compiler

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419721A (en) * 2021-08-20 2021-09-21 杭州未名信科科技有限公司 Web-based expression editing method, device, equipment and storage medium
CN116756196A (en) * 2023-08-16 2023-09-15 麒麟软件有限公司 Method and plug-in for rapidly editing Makefile
CN116756196B (en) * 2023-08-16 2023-12-26 麒麟软件有限公司 Method and plug-in for rapidly editing Makefile
CN116880899A (en) * 2023-09-08 2023-10-13 国网信息通信产业集团有限公司 Task information association method, device, electronic equipment and computer readable medium
CN116880899B (en) * 2023-09-08 2024-01-12 国网信息通信产业集团有限公司 Task information association method, device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN112882408B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN112882408B (en) Online editing method and device for ST text language
Overmyer et al. Conceptual modeling through linguistic analysis using LIDA
US6654950B1 (en) Software rehosting system and method
US8214822B2 (en) Editor for program files
KR100650427B1 (en) Integrated development tool for building a natural language understanding application
US7461342B2 (en) Graphical user interface (GUI) script generation and documentation
US20060026559A1 (en) Automatic content completion of valid values for method argument variables
US10635855B1 (en) Code comment markup
CN107168705B (en) Graphic interface semantic description system and establishing method and operation path generating method thereof
US20210405977A1 (en) Method of converting source code in a universal hybrid programming environment
Tateosian Python For ArcGIS
JP5454783B2 (en) Variable name input support method in PLC programming, variable name input support device in PLC programming, and computer program
CN113419721B (en) Web-based expression editing method, device, equipment and storage medium
US20160062738A1 (en) Methods and Apparatuses for Interactive Computer Programming
CN115640438A (en) Visual custom crawler execution method and system
CN112597011B (en) Operator test case generation and optimization method based on multiple languages
JPH0778681B2 (en) Man-machine interface of plant
WO2017142546A1 (en) Natural language programming tool
CN117909234A (en) Mobile terminal automatic test method and system based on natural language recognition
CN116610558A (en) Code detection method, device, electronic equipment and computer readable storage medium
JPH06124157A (en) Word and phrase inputting device and method
CN117819197A (en) Control method and system of automatic flow, electronic equipment and storage medium
JPH1011438A (en) Word checker
Khwaja et al. A Visual Syntax‐directed Editor for the Descartes Specification Language
JP3316884B2 (en) Language translator

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