CN109669721B - Method capable of developing software for second time - Google Patents

Method capable of developing software for second time Download PDF

Info

Publication number
CN109669721B
CN109669721B CN201811574527.XA CN201811574527A CN109669721B CN 109669721 B CN109669721 B CN 109669721B CN 201811574527 A CN201811574527 A CN 201811574527A CN 109669721 B CN109669721 B CN 109669721B
Authority
CN
China
Prior art keywords
instruction
function
interface
program
designing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811574527.XA
Other languages
Chinese (zh)
Other versions
CN109669721A (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.)
Shanghai Ekong Electronic Technology Co ltd
Original Assignee
Shanghai Ekong Electronic 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 Shanghai Ekong Electronic Technology Co ltd filed Critical Shanghai Ekong Electronic Technology Co ltd
Priority to CN201811574527.XA priority Critical patent/CN109669721B/en
Publication of CN109669721A publication Critical patent/CN109669721A/en
Application granted granted Critical
Publication of CN109669721B publication Critical patent/CN109669721B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention relates to a method capable of developing software secondarily, which comprises the steps of S11, creating a data structure; step S12, designing a program development interface; step S13, establishing a program development instruction; step S14, designing the function of external dynamic loading dynamic link library, taking the function in dynamic link library as the program development instruction under the condition of not compiling the program; and step S15, designing the main program interface and the interface management function. The method has a simple and friendly user interface, has a strong secondary development function, and can meet different application scenes; the project development period is shortened, and the software management and maintenance cost is reduced.

Description

Method capable of developing software for second time
Technical Field
The invention relates to the field of automation of optical communication industry, in particular to a method capable of developing software secondarily.
Background
With the rapid development of the optical communication industry, the automatic coupling technology becomes the mainstream of industry production, and as the types of optical communication products are various, a plurality of coupling machines aiming at different products are produced; software on a machine table is different, and a large amount of difficulty and repeated labor are brought to software debugging and production maintenance.
There are two existing software development ideas for coupling machines. The first method is to decompose each action step and parameter according to project requirements to form a flow chart, then program directly according to the flow chart, and write all steps and parameters into codes. This can lead to the problem of multiple software versions on the same machine, which undoubtedly increases the workload of software maintenance; the second method is to write each basic action as a module in the code and identify it, and in practical application, a software engineer or a process engineer decides the execution sequence of the action according to the step identification. The method solves the problem of frequently changing the process, but has no effect on the requirement of adding new functions and new processes; in addition, this approach may also cause problems with at least one version of software on the same product type machine, which provides a significant challenge for software management and maintenance.
In practical production, a software platform is urgently needed, which can cover the functions of all coupled machine software versions and has a concise and friendly interface when in use. The method provided by the invention can effectively solve the problems, and all the coupling machines can be programmed and debugged by using the same software version, thereby greatly shortening the project development period and reducing the difficulty of software management and maintenance.
Disclosure of Invention
The invention aims to solve the problems of unifying different coupling machine software versions and reducing the difficulty of software development, management and maintenance, and provides a method capable of secondarily developing software, which has a secondary development function, meets different application scenes, reduces the project development period and reduces the software management and maintenance cost.
In order to achieve the purpose, the invention provides a method capable of developing software secondarily, which comprises the following steps:
creating a data structure;
designing a program development interface;
establishing a program development instruction;
designing an external dynamic loading dynamic link library function, and taking a function in the dynamic link library as a program development instruction under the condition of not needing a compiler; and
designing a main program interface and an interface management function.
Optionally, for the method for secondarily developing software, in creating the data structure, the method includes: and establishing a hash table, an instruction chain table structure and a global variable structure body, and storing the function information, the program instruction information and the global variable information respectively.
Optionally, the method for secondarily developing software includes, in a design program development interface: the program development interface describes the instructions in a table form, one row represents one instruction, and the table columns describe the content of each instruction by including "number", "break point", "table", "Name", "Para 1", "Para 2", "Para 3", "Para 4", "Para 5" and "Para 6"; the program running sequence is from top to bottom, all instructions in a table are stored in a local file after being stored, and the contents in the file are loaded into an instruction linked list during running.
Optionally, for the method capable of secondarily developing software, the functions in the program development interface include a code debugging function, a run/pause function, and an instruction insertion and deletion function.
Optionally, for the method capable of secondarily developing software, in establishing a program development instruction, the method includes: establishing a variable definition instruction, a logic operation instruction, a man-machine interaction instruction, a mathematical operation instruction, a sub-function call instruction, a motion control instruction, a communication instruction, a data display storage instruction and a multithreading instruction.
Optionally, for the method capable of developing software secondarily, in designing an external dynamic loading dynamic link library function, the method includes:
acquiring function information through analyzing a header file and storing the information into a hash table, wherein the information comprises a function name, input and output parameters and types;
the dynamic link library function is dynamically analyzed by using three functions including LoadLibrary, GetProcAddress and FreeLibrary;
and loading the function in the hash table into a program development instruction, and displaying help information when calling.
The functions in the DLL are used as instructions for program development without requiring a compiler.
Optionally, for the method capable of developing software twice, the designing a main program interface includes: the system comprises a menu bar, a graphic display area, a data display area, a system state display area and a shortcut button area, wherein the menu bar is not configurable, and the graphic display area, the data display area, the system state display area and the shortcut button area can be configured in a personalized manner.
Optionally, for the method capable of secondarily developing software, the interface management function includes: interface curve color configuration, user authority management and system configuration;
the interface curve color configuration is personalized according to the color displayed by the multi-channel coupling power curve;
the user authority management comprises functions of adding/deleting user accounts and authorities, and the user authorities are divided into administrator authorities, engineer authorities, technician authorities and operator authorities; the authority level is from top to bottom, and the high-level account can configure the low-level account, including adding, deleting, changing the password and changing the account level;
the system configuration comprises motion control hardware parameter configuration, hardware input/output (I/O) configuration, main interface shortcut control button configuration and program Logo display configuration.
The invention has the beneficial effects that: the method for secondarily developing the software has the advantages of being concise and friendly in interface, having the functions of secondary development and Dynamic loading of DLL (Dynamic Link Library), and enabling the software to be suitable for all coupled machine platforms, greatly shortening project development period and reducing software management and maintenance cost.
Drawings
Fig. 1 is a flowchart of a method for secondary software development according to the present invention.
Detailed Description
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.
The purpose of the invention is as follows: a method for developing software based on secondary development is provided, which is suitable for automation coupling machines in all optical communication industries.
The invention provides a programmable software platform method based on a LabWindows/CVI development platform for automation coupling machine software, so as to ensure that a software engineer or a process engineer can perform secondary development or debugging on equipment under the condition that the software does not need to be recompiled, thereby meeting different application scenarios. Firstly, establishing a data structure for storing data; secondly, designing a program secondary development interface to comprise instruction insertion, deletion, single Step operation (Step) and Run (Run) functions; then writing a program development basic instruction so as to facilitate secondary development and calling; then designing an external Dynamic loading DLL (Dynamic Link library) function, and taking a function in the DLL as a basic instruction for program development under the condition that a program does not need to be compiled; and finally designing a main program interface and a main program interface management function.
The design main program interface of one embodiment of the invention comprises a plurality of graphic display areas, which display coupling curves and can be arranged above the middle part, for example; as a table for the data display area, the coupling data is displayed, which may be, for example, below the graphic display area; a status frame, as a system status display area, for displaying the running status of the program execution action, for example, the running status may be below the table; the right side can be respectively a company Logo, a product serial number and a shortcut key button from top to bottom; each area can be configured individually according to the requirements of customers. For example, the number of rows and columns of the result data display may be defined within the system configuration file; the name of the shortcut key can be configured in a configuration file.
The program secondary development interface of one embodiment of the invention can comprise a program operation area positioned above a form, and can realize the insertion/deletion of the form, the instruction input, the single-step debugging and the like; the middle table is a program secondary development area for developing programs required by customers; and a variable state observation area is arranged below the variable state observation area and used for displaying the numerical value of the variable in the operation process.
In the invention, common basic functions (serial port communication, single-channel coupling and multi-channel coupling …) of a coupling platform are used as basic instructions, then logical operation and mathematical operation are realized through program development instructions, and a Dynamic Link Library (DLL) function is added, thereby realizing the function of adapting to different application scenes. As shown in fig. 1, the specific implementation steps are as follows:
step S11, creating a data structure;
step S12, designing a program development interface;
step S13, establishing a program development instruction;
step S14, designing the function of external dynamic loading dynamic link library, taking the function in dynamic link library as the program development instruction under the condition of not compiling the program; and
and step S15, designing a main program interface and an interface management function.
In one embodiment, for step S11, comprising: and establishing a hash table, an instruction chain table structure and a global variable structure body, and storing the function information, the program instruction information and the global variable information respectively.
In one embodiment, for step S12, comprising: the program development interface describes the instructions in a table form, one row represents one instruction, and the table columns describe the content of each instruction by including "number", "break point", "table", "Name", "Para 1", "Para 2", "Para 3", "Para 4", "Para 5", and "Para 6", etc.; the program running sequence is from top to bottom, all instructions in a table are stored in a local file after being stored, and the contents in the file are loaded into an instruction linked list during running.
For example, the functions in the program development interface include a code debugging function, a run/pause function, and an insert and delete instruction function.
In one embodiment, for step S13, in the creating the program development instruction, the method includes: establishing a variable definition instruction, a logic operation instruction, a man-machine interaction instruction, a mathematical operation instruction, a sub-function call instruction, a motion control instruction, a communication instruction, a data display storage instruction, a multi-thread instruction and the like.
In one embodiment, for step S14, in designing the external dynamically loaded dynamically linked library function, the method includes:
acquiring function information through analyzing a header file and storing the information into a hash table, wherein the information comprises a function name, input and output parameters and types;
for example, the function of dynamically resolving the dynamic link library is realized by three functions including LoadLibrary, GetProcAddress and FreeLibrary;
and loading the function in the hash table into a program development instruction, and displaying help information when calling.
The functions in the DLL are used as instructions for program development without requiring a compiler.
In one embodiment, for step S15, the designing the main program interface includes: the system comprises a menu bar, a graphic display area, a data display area, a system state display area and a shortcut button area, wherein the menu bar is not configurable, and the graphic display area, the data display area, the system state display area and the shortcut button area can be configured in a personalized manner. For example, the number of rows and columns of the result data display may be defined within the system configuration file; the name number of the shortcut keys can be configured in a configuration file.
In one embodiment, for step S15, the interface management functions include: interface curve color configuration, user authority management and system configuration;
the interface curve color configuration is personalized according to the color displayed by the multi-channel coupling power curve;
the user authority management comprises functions of adding/deleting user accounts and authorities, and the user authorities are divided into administrator authorities, engineer authorities, technician authorities and operator authorities; the authority level is from top to bottom, and the high-level account can configure the low-level account, including adding, deleting, changing the password and changing the account level;
the system configuration comprises motion control hardware parameter configuration, hardware input/output (I/O) configuration, main interface shortcut control button configuration and program Logo display configuration.
In summary, the method for secondarily developing software of the present invention not only has the characteristics of concise and friendly interface, but also has the functions of secondary development and Dynamic loading of DLL (Dynamic Link Library), so that the software can be applied to all coupled machine platforms, which greatly reduces the project development period and reduces the software management and maintenance cost.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (1)

1. A method for secondary development of software, comprising the steps of:
creating a data structure, wherein the creating of the data structure comprises: establishing a hash table, an instruction chain table structure and a global variable structure body, wherein the hash table, the instruction chain table structure and the global variable structure body are used for respectively storing function information, program instruction information and global variable information;
designing a program development interface, wherein the designing program development interface comprises the following steps: the program development interface describes the instructions in a table form, one row represents one instruction, and the table columns describe the content of each instruction by including "number", "break point", "table", "Name", "Para 1", "Para 2", "Para 3", "Para 4", "Para 5" and "Para 6"; the program running sequence is from top to bottom, all instructions in a table are stored in a local file after being stored, the content in the file is loaded into an instruction chain table during running, and the functions in the program development interface comprise a code debugging function, a running/suspending function and an instruction inserting and deleting function;
establishing a program development instruction, wherein the establishing of the program development instruction further comprises the following steps: establishing a variable definition instruction, a logic operation instruction, a man-machine interaction instruction, a mathematical operation instruction, a sub-function call instruction, a motion control instruction, a communication instruction, a data display storage instruction and a multithreading instruction;
designing an external dynamic loading dynamic link library function, and taking a function in the dynamic link library as a program development instruction under the condition of not needing a compiler; and
designing a main program interface and an interface management function, wherein the design main program interface comprises the following steps: the system comprises a menu bar, a graphic display area, a data display area, a system state display area and a shortcut button area, wherein the menu bar is not configurable, and the graphic display area, the data display area, the system state display area and the shortcut button area can be configured in a personalized manner; in designing the external dynamic loading dynamic link library function, the method comprises the following steps:
acquiring function information through analyzing a header file and storing the information into a hash table, wherein the information comprises a function name, input and output parameters and types;
the dynamic link library function is dynamically analyzed by using three functions including LoadLibrary, GetProcAddress and FreeLibrary;
loading the function in the hash table into a program development instruction, and displaying help information when calling;
the interface management functions include: interface curve color configuration, user authority management and system configuration;
the interface curve color configuration is personalized according to the color displayed by the multi-channel coupling power curve;
the user authority management comprises functions of adding/deleting user accounts and authorities, and the user authorities are divided into administrator authorities, engineer authorities, technician authorities and operator authorities; the authority level is from top to bottom, and the high-level account can configure the low-level account, including adding, deleting, changing the password and changing the account level;
the system configuration comprises motion control hardware parameter configuration, hardware input/output (I/O) configuration, main interface shortcut control button configuration and program Logo display configuration.
CN201811574527.XA 2018-12-21 2018-12-21 Method capable of developing software for second time Active CN109669721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811574527.XA CN109669721B (en) 2018-12-21 2018-12-21 Method capable of developing software for second time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811574527.XA CN109669721B (en) 2018-12-21 2018-12-21 Method capable of developing software for second time

Publications (2)

Publication Number Publication Date
CN109669721A CN109669721A (en) 2019-04-23
CN109669721B true CN109669721B (en) 2022-04-01

Family

ID=66145790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811574527.XA Active CN109669721B (en) 2018-12-21 2018-12-21 Method capable of developing software for second time

Country Status (1)

Country Link
CN (1) CN109669721B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6212673B1 (en) * 1997-03-31 2001-04-03 International Business Machines Corporation Component-neutral builder interface
CN102236602A (en) * 2011-07-21 2011-11-09 南京大学 Visual software test design platform
CN104461503A (en) * 2014-11-06 2015-03-25 华自科技股份有限公司 Method and system for dynamically forming software interfaces
CN105224353A (en) * 2014-06-26 2016-01-06 北京北方微电子基地设备工艺研究中心有限责任公司 The method and system of dynamic load interface navigation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6212673B1 (en) * 1997-03-31 2001-04-03 International Business Machines Corporation Component-neutral builder interface
CN102236602A (en) * 2011-07-21 2011-11-09 南京大学 Visual software test design platform
CN105224353A (en) * 2014-06-26 2016-01-06 北京北方微电子基地设备工艺研究中心有限责任公司 The method and system of dynamic load interface navigation
CN104461503A (en) * 2014-11-06 2015-03-25 华自科技股份有限公司 Method and system for dynamically forming software interfaces

Also Published As

Publication number Publication date
CN109669721A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN107273286B (en) Scene automatic test platform and method for task application
CN109840206B (en) Data testing method, device, terminal and storage medium
CN110663006B (en) Method for performing failover of programmable logic controller and controlling physical system
CN109918081B (en) Compiling method and compiler
CN104021080A (en) Automatic testing system based on custom scripts
US8701079B2 (en) Procedure and development environment for generation of an executable overall control program
US9824000B1 (en) Testing calling code dynamically with random error injection based on user-specified configuration
CN103389939A (en) Detection method and detection system for controlled heap allocation bug
CN107179982B (en) Cross-process debugging method and device
CN104809045A (en) Operation method and device of monitoring script
CN104391754A (en) Method and device for processing task exception
Hopsu et al. On portability of IEC 61499 compliant structures and systems
CN107122203B (en) Configuration file setting method and device
CN102063367B (en) Off-line analysis method and device aiming at computer crash program
CN109669721B (en) Method capable of developing software for second time
CN113919158A (en) Simulation method and device for flight control panel and storage medium
CN108700864A (en) The program randomization of network attack controller perturbation in programmable logic controller (PLC)
JP7085305B2 (en) Control system and control method
CN111597105A (en) Automatic test system and method based on LV environment
CN110018866B (en) User interface theme updating method, device and system, vehicle machine and vehicle
CN111310313A (en) IAP-based simulation method and device and wafer cleaning equipment
CN113688141B (en) Application function design method and software development platform
Ulewicz et al. Proving equivalence between control software variants for Programmable Logic Controllers
EP0801348A1 (en) Method of monitoring the operation of a computer
CN100367233C (en) Program execution control mode

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