CN113961197A - Object-based PLC programming method, device and storage medium - Google Patents
Object-based PLC programming method, device and storage medium Download PDFInfo
- Publication number
- CN113961197A CN113961197A CN202111214584.9A CN202111214584A CN113961197A CN 113961197 A CN113961197 A CN 113961197A CN 202111214584 A CN202111214584 A CN 202111214584A CN 113961197 A CN113961197 A CN 113961197A
- Authority
- CN
- China
- Prior art keywords
- packaging
- control
- library
- client
- module
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000004806 packaging method and process Methods 0.000 claims abstract description 170
- 238000012545 processing Methods 0.000 claims abstract description 30
- 238000005538 encapsulation Methods 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 10
- 238000011161 development Methods 0.000 abstract description 14
- 230000006870 function Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 15
- 230000009471 action Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 230000008676 import Effects 0.000 description 3
- 230000033001 locomotion Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000008054 signal transmission Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/51—Source to source
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/34—Graphical or visual programming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Programmable Controllers (AREA)
Abstract
The invention relates to a PLC programming method, a device and a storage medium based on an object, wherein the method comprises the following steps: s100, determining a control object needing programming according to the requirement of a project; s200, judging whether the packaging object corresponding to the control object is in a packaging library, and if the packaging object exists in the packaging library, directly executing the step S500; if the packaging object is not in the packaging library, executing step S300; s300, analyzing the relevant characteristics of the control object and carrying out data processing on the relevant characteristics; s400, packaging the control object subjected to the data processing to form a packaged object and storing the packaged object into a packaging library; s500, selecting a corresponding packaging object from a packaging library; s600, programming connection between the packaged objects is carried out according to the connection relation of the items. The PLC programming method based on the object effectively improves the code portability and shortens the development period of the project.
Description
Technical Field
The invention relates to the technical field of PLC programming, in particular to a PLC programming method, a PLC programming device and a PLC programming storage medium based on an object.
Background
Programmable Logic Controller (PLC) programming is an electronic system that operates digitally and is designed for application in an industrial environment. It uses programmable memory to store the instructions for executing logical operation, sequence control, timing, counting and arithmetic operation, etc. and controls various types of machinery or production process by digital and analog input and output.
Most of the existing PLC programming is ladder diagram programming, the mechanism difference and PLC type selection among different projects are inconsistent, when a new project is imported, point location planning and program compiling are generally required to be carried out again by a bottom layer driver of the new project, and program reuse cannot be achieved, so that the efficiency is extremely low.
Disclosure of Invention
In order to solve the technical problems, the invention provides a PLC programming method, a PLC programming device and a PLC programming storage medium based on objects, which can improve the portability of programs, improve the programming efficiency and shorten the project research and development period.
In order to achieve the above object, the present application proposes a first technical solution:
an object-based PLC programming method comprising the steps of:
s100, determining a control object needing programming according to the requirement of a project;
s200, judging whether the packaging object corresponding to the control object is in a packaging library, and if the packaging object exists in the packaging library, directly executing the step S500; if the packaging object is not in the packaging library, executing step S300;
s300, analyzing the relevant characteristics of the control object and carrying out data processing on the relevant characteristics of the control object;
s400, packaging the control object subjected to the data processing to form a packaged object and storing the packaged object into a packaging library;
s500, selecting a corresponding packaging object from a packaging library;
s600, programming connection between the packaged objects is carried out according to the connection relation of the items.
In an embodiment of the present invention, the selecting the corresponding package object from the package library specifically includes:
a user issues a selection instruction to a client, wherein the selection instruction comprises relevant information of a packaged object;
the client receives the selection instruction and positions the corresponding encapsulated object according to the related information of the encapsulated object;
the client side pushes the positioned packaging object to a pushing window;
and the user moves the packaging object in the push window to a corresponding programming interface of the client.
In one embodiment of the invention, the encapsulation object comprises:
the control point is used for transmitting signals;
a package name, information for identifying the package object.
In an embodiment of the present invention, an identifier is set on the control point location, where the identifier includes an object name and an object attribute.
In an embodiment of the present invention, in the process of selecting the corresponding packaged object from the packaging library, when the object name and the ". multidot.". multidot.n. prompt are typed, the object attribute for the user to select can be automatically popped up.
In an embodiment of the present invention, the performing programming connection between the encapsulated objects according to the connection relationship of the items specifically includes:
arranging the encapsulation objects required to be connected in sequence according to the transmission rule of the signals;
and performing signal connection through a control point position on the packaging object according to the transmission rule of the signal.
In order to achieve the above object, the present application further provides a second technical solution:
an object based PLC programming apparatus, the apparatus comprising:
the package object selection module is used for selecting a corresponding package object according to the requirement of the project;
and the packaging object connecting module is used for connecting different packaging objects with each other.
In one embodiment of the invention, the apparatus further comprises:
the packaging object judging module is used for judging whether the packaging object needing to be selected is stored in the packaging library or not;
the data processing module is used for carrying out data processing on the relevant characteristics of the control object;
and the packaging module is used for packaging the relevant characteristics of the control object after the data processing.
In one embodiment of the invention, the apparatus further comprises:
the selection instruction sending and receiving module is used for sending or receiving a selection instruction issued to the client by a user;
the information positioning module is used for positioning the packaging object selected by the user at the client;
the packaging object pushing module is used for pushing the packaging object selected by the user at the client;
and the encapsulated object display module is used for displaying the encapsulated object on the programming interface.
In order to achieve the above object, the present application proposes a third technical solution:
a computer-readable storage medium storing a program which, when executed by a processor, causes the processor to perform the steps of the method.
Compared with the prior art, the technical scheme of the invention has the following advantages:
according to the object-based PLC programming method, device and storage medium, the codes of the bottom-layer driver do not need to be rewritten or copied in batch, only the related function programs of the bottom-layer driver need to be packaged into a specific packaged object, the key control point positions of the control object are determined, and the PLC programming is realized through the control point positions based on the related characteristics of the object, so that a user does not need to care how the execution of the object is realized in the development process, only needs to care about the development of business logic, realizes the reuse of functions, effectively improves the transportability of the codes, improves the transportability of the programs, and shortens the development period of the project.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method in a first embodiment of the object based PLC programming method of the present invention;
FIG. 2 is a flowchart of a method in a second embodiment of the object based PLC programming method of the present invention;
FIG. 3 is a diagram illustrating a third embodiment of an object-based PLC programming method according to the present invention;
fig. 4 is a program structure diagram in a fourth embodiment of the object-based PLC programming method of the present invention.
The specification reference numbers indicate:
1. a main function module; 2. a delay and alarm module; 3. an advancing module; 4. and a position judgment module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying 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 first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart of an object-based PLC programming method according to a first embodiment.
When a company imports a new project, in order to enable the new project to use a program programmed by an old project and improve the portability of codes, the invention provides the object-based PLC programming method, the codes of a bottom-layer driver do not need to be rewritten or batch copied, only the related programs of the bottom-layer driver need to be packaged into a specific object, the key control point of the control object is determined, and the PLC programming is realized through the control point based on the related characteristics of the object, so that the implementation of the project can be realized only by realizing the development of business logic based on the object during programming.
The object-based PLC programming method of the embodiment comprises the following steps:
s100, determining a control object needing programming according to the requirement of a project;
in the process of project development, each time a company imports a new project, the company needs to be programmed according to the specific requirements of the new project. When programming, an object to be programmed, called a control object, needs to be determined according to specific project requirements, and the control objects cooperate with each other to realize the functions of the project.
S200, judging whether the packaging object corresponding to the control object is in a packaging library, and if the packaging object exists in the packaging library, directly executing the step S500; if the packaging object is not in the packaging library, executing step S300;
some control objects of the new project exist in the old project, and the control objects of the same type of the old project can be directly utilized; some control objects do not exist in the old project, so it is first determined whether the encapsulation object corresponding to the control object exists in the encapsulation library, and if the encapsulation object exists in the encapsulation library, the step S500 is directly performed to select the encapsulation object; if the package object is not in the package library, step S300 is executed to create the package object.
S300, analyzing the relevant characteristics of the control object and carrying out data processing on the relevant characteristics of the control object;
if the package object does not exist in the package library, it is necessary to analyze the relevant characteristics of the control object, and analyze the relevant characteristics of the control object based on the control object, including the characteristics of the operation of the control object and the flow of the operation. Then, the relevant characteristics of the controlled object are subjected to data processing in a mode of a class or a structure body, namely, some actions, flows and the like of the controlled object are realized by codes.
S400, packaging the control object subjected to the data processing to form a packaged object and storing the packaged object into a packaging library;
after the relevant characteristics of the control object are subjected to the data processing in a class or structure mode, the control object subjected to the data processing is packaged to form a packaged object, the creation of the packaged object is completed, and then the packaged object is stored in a packaging library.
S500, selecting a corresponding packaging object from a packaging library;
the control object is packaged into a packaging object on the client, the packaging object is stored in a corresponding packaging library, and the packaging object is selected from the packaging library according to the specific requirements of the project when programming. The packaging library can be classified, for example, the control object is classified into one type of motor, and the control object is classified into one type of cylinder, so that the classification selection of a user is facilitated.
S600, performing programming connection between the encapsulated objects according to the connection relation of the items;
before programming the program, the user determines the connection relation between the corresponding packaged objects, the user performs programming connection between the control objects according to the connection relation, and after the connection is completed, the whole program can realize the functions required by the project.
After a plurality of projects are developed, more and more packaging objects are in the packaging library, after long-time accumulation, new packaging objects are rarely added in the development of new projects, and the new projects can be directly selected from the packaging library as required, so that the development efficiency of the new projects is greatly improved.
In one embodiment, selecting a corresponding package object from the package library specifically includes:
a user issues a selection instruction to a client, wherein the selection instruction comprises the relevant information of the packaged object;
when a user uses a client to program, the user needs to select a corresponding packaging object from a packaging library, and before selecting the packaging object, the packaging object needing to be selected is determined, so that the user needs to issue a selection instruction to the client, and the selection instruction contains information of the packaging object needing to be selected, so that the client can position the packaging object needing to be selected according to the related information of the packaging object. Issuing the selection instruction comprises clicking with a mouse or directly performing related query with input equipment such as a keyboard and the like.
The client receives the selection instruction and positions the corresponding encapsulated object according to the related information of the encapsulated object;
after the user issues the selection instruction at the client, the client receives the selection instruction issued by the user to the client, and the client identifies the relevant information about the packaging object in the selection instruction, so that the client can locate the packaging object to be selected, and the packaging object can be conveniently pushed to the pushing window.
The client side pushes the positioned packaging object to a pushing window;
after the client locates the selected packaging object according to the relevant information of the selection instruction, the client pushes the located packaging object to a push window, and the packaging object required by the project is displayed in the push window, so that a user can move the packaging object to a programming interface conveniently.
The user moves the packaging object in the push window to a corresponding programming interface of the client;
after the corresponding packaged objects are positioned, the packaged objects in the pushing window need to be moved to a window of a programming interface, and all the needed packaged objects in the pushing window are moved to the window of the programming interface according to the requirements of the project; or moving the packaged objects to a window of a programming interface in batches according to the functions of the project so as to facilitate later programming connection. In addition to custom packaging objects, other objects commonly used by PLCs can be moved to the programming interface, such as normally closed contacts or normally open contacts.
In one embodiment, the packaging object comprises:
the control point is used for transmitting signals;
the control object is subjected to data processing according to the relevant characteristics of the control object and then packaged into a packaging object, the packaging object transmits a control signal through a control point location, the control signal carries out relevant program operation after passing through the packaging object, and then the corresponding function is realized.
A package name, information for identifying the package object.
The package name corresponds to an identification code of the package object, and the package object can be located through the identification code. The corresponding encapsulated object can be searched out by inputting the encapsulated name in the search box.
In one embodiment, the control point is provided with an identifier, and the identifier includes an object name and an object attribute. For example, the package object st _ Test1cyd. tdelay, "-" is preceded by an object name, and st _ Test1Cyd indicates that the control object is a cylinder; "." followed by an object attribute, tDelay indicates that the attribute is time delayed, so the encapsulated object st _ test1cyd.
In one embodiment, in the process of selecting a corresponding packaged object from a packaging library, when an object name and a ". multidot." prompt are typed in a corresponding search box of a client, object attributes for selection by a user can be automatically popped up, for example, st _ test1cyd.
In one embodiment, the performing programming connection between the encapsulated objects according to the connection relationship of the items specifically includes:
arranging the encapsulation objects required to be connected in sequence according to the transmission rule of the signals;
when the package objects to be connected are moved to the programming interface, the package objects are arranged in sequence according to the transmission rule of the signals, and the sequence and the direction of the arrangement are according to the flow direction of the control signals, so that the user can conveniently program the layout of the package objects.
Performing signal connection through a control point position on the packaging object according to the transmission rule of the signal;
after the encapsulation objects to be connected are arranged according to the signal transmission rule according to the signal flow direction, the encapsulation objects need to be connected by signals, the connection of the signals is realized through the control point positions, and the transmission of the signals is realized among different encapsulation objects through the control point positions.
Example two:
referring to fig. 2, fig. 2 is a flowchart of an object-based PLC programming method according to a second embodiment.
The object-based PLC programming method of the embodiment comprises the following steps:
s10, the user sends a selection instruction to the client, wherein the selection instruction comprises the relevant information of the encapsulated object;
when a user uses a client to program, the user needs to select a corresponding packaging object from a packaging library, and before selecting the packaging object, the packaging object needing to be selected is determined, so that the user needs to issue a selection instruction to the client, and the selection instruction contains information of the packaging object needing to be selected, so that the client can position the packaging object needing to be selected according to the related information of the packaging object. Issuing the selection instruction comprises clicking with a mouse or directly performing related query with input equipment such as a keyboard and the like.
S20, the client receives the selection instruction, and locates the corresponding packaged object according to the related information of the packaged object;
after the user issues the selection instruction at the client, the client receives the selection instruction issued by the user to the client, and the client identifies the relevant information about the packaging object in the selection instruction, so that the client can locate the packaging object to be selected, and the packaging object can be conveniently pushed to the pushing window.
S30, the client side pushes the positioned packaging object to a pushing window;
after the client locates the selected packaging object according to the relevant information of the selection instruction, the client pushes the located packaging object to a push window, and the packaging object required by the project is displayed in the push window, so that a user can move the packaging object to a programming interface conveniently. The push window can display a plurality of packaged objects, and the packaged objects obtained by performing related query each time can be displayed in the push window.
S40, the user moves the packaging object in the push window to the corresponding programming interface of the client;
after the corresponding packaged objects are positioned, the packaged objects in the pushing window need to be moved to a window of a programming interface, and all the needed packaged objects in the pushing window are moved to the window of the programming interface according to the requirements of the project; or moving the packaged objects to a window of a programming interface in batches according to the functions of the project so as to facilitate later programming connection. In addition to custom packaging objects, other objects commonly used by PLCs can be moved to the programming interface, such as normally closed contacts or normally open contacts.
S50, arranging the encapsulation objects needed to be connected according to the transmission rule of the signal;
when the package objects to be connected are moved to the programming interface, the package objects are arranged in sequence according to the transmission rule of the signals, and the sequence and the direction of the arrangement are according to the flow direction of the control signals, so that the user can conveniently program the layout of the package objects.
S60, performing signal connection through a control point on the encapsulation object according to the transmission rule of the signal;
after the encapsulation objects to be connected are arranged according to the signal transmission rule according to the signal flow direction, the encapsulation objects need to be connected by signals, the connection of the signals is realized through the control point positions, and the transmission of the signals is realized among different encapsulation objects through the control point positions.
Example three:
referring to fig. 3, fig. 3 is a block diagram of an object-based PLC programming apparatus according to a fourth embodiment.
The object-based PLC programming apparatus of the present embodiment includes:
the package object selection module is used for selecting a corresponding package object according to the requirement of the project;
in the process of project development, each time a company imports a new project, the company needs to be programmed according to the specific requirements of the new project. When programming, an object to be programmed, called a control object, needs to be determined according to specific project requirements, and the control objects cooperate with each other to realize the functions of the project. The control object is packaged into a packaging object on the client, the packaging object is stored in a corresponding packaging library, and the packaging object is selected from the packaging library through a packaging object connecting module according to the specific requirements of the project when programming is carried out.
And the packaging object connecting module is used for connecting different packaging objects with each other.
Before programming the program, the user of the connection relation between the corresponding encapsulated objects is determined, the user performs programming connection between the control objects according to the connection relation, the control objects need to be subjected to programming connection through the encapsulated object connection module, and after the programming connection is completed, the whole program can realize the functions required by the project.
In one embodiment, the apparatus further comprises:
the packaging object judging module is used for judging whether the packaging object needing to be selected is stored in the packaging library or not;
some control objects of the new project exist in the old project, and the control objects of the same type of the old project can be directly utilized; since some control objects do not exist in the old project, the packaged object determination module determines whether the packaged objects required for the project exist in the package library. If the packaging object does not exist in the packaging library, the related characteristics of the control object need to be analyzed, the related characteristics of the control object are subjected to data processing in a mode of class or structure, the control object subjected to data processing is packaged to form the packaging object, and then the packaging object is stored in the packaging library.
The data processing module is used for carrying out data processing on the relevant characteristics of the control object;
when the packaging object judging module judges that the packaging object does not exist in the packaging library, the related characteristics of the control object need to be analyzed, the related characteristics of the control object are subjected to data processing through the data processing module in a class or structure mode, and then the packaging object is stored in the packaging library.
And the packaging module is used for packaging the relevant characteristics of the control object after the data processing.
After the relevant characteristics of the control object are analyzed and the relevant characteristics of the control object are subjected to data processing in a class or structure mode, the packaging module stores the packaging object into a packaging library so as to facilitate the selection of a subsequent new project program and greatly improve the development efficiency of the new project.
In one embodiment, the apparatus further comprises:
the selection instruction sending and receiving module is used for sending or receiving a selection instruction issued to the client by a user;
when a user uses a client to program, the user needs to select a corresponding packaging object from a packaging library, and before selecting the packaging object, the packaging object needing to be selected is determined, so that the user needs to send a selection instruction to the client through a selection instruction sending and receiving module, wherein the selection instruction comprises information of the packaging object needing to be selected, and the client can position the packaging object needing to be selected according to the related information of the packaging object. After the user sends the selection instruction to the client through the selection instruction sending and receiving module, the client receives the selection instruction sent to the client by the user through the selection instruction sending and receiving module, the client identifies the relevant information of the relevant packaging object in the selection instruction, and the client can position the packaging object to be selected.
The information positioning module is used for positioning the packaging object selected by the user at the client;
after the user issues the selection instruction at the client, the client receives the selection instruction issued by the user to the client, and the client identifies the relevant information about the packaging object in the selection instruction, so that the client can be positioned to the packaging object to be selected through the information positioning module.
The packaging object pushing module is used for pushing the packaging object selected by the user at the client;
after the packaging object needing to be selected is positioned by the information positioning module, the packaging object pushing module pushes the selected packaging object to a corresponding pushing window so that a user can move the packaging object of the pushing window to a programming interface for programming connection.
And the encapsulated object display module is used for displaying the encapsulated object on the programming interface.
In the programming process of the programming interface, the packaging object display module displays the packaging objects in the programming interface window and the connection relation between the packaging objects in real time so that a user can adjust the layout between the packaging objects on the programming interface.
Example four:
referring to fig. 4, fig. 4 is a diagram showing a PLC program structure based on a cylinder target according to a fifth embodiment.
Fig. 4 illustrates the object-based PLC programming method using a simple cylinder operation program, which mainly includes four modules:
the main function module 1 is used for sending an action command of a cylinder, such as an advancing and retreating action command of a piston rod of the cylinder;
the time delay and alarm module 2 is used for setting the time delay function and the alarm function of the cylinder, and a piston rod of the cylinder is required to extend out and keep a certain time in the actual movement process, so that the time delay module is required; the motion of a piston rod of the air cylinder may be in failure at some time, and if the piston rod cannot normally move, the alarm module starts an alarm function after a certain time;
the advancing module 3 is used for controlling the advancing action of the piston rod of the cylinder;
and the position judgment module 4 is used for judging the position of the piston rod of the air cylinder and judging whether the piston rod of the air cylinder reaches the specified position after advancing.
In the modules, the existing programming technology needs to write each module through a ladder diagram logic control technology, when a project is imported, an internal ladder diagram logic control program needs to be correspondingly copied and reused, if the control logic at the early stage of writing has errors, the later maintenance efficiency is reduced after the copied and pasted codes are reused, and the time for a programmer to develop business logic is occupied, so that in the development process, the programmer stores the characteristics, the state, the flow control, the alarm and the like of a control object in a PLC element mode, needs to repeatedly check and confirm the corresponding program, and the development efficiency is low.
In the object-based PLC programming method applying the method, the realization of bottom-layer codes is not required to be considered, and only the object-based programming is required. According to the cylinder control program diagram shown in fig. 4, the following analysis aspects are mainly considered when packaging is performed:
analyzing the relevant characteristics of the cylinder, including the characteristics of the advancing and retreating actions of a cylinder piston rod, the delay time of the cylinder piston rod, the alarming action of the cylinder and the like;
the main flow of analyzing the cylinder, including the sequence between the various actions of the cylinder, for example: the piston rod of the air cylinder firstly advances to a designated position and then is kept at the position for a certain time, and after the holding time is over, the piston rod of the air cylinder retreats to the original position.
Therefore, during programming, only the whole action of the cylinder is considered, the writing of the bottom layer code is not required, the bottom layer code is packaged in a class or structure mode, and only the corresponding control point position is required to be controlled, for example, the wMode represents the control mode of the cylinder, the single control cylinder mode and the double control cylinder mode are divided, and a user can set the wMode command according to specific requirements, so that the control mode can be selected conveniently. In addition, the control object is st _ TestCyd, and the control function is a timeout alarm function; the control object is st _ TestCyd, and the control function is a time delay function; wAction indicates that the control object is st _ TestCyd, the control function is an action flow of the control cylinder, and a series of actions of the cylinder, such as forward or backward movement of the piston rod and other combined flows, are completed, so that a user only needs to consider the function of each control object when using the method for programming, namely the development of service logic, the repeated utilization of the functions is realized, the portability of codes is effectively improved, the portability of programs is improved, and the development cycle of projects is shortened.
Example five:
the present embodiment provides a computer-readable storage medium storing a program, which, when executed by a processor, causes the processor to perform the steps of the object-based PLC programming method of the first and second embodiments.
As will be appreciated by one of skill in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. An object-based PLC programming method, characterized in that: the method comprises the following steps:
s100, determining a control object needing programming according to the requirement of a project;
s200, judging whether the packaging object corresponding to the control object is in a packaging library, and if the packaging object exists in the packaging library, directly executing the step S500; if the packaging object is not in the packaging library, executing step S300;
s300, analyzing the relevant characteristics of the control object and carrying out data processing on the relevant characteristics of the control object;
s400, packaging the control object subjected to the data processing to form a packaged object and storing the packaged object into a packaging library;
s500, selecting a corresponding packaging object from a packaging library;
s600, programming connection between the packaged objects is carried out according to the connection relation of the items.
2. The object-based PLC programming method of claim 1, wherein: the selecting of the corresponding packaging object from the packaging library specifically includes:
a user issues a selection instruction to a client, wherein the selection instruction comprises relevant information of a packaged object;
the client receives the selection instruction and positions the corresponding encapsulated object according to the related information of the encapsulated object;
the client side pushes the positioned packaging object to a pushing window;
and the user moves the packaging object in the push window to a corresponding programming interface of the client.
3. The object-based PLC programming method of claim 1, wherein: the encapsulated object includes:
the control point is used for transmitting signals;
a package name, information for identifying the package object.
4. The object-based PLC programming method of claim 3, wherein: and the control point is provided with an identifier, and the identifier comprises an object name and an object attribute.
5. The object-based PLC programming method of claim 4, wherein: in the process of selecting the corresponding packaged object from the packaging library, the object attribute for the user to select can be automatically popped up when the object name and the prompt are typed.
6. The object-based PLC programming method of claim 1, wherein: the performing of the programming connection between the encapsulated objects according to the connection relationship of the items specifically includes:
arranging the encapsulation objects required to be connected in sequence according to the transmission rule of the signals;
and performing signal connection through a control point position on the packaging object according to the transmission rule of the signal.
7. An object-based PLC programming device, comprising: the device comprises:
the package object selection module is used for selecting a corresponding package object according to the requirement of the project;
and the packaging object connecting module is used for connecting different packaging objects with each other.
8. The object-based PLC programming device of claim 7, wherein: the device further comprises:
the packaging object judging module is used for judging whether the packaging object needing to be selected is stored in the packaging library or not;
the data processing module is used for carrying out data processing on the relevant characteristics of the control object;
and the packaging module is used for packaging the relevant characteristics of the control object after the data processing.
9. The object-based PLC programming device of claim 7, wherein: the device further comprises:
the selection instruction sending and receiving module is used for sending or receiving a selection instruction issued to the client by a user;
the information positioning module is used for positioning the packaging object selected by the user at the client;
the packaging object pushing module is used for pushing the packaging object selected by the user at the client;
and the encapsulated object display module is used for displaying the encapsulated object on the programming interface.
10. A computer-readable storage medium characterized by: the computer readable storage medium stores a program which, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111214584.9A CN113961197A (en) | 2021-10-19 | 2021-10-19 | Object-based PLC programming method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111214584.9A CN113961197A (en) | 2021-10-19 | 2021-10-19 | Object-based PLC programming method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113961197A true CN113961197A (en) | 2022-01-21 |
Family
ID=79465224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111214584.9A Pending CN113961197A (en) | 2021-10-19 | 2021-10-19 | Object-based PLC programming method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113961197A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7370315B1 (en) * | 2000-11-21 | 2008-05-06 | Microsoft Corporation | Visual programming environment providing synchronization between source code and graphical component objects |
CN108681444A (en) * | 2018-04-12 | 2018-10-19 | 华中科技大学 | A kind of Soft- PLC configuration development approach based on XML technology |
CN110362299A (en) * | 2019-06-14 | 2019-10-22 | 杭州古德微机器人有限公司 | A kind of inline graphics programing system and its application method based on blockly and raspberry pie |
CN111522540A (en) * | 2020-05-04 | 2020-08-11 | 诸暨市天洁电子科技有限公司 | PLC modular programming method and device, computer equipment and storage medium |
CN112882408A (en) * | 2020-12-31 | 2021-06-01 | 深圳市雷赛控制技术有限公司 | Online editing method and device for ST text language |
-
2021
- 2021-10-19 CN CN202111214584.9A patent/CN113961197A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7370315B1 (en) * | 2000-11-21 | 2008-05-06 | Microsoft Corporation | Visual programming environment providing synchronization between source code and graphical component objects |
CN108681444A (en) * | 2018-04-12 | 2018-10-19 | 华中科技大学 | A kind of Soft- PLC configuration development approach based on XML technology |
CN110362299A (en) * | 2019-06-14 | 2019-10-22 | 杭州古德微机器人有限公司 | A kind of inline graphics programing system and its application method based on blockly and raspberry pie |
CN111522540A (en) * | 2020-05-04 | 2020-08-11 | 诸暨市天洁电子科技有限公司 | PLC modular programming method and device, computer equipment and storage medium |
CN112882408A (en) * | 2020-12-31 | 2021-06-01 | 深圳市雷赛控制技术有限公司 | Online editing method and device for ST text language |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5325533A (en) | Engineering system for modeling computer programs | |
CA2144874C (en) | Incremental build system | |
US7865350B1 (en) | Partitioning a model in modeling environments | |
US9594856B2 (en) | System and method to embed behavior in a CAD-based physical simulation | |
CN109783084A (en) | A kind of computer code automatic generation method, system, device and storage medium | |
US20140088949A1 (en) | Simulation apparatus, simulation method, and simulation program | |
WO2015019074A1 (en) | Automated application test system | |
WO1995000904A1 (en) | Incremental linker system | |
CN112286829B (en) | Test script generation method and device | |
CN102880482A (en) | System and technical method of automatically updating software in host batch control virtual machine | |
CN113868120A (en) | Industrial software debugging method and device, computer equipment and storage medium | |
CN113010359B (en) | Bus test system generation method, system, device and storage medium | |
CN112882718A (en) | Compiling processing method, device, equipment and storage medium | |
CN114185874A (en) | Big data based modeling method and device, development framework and equipment | |
EP3923133A1 (en) | Systems and methods for generating service access points for rte services in code or other rte service information for use with the code | |
Sobrino et al. | Developing simulation approaches: a simple case of emulation for logic validation using tecnomatix plant simulation | |
CN113961197A (en) | Object-based PLC programming method, device and storage medium | |
CN116893842A (en) | Method and system for eradicating program errors from engineering programs in a technical installation facility | |
CN111930387B (en) | Integration method and device of integration package, electronic equipment and storage medium | |
US10810173B2 (en) | System and method for design data analyzing | |
CN114879943A (en) | Algorithm scheme generation method and device and computer readable storage medium | |
CN110968342B (en) | Version comparison method, device and system | |
CN116679974A (en) | Multi-software package operation method, computer program product and terminal equipment | |
JP3598732B2 (en) | Configuration management method for distributed control system and data used for the method | |
Pinto et al. | Generating Simulation Models From CAD-Based Facility Layouts |
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 |