CN116300678A - Method for generating electrical design diagram and method for generating PLC program - Google Patents

Method for generating electrical design diagram and method for generating PLC program Download PDF

Info

Publication number
CN116300678A
CN116300678A CN202310313059.5A CN202310313059A CN116300678A CN 116300678 A CN116300678 A CN 116300678A CN 202310313059 A CN202310313059 A CN 202310313059A CN 116300678 A CN116300678 A CN 116300678A
Authority
CN
China
Prior art keywords
electrical
program
interface
diagram
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310313059.5A
Other languages
Chinese (zh)
Inventor
张硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202310313059.5A priority Critical patent/CN116300678A/en
Publication of CN116300678A publication Critical patent/CN116300678A/en
Pending legal-status Critical Current

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/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • 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/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1103Special, intelligent I-O processor, also plc can only access via processor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention discloses a method for generating an electrical design drawing and a method for generating a PLC program. The method for generating the electrical design diagram comprises the following steps: the method comprises the steps of establishing an element library based on the attribute of the electric element, wherein the attribute of the electric element comprises the name, the number, the symbol, the interface group information and the terminal information of each terminal included in the interface group of the electric element. And determining a primary structure chart of the electrical system according to the design requirement information and the component library. And adding the connection relation among the interface groups into the primary structure chart to completely determine the structure chart of the electrical system. And determining an electrical design diagram of the electrical system according to a structural diagram of the electrical system, wherein the electrical design diagram comprises a schematic diagram and a related report, so that the generation of the electrical design diagram is realized, the butt joint of the structural diagram and the design demand information is facilitated by establishing an element library, and only a target electrical element is selected and a connection relation is added in the construction of the structural diagram, so that the operation workload of a designer is reduced, and the generation efficiency of the electrical design diagram is improved.

Description

Method for generating electrical design diagram and method for generating PLC program
Technical Field
The embodiment of the invention relates to an electrical design technology, in particular to a generation method of an electrical design drawing and a generation method of a PLC program.
Background
In the electrical design, the whole set of electrical design drawing needs to be determined according to the needs of customers, and sometimes, the programming of a PLC program needs to be further performed.
The existing electrical design is mostly realized by adopting design software such as CAD (computer aided design) or EPLAN (Ethernet passive optical network) and the like, so that the design efficiency is improved.
However, no matter what design software is adopted, a designer is required to design a schematic diagram of the whole electrical system first when the electrical design diagram is generated, attribute information used for generating other diagrams is marked in the schematic diagram, the whole set of electrical design diagram can be generated, the design process is complex, and the labor cost required to be input for design is still quite large.
Disclosure of Invention
The invention provides a method for generating an electrical design drawing and a method for generating a PLC program so as to improve design efficiency.
In a first aspect, an embodiment of the present invention provides a method for generating an electrical design drawing, where the method includes:
establishing an element library based on the attribute of the electric element, wherein the attribute of the electric element comprises the name, the number, the symbol, the interface group information of the electric element and the terminal information of each terminal included in the interface group;
Determining a primary structure chart of the electrical system according to the design requirement information and the element library;
adding the connection relation among the interface groups into the preliminary structure chart to completely determine the structure chart of the electrical system;
and determining an electrical design diagram of the electrical system according to the structural diagram of the electrical system, wherein the electrical design diagram comprises a schematic diagram and a related report.
Further illustratively, the interface group information includes an interface group number, an interface group signal type, and a connection requirement of the interface group; the terminal information includes a terminal number, a terminal signal type, and a connection requirement of the terminal.
Further illustratively, the design requirement information includes mechanical design drawings, electrical design standards and practices, and other information for the electrical system;
determining a preliminary structural diagram of the electrical system according to the design requirement information and the component library, wherein the preliminary structural diagram comprises the following steps:
determining target electrical elements forming the electrical system from the element library according to the design requirement information, and adding the target electrical elements into the primary structure chart;
and determining a to-be-selected connection interface group of the interface group in the preliminary structure chart according to the interface group information of the target electric element.
Further illustratively, the connection relationship between the interface groups is added to the preliminary structural diagram, and the structural diagram of the electrical system is completely determined, which specifically includes:
selecting a target connection interface group of the interface group from the connection interface groups to be selected;
and connecting each interface group in the preliminary structure chart with the corresponding target connection interface group according to the terminal information to generate the structure chart.
Further illustratively, the preliminary structure graph comprises a preliminary total graph and a preliminary total graph, which correspond to each other; the structure chart comprises a structure general chart and a structure grid table, which are mutually corresponding; the preliminary total table is generated according to the preliminary total graph, and the preliminary total table and the content of the preliminary total graph are synchronously changed; the structural grid table is generated according to the structural overall diagram, and the structural grid table and the content of the structural overall diagram synchronously change.
Further illustratively, the preliminary structure graph comprises a preliminary total graph and a preliminary total graph, which correspond to each other; the structure chart comprises a structure general chart and a structure grid table, which are mutually corresponding; the preliminary total graph is generated according to the preliminary total table, and the preliminary total graph and the content of the preliminary total table are synchronously changed; the structure general diagram is generated according to the structure grid table, and the structure general diagram and the content of the structure grid table synchronously change. Further illustratively, the determining an electrical design of the electrical system from the structural diagram of the electrical system includes:
And generating a schematic diagram of the electrical system and a related report according to the attribute of each target electrical element in the structure general diagram and the connection relation between the interface groups, wherein the schematic diagram of the electrical system comprises symbols of the target electrical elements, the connection relation between the interface groups and the connection relation between the terminals.
In a second aspect, an embodiment of the present invention further provides a method for generating a PLC program, where the method for generating a PLC program includes:
according to the design requirement of the whole electric control system, a unit program library is established, wherein the unit program library comprises, but is not limited to, a PLC program block corresponding to the electric element, and the PLC program block comprises a program main body and a program variable interface;
determining a target PLC program block from the unit program library according to the design requirements of the electrical design diagram and other electrical control systems;
determining a program interface variable table of the electrical system according to the electrical design diagram and the design requirements of other electrical control systems and the target PLC program block, wherein the program interface variable table comprises all program interfaces and corresponding connection variables and/or internal variables in the target PLC program block;
Generating a PLC program of the electrical system according to the program interface variable table;
before determining the target PLC program block from the unit program library, the method further comprises the following steps: the electrical design drawing generation method according to any of the first aspects, wherein the electrical design drawing is generated.
Further, the related report in the electrical design drawing comprises an IO table, wherein the IO table comprises connection variables connected with the PLC device on the target electrical element;
determining a program interface variable table of the electrical system according to the electrical design diagram and the design requirements of other electrical control systems and the target PLC program block, wherein the program interface variable table comprises the following components:
establishing a mapping relation between the connection variable of the target electrical element and the program variable interface in the target PLC program block according to the functional requirements of the IO table and the target PLC program block;
establishing a mapping relation between the internal variable and the program variable interface in the target PLC program block according to the functional requirement of the target PLC program block, wherein the internal variable comprises a preset variable and other program-defined variables;
and forming a program interface variable table of the electrical system according to the mapping relation.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of generating a PLC program as described in any of the second aspects.
In the method for generating the electrical design drawing and the method for generating the PLC program provided by the embodiment of the invention, the component library is established based on the attribute of the electrical component. And determining a primary structure chart of the electrical system according to the design requirement information and the element library. And adding the connection relation among the interface groups into the preliminary structure chart to completely determine the structure chart of the electrical system. And determining an electrical design diagram of the electrical system according to the structure diagram of the electrical system, so that the generation of the electrical design diagram is realized, the component library is established to facilitate the butt joint of the structure diagram and the design demand information, and the structure of the structure diagram only needs to select a target electrical component and add a connection relation, thereby reducing the operation workload of a designer and improving the generation efficiency of the electrical design diagram.
Drawings
FIG. 1 is a schematic flow diagram of an electrical design of the prior art;
FIG. 2 is a schematic flow chart of a method for generating an electrical design diagram according to an embodiment of the present invention;
fig. 3 is a general structural diagram of a motor control system according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a motor control system according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for generating an electrical design diagram according to an embodiment of the present invention;
fig. 6 is a general structural diagram of a multifunctional motor control system according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a first portion of a multi-function motor control system according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a second portion of a multi-function motor control system according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a third portion of a multi-function motor control system according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of an indicator light control block of the prior art;
FIG. 11 is a schematic diagram of a generating process of a PLC control program for an indicator lamp in the prior art;
fig. 12 is a flowchart of a method for generating a PLC program according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
As described in the background art, referring to the flow chart of the existing electrical design shown in fig. 1, the development work of the electrical system in the electrical control project generally includes three flows, firstly, the design of the mechanical drawing, and secondly, the design of the electrical drawing is performed according to the mechanical drawing, so as to realize the development of the PLC program. In the flow of electrical drawing design, a complete set of electrical design drawing comprises an electrical schematic diagram, and also comprises a plurality of auxiliary drawings and reports (hereinafter referred to as related reports) such as an electrical layout diagram, an IO table, a terminal table, a cable table, a BOM table and the like. There is a lot of information related to each other between the electrical schematic and the related reports. There is information related to each other between each element in the electrical schematic, between the main body of a single element and the auxiliary device, and between the element and the attribute information such as the drawing page number. Because of the association of the information, when designing in one place, corresponding association design is needed to be carried out in other corresponding positions (referring to other page numbers of the electrical schematic diagram or other corresponding attached drawings); after modification at one place, association modification is also required elsewhere. This makes drawing a set of electrical design drawings very cumbersome.
There are two existing electrical designs, one using CAD software and the other using EPLAN-like software (hereinafter collectively referred to as EPLAN-like software). On the one hand, for electrical designs using CAD software: CAD software only provides for the drawing of basic geometry, and all charts need to be created by the designer by way of a base geometry puzzle. Under the condition, because the association relationship exists between each element in the schematic diagram, the association relationship also exists between the electrical schematic diagram and the related report, and a designer often needs to repeatedly design and revise each page of the electrical schematic diagram and each related report so as to enable each drawing to reach the state of consistent information, the process is extremely tedious and is very easy to make mistakes. On the other hand, for electrical designs using EPLAN-like software: the use of EPLAN-like software for electrical design is simpler than the use of CAD. The EPLAN-like software requires a user to design an electrical schematic diagram first, and then the software automatically generates a required related report according to the electrical schematic diagram and a corresponding template. However, the EPLAN-like software still requires the user to design the whole electrical schematic and mark the attribute information used for generating the related report in the electrical schematic, so the design process is still complex.
In order to solve the problems mentioned in the background art, the embodiment of the invention provides a method for generating an electrical design drawing. Fig. 2 is a flow chart of a method for generating an electrical design chart according to an embodiment of the present invention, and referring to fig. 2, the method for generating an electrical design chart includes:
s101, establishing an element library based on the attribute of the electrical element.
Specifically, the attributes of the electrical component include the name, number, symbol, schematic diagram, interface group information, and terminal information of each terminal included in the interface group of the electrical component. The component library is a database of electrical components, and stores attribute data of various electrical components constituting an electrical system. The component library may be provided on a software platform of the electrical design software, and illustratively, the component library may be provided on an EPLAN-like software platform. The number of the electronic element is a number corresponding to the electric element one by one, and the required electric element can be rapidly determined according to the number. The symbol refers to a graphic simplified symbol representing an electrical component, showing the individual interface groups of the electrical component. The schematic diagram of the electrical component refers to a specific schematic diagram of the electrical component, and shows both the interface groups of the electrical component and terminals specifically included in each interface group. The interface group information refers to attribute information of each interface group of the electrical component, and the interface group refers to a combination of a plurality of terminals with the same or similar functions, and illustratively, the interface group information may include an interface group setting condition in the electrical component, an interface group number, an interface group signal type, a connection requirement of the interface group, and a terminal setting condition in each interface group. The terminal information refers to attribute information of terminals in the interface groups of the electrical component, and the terminal group information may include terminal arrangement conditions in the respective interface groups, and may include terminal numbers, terminal signal types, and connection requirements of the terminals, for example.
For example, one three-phase circuit breaker may be defined with two interface groups, one of which is a three-phase 380V input interface group and the other is a three-phase 380V output interface group, and the relative relationship between the interface groups and the terminals is set according to the terminal functions of the electrical components. For example, a three-phase 380V input interface set may include three access terminals No. 1, no. 3, and No. 5 of a three-phase circuit breaker; the three-phase 380V output interface set may include three output terminals No. 2, no. 4, and No. 6 of a three-phase circuit breaker.
S102, determining a primary structure chart of the electrical system according to the design requirement information and the component library.
Specifically, the design requirement information refers to requirement information for designing an electrical system, and may include component requirement information and function requirement information. The design requirement information is based on an electronic control system mechanical drawing and refers to standards, specifications, and conventions of an electrical design, and may include at least one of a type, a model, or a number of elements, for example. The preliminary structural graph refers to a primary form of structural graph that may graphically and/or tabular display attributes of individual target electrical elements in the electrical system. The primary structural diagram includes the primary content of the individual electrical components required for the electrical system, which may include attributes of the electrical components directly from the component library. For example, when creating a preliminary structural diagram of an electrical system, target electrical components required for the electrical system to be designed may be correspondingly determined from a component library according to a mechanical design diagram of the electrical system, and attributes of the target electrical components may be formed into the preliminary diagram of the electrical system, which may be performed manually by a designer or automatically by a computer program including mechanical design software, product lifecycle management (system (may also be referred to as PLM system), and selection.
Illustratively, the preliminary structure graph may include a preliminary total graph and a preliminary total table. The designer can keep in touch withMachinery Design drawingThe symbols of the target electrical elements required for designing the electrical system are selected from the element library and dragged to the drawing area of the preliminary total diagram, and other attributes of the electrical elements are added into the preliminary total diagram and displayed in different forms, for example, names and numbers can be directly displayed near the symbols of the target electrical elements, terminal information of each terminal included in the schematic diagram, the interface group information and the interface group can be displayed in a hidden list, and a user can realize display of other attributes by clicking and/or selecting the corresponding symbols. And simultaneously forming the preliminary total graph, adding the attribute of the target electrical element into the preliminary total graph, and forming the preliminary total graph corresponding to the preliminary total graph.
And S103, adding the connection relation among the interface groups into the primary structure chart, and completely determining the structure chart of the electrical system.
In particular, an interface group refers to a terminal combination on an electrical component that enables a functional connection with other electrical components, and may include at least one terminal. One interface group may correspond to another interface group, and terminals in the corresponding two interface groups may also correspond one-to-one. For example, the power input interface group of the motor protector No. 1 may be correspondingly connected with the power output interface group of the factory bus. The corresponding interface groups can be connected according to the design requirement information of the user, the attribute of each target electric element and the experience data. Completing the connection setup of all interface groups completes the structural diagram of the electrical system.
The attribute of the target electrical element includes interface group information, and the preliminary summary table may determine a connection relationship to be selected of each interface group according to connection requirements of the interface groups in the interface group information, for example, the power input interface group of the No. 1 motor protector needs to be connected with 330V ac power, the power output interface group of the factory bus is 330V ac power, and then the power output interface of the engineering bus may be determined as one connection interface group to be selected of the power input interface group of the No. 1 motor protector. If there are multiple candidate connection relations of an interface group, the final connection relation of the interface group can be selected from the candidate connection relations. If there is only one connection relationship to be selected in an interface group, the connection relationship to be selected can be directly determined as a final connection relationship.
Fig. 3 is a general diagram of a motor control system according to an embodiment of the present invention. Referring to fig. 3 and table 1, the overall structure diagram of the motor control system shows the symbol, name, number, interface group and connection relation between the interface groups of the four target electric elements of the factory bus FPB1, the motor protection switch Q1, the knife switch S1 and the asynchronous motor M1, correspondingly, table 1 is a structural grid table of the motor control system, the information in the table corresponds to the overall structure diagram, the connection relation between the interface groups of the electric elements is shown, the content with the symbol delta is the information added to the diagram in step S103, and the other content is the information directly taken out from the element library. Wherein g1 is a first interface group of the target electrical element, and g2 is a second interface group of the target electrical element.
Figure BDA0004149297280000101
Table 1 structural grid table corresponding to the general structural diagram of the motor control system shown in fig. 1
S104, determining an electrical design diagram of the electrical system according to the structural diagram of the electrical system.
Specifically, the electrical design drawing includes a schematic and a related report. The schematic diagram of the electrical system refers to a detailed electrical drawing capable of showing specific connection relations of the electronic elements and terminals of the electrical elements and types of transmission signals, the related report refers to an affiliated report of the schematic diagram, and certain attribute and analysis data of the attribute of the electrical system can be displayed according to the requirements of users so as to realize the guiding function of later construction. Illustratively, the relevant report may include a PLC input-output relationship table (also referred to as an IO table), a cable table, a bill of materials (also referred to as a BOM table), and any other report that may be generated based on the target electrical component properties. According to the template procedure, the schematic diagram of the target electrical element in the structural diagram is added to the schematic diagram of the electrical system. And connecting specific terminals in the interface groups of the electric elements in the schematic diagram according to the connection relation between the interface groups of the target electric elements in the structure diagram. The type of signal transmitted by the individual cables may also be shown in the schematic diagram of the electrical system according to the type of interface group in the attribute. And generating a related report according to the schematic diagram of the electrical system while generating the schematic diagram of the electrical system. The related report may include an IO table and a cable table, where in the process of generating the schematic diagram of the electric power system, the corresponding IO table may be determined synchronously according to the terminal setting and the connection relationship between the terminals of each electric element in the schematic diagram of the electric power system, and the IO table displays connection information of each signal input/output terminal connected to the PLC device in the electric power system.
Fig. 4 is a schematic diagram of a motor control system according to an embodiment of the present invention, and referring to fig. 4, an electrical design diagram of the motor control system may be generated according to the general structural diagram shown in fig. 3 or the structural network table shown in table 1. The electrical design diagram includes a schematic diagram shown in fig. 4, in which the schematic diagram of the motor control system shows the symbol, name, number, interface group of four target electrical elements, namely, the factory bus FPB1, the motor protection switch Q1, the knife switch S1 and the asynchronous motor M1, and the connection relationship between each terminal in the interface group and the terminals in other interface groups, and the numbers of the terminals are denoted by the numbers 1, 2, 3, … or n.
In the method for generating the electrical design diagram provided by the embodiment of the invention, the element library is established based on the attribute of the electrical element. And determining a primary structure chart of the electrical system according to the design requirement information and the component library. And adding the connection relation among the interface groups into the primary structure chart to completely determine the structure chart of the electrical system. The electrical design diagram of the electrical system is determined according to the structure diagram of the electrical system, the generation of the electrical design diagram is realized, the component library is established to facilitate the butt joint of the structure diagram and the design demand information, the structure of the structure diagram only needs to select target electrical components and add connection relations, the operation workload of designers is reduced, and the generation efficiency of the electrical design diagram is improved.
Fig. 5 is a flowchart of another method for generating an electrical design chart according to an embodiment of the present invention, and referring to fig. 5, the method for generating an electrical design chart includes:
s201, based on the attribute of the electrical element, an element library is established.
The specific content of step S201 is the same as that of step S101, and will not be described here again.
S202, determining target electrical elements forming the electrical system from the element library according to the design requirement information, and adding the target electrical elements into the primary structure chart.
Specifically, the design requirement information includes a mechanical design drawing of the electrical system. The design requirement information mainly comprises mechanical drawings of an electrical system (particularly an electrical control system), and refers to standards, specifications and conventions of electrical design. At least one attribute such as the name and model of the electrical element required by the electrical system can be determined according to the design requirement information, the electrical element is led into the preliminary structure chart according to the attribute, all the attributes of the element are led out from the element library through the attribute in the preliminary structure chart, and finally the preliminary structure chart comprising all the electrical elements and all the attributes of each electrical element is formed.
Illustratively, the attributes of the target electrical components of the corresponding model are called from the component library according to the design requirement information and added into the primary structure chart. The preliminary structure graph may include a preliminary structural graph and a preliminary structural table. In one aspect, the attributes of the target electrical components are added to the primary structure chart, symbols of the target electrical system in the component library can be dragged into the primary structure chart, other attributes corresponding to the symbols can be added to the primary structure chart, and some of the attributes can exist in the primary structure chart in a hidden list mode. In the process of forming the primary structure diagram, the data in the corresponding primary structure diagram also increases along with the increase of the data of the primary structure diagram. On the other hand, the attributes of the target electrical components are added into the primary structure chart, or the attributes of the target electrical components can be added into the primary structure chart one by one from the component library, and the process can be automatically implemented by a program. In the process of forming the preliminary structure table, symbols and other attributes in the corresponding preliminary structure table also increase as the data in the preliminary structure table increases.
S203, determining a to-be-selected connection interface group of the interface group in the preliminary structure chart according to the interface group information of the target electrical element.
Specifically, the interface group information of the target electrical component includes an interface group number, an interface group signal type, and a connection requirement of the interface group. The interface group signal types may include a plurality of types according to different classification methods, and the interface group signal classification may be classified into an input signal and an output signal, a communication signal and an electrical signal, and an ac voltage signal and a dc voltage signal, for example. The interface group signal type of one interface group of the electrical component may include a plurality. The connection requirement of the interface group refers to the signal type of the interface group which needs to be met by other interface groups correspondingly connected with the interface group. According to the connection requirement of one interface group, other interface groups with the interface group information meeting the connection requirement can be determined from the preliminary structure chart and used as the candidate connection interface groups of the interface groups. For example, the number of the connection interface groups to be selected for each interface group may not be 1.
Illustratively, after a three-phase circuit breaker element is introduced into the preliminary structural diagram, it may be determined that the three-phase 380V input interface group of the three-phase circuit breaker element needs to be connected to the three-phase 380V power output interface group of another target electrical element in the preliminary structural diagram according to the connection requirements of the three-phase 380V input interface group. At this time, all interface groups meeting the connection requirements of the three-phase 380V input interface group in the preliminary structure chart can be used as candidate connection interface groups of the three-phase 380V input interface group.
S204, selecting a target connection interface group of the interface group from the connection interface groups to be selected.
Specifically, if the number of the candidate connection interface groups determined in step S203 is 1, the target connection interface group of the interface group is the unique candidate connection interface group. If the number of the candidate connection interface groups determined in step S203 is not 1, one of the plurality of candidate connection interface groups corresponding to the interface group may be selected as the target connection interface group of the interface group according to the design requirement or experience of the designer.
And S205, connecting each interface group in the preliminary structure chart with a corresponding target connection interface group according to the terminal information to generate the structure chart.
Specifically, the terminal information includes a terminal number, a terminal signal type, and a connection requirement of the terminal. In the preliminary structure chart, each terminal in the interface group can be connected with each terminal in the corresponding target connection interface group in a one-to-one correspondence mode according to the connection requirement in the terminal information, and a final structure chart can be generated. Illustratively, the structure chart includes a structure overview chart and a structure grid table. In the structure overview, the connection relation between each terminal of the interface group and other terminals may be displayed only in the hidden list of the interface group, and not on the connection of symbols in the structure overview. The structural grid table may show the numbers of the target terminals to which the terminals in the respective interface groups are correspondingly connected in a table form.
Illustratively, the preliminary structure graph includes a preliminary total graph and a preliminary total graph, which correspond to each other; corresponding to the preliminary structure diagram, the structure diagram also comprises a structure general diagram and a structure grid table, which correspond to each other. On the one hand, the preliminary total table can be generated according to the preliminary total graph, and the preliminary total table and the content of the preliminary total graph synchronously change; the structural grid table is generated according to the structural overall diagram, and the structural grid table and the content of the structural overall diagram are synchronously changed. In a mode of generating a preliminary total graph according to design requirements and the component library, a designer can drag out corresponding symbols from the component library, and symbol connection is manually realized in the preliminary total graph to generate a structural total graph. The preliminary summary table may be generated from a preliminary summary map and the structural grid table may be generated from a structural summary map. In the process, the table is generated according to the graph, and symbols in the graph are visual and easy to identify, so that manual implementation of a designer is facilitated.
On the other hand, the preliminary total map may be generated according to a preliminary total table, and the preliminary total map is changed in synchronization with the content of the preliminary total table. The structure general diagram is generated according to the structure grid table, and the structure general diagram and the content of the structure grid table are synchronously changed. The preliminary summary may be automatically generated directly by a program or machine, depending on design requirements and component libraries. And then the connection between the interface groups (the interface groups correspond to the selection or addition of the interface groups to be selected) is realized in the preliminary summary table, and the structural summary table is generated. The structural grid table may also be automatically generated directly by a program or machine. The preliminary total map may be generated from a preliminary total table and the structural total map may be generated from a structural grid table. In the process, the graph is generated according to the table, the data of the table is clear, the implementation of a machine or a program is convenient, and the design speed is improved. In addition, the contents of the structure total diagram and the structure grid table are synchronously changed, so that a designer can change the data in the structure total diagram or the preliminary total diagram, thereby realizing the data update of the corresponding table, facilitating the error correction of the designer and improving the reliability of the design.
Specifically, if the preliminary structure table is automatically generated by the program or the machine and the preliminary structure map is synchronously generated, or the structure net table is automatically generated by the program or the machine and the structure general map is synchronously generated, the steps S202, S203, S204 may be lightweight.
Fig. 6 is a general diagram of a structure of a multifunctional motor control system according to an embodiment of the present invention, and referring to fig. 6, the general diagram of the structure of the multifunctional motor control system shows connection relations among twenty target electrical components including a factory bus FPB1, a miniature circuit breaker F1, a dc power supply V1, a DI module DI1, a button S2, a button S3, a button E1, a DO module DO1, a contactor coil K1-1, a contactor coil K2-1, an indicator lamp H2, an indicator lamp H3, a motor protector Q1, a contactor contact K1-2, an asynchronous motor M1, a motor protector Q2, a contactor contact K2-2, and an asynchronous motor M2, such as symbols, names, numbers, interface groups, and interface groups of the respective target electrical components. g1 and g2 interface groups are a first interface group and a second interface group on the corresponding target element, respectively.
S206, generating a schematic diagram and a related report of the electrical system according to the attribute of each target electrical element in the structure general diagram and the connection relation between the interface groups.
Specifically, the schematic diagram of the electrical system includes the symbol of the target electrical element, the connection relationship between the interface groups, and the connection relationship between the terminals. The symbol of the target electrical element may show the number and arrangement positions of specific interface groups and terminals, and further show the connection relationship between the interface groups and the connection relationship between the terminals. Illustratively, the related report may include an IO table, a terminal table, and a layout diagram, and further, in a case where the attribute of the electrical component in the component library further includes a cable type required for the electrical component interface group, corresponding to the attribute in the component library, the related report may further include a cable table; where the attributes of the electrical components in the component library also include electrical component costs and electrical component-to-cable costs, the related report may also include a cost budget table.
Fig. 7 is a schematic diagram of a first portion of a multifunctional motor control system according to an embodiment of the present invention, fig. 8 is a schematic diagram of a second portion of the multifunctional motor control system according to an embodiment of the present invention, fig. 9 is a schematic diagram of a third portion of the multifunctional motor control system according to an embodiment of the present invention, and the sum of the three portions is a schematic diagram of the multifunctional motor control system in combination with fig. 7, fig. 8 and fig. 9, so that the schematic diagram and the related report of the multifunctional motor control system shown in fig. 7, fig. 8 and fig. 9 can be generated according to the connection relationship between the attribute and the interface group of each target electrical element in the general structural diagram of the multifunctional motor control system shown in fig. 6.
According to the method for generating the electrical design diagram, which is provided by the embodiment of the invention, the element library is built based on the attribute of the electrical element. And determining target electric elements forming the electric system from the element library according to the mechanical design diagram, and adding the target electric elements into the preliminary structure diagram. And determining the to-be-selected connection interface group of the interface group in the preliminary structure chart according to the interface group information of the target electrical element. And selecting a target connection interface group of the interface groups from the connection interface groups to be selected. And connecting each interface group in the preliminary structure chart with a corresponding target connection interface group according to the terminal information to generate the structure chart. According to the attribute of each target electric element in the structure general diagram and the connection relation between the interface groups, the schematic diagram and the related report of the electric system are generated, the generation of the electric design diagram is realized, the connection between the structure diagram and the design demand information is facilitated by establishing an element library, the structure diagram is constructed by only selecting the target electric element and adding the connection relation, the operation workload of a designer is reduced, and the generation efficiency of the electric design diagram is improved.
Based on the electrical design drawing, a PLC program of the electrical system can be further generated. In the existing method for generating the PLC program, a designer establishes some program blocks as required, writes required control logic in the program blocks, and connects an input terminal and an output terminal of the PLC control device with an opening parameter and an outlet parameter of the program blocks respectively, so as to complete control of controlled elements connected with the PLC control device.
Fig. 10 is a schematic diagram of an indicator light control program block in the prior art, and fig. 11 is a schematic diagram of a generation flow of an indicator light PLC control program in the prior art. The control requirements are as follows: the electrical system comprises two buttons to control an indicator lamp, and the indicator lamp is required to be lighted when the button A is pressed; when the button B is pressed, the indicator light is turned off. In a PLC program, the designer will typically write this demand control logic into an indicator light control block as shown in fig. 10. In the pilot lamp control block, two program variable interfaces on the left side are variable inlets (labeled "on command" and "off command"), and one program variable interface on the right side is a variable outlet (labeled "light switch"). When a signal exists in a variable entry corresponding to the "light instruction", that is, when the boolean quantity connected to the variable entry is "true", the indicator light control program block sets a variable connected to a variable outlet indicating "light switch", that is, lights an indicator light. Similarly, when a signal exists at a variable inlet corresponding to the "turn-off instruction", that is, when the boolean quantity connected to the variable inlet is "true", the indicator light control program block resets the variable connected to the variable outlet indicating the "light switch", that is, turns off the indicator light. Furthermore, in order for the designer to make two actual buttons in the electrical system control the on/off of the indicator light, the variable inlet and the variable outlet of the indicator light control program block are respectively connected with the IO variables of the corresponding PLC control device, where the IO variables refer to input and output type variables, and there is a one-to-one mapping relationship between the IO variables and signals outputted or accessed by electrical elements directly connected to the PLC control device. That is, in the pilot lamp control block, the program variable interface (variable inlet or variable outlet) needs to be connected to which variables are related to the actual schematic diagram of the electrical system. Referring to fig. 11, in general, a designer needs to connect variable addresses of a PLC control device to a program variable interface in a one-to-one correspondence manner according to an IO table corresponding to a schematic diagram. As can be seen from the PLC program in fig. 11, the address of the variable output from the light-up button is I0.0, and this address is connected to the variable entry corresponding to the "light-up instruction"; the address of the variable output by the turn-off button is I0.1, and the address is connected to a variable inlet corresponding to a turn-off instruction; the address of the variable accessed by the indicator lamp is Q0.0, and the address is connected to the variable outlet corresponding to the lamp switch, so that the writing of the control program of the indicator lamp is realized.
Throughout this process, we will find that from schematic diagrams to PLC programs, the maximum workload is often to fill variables into the PLC blocks through IO tables. Based on this, in order to save this part of the effort, the present application adopts the following solution: standard program blocks capable of realizing various functions and program variable interfaces thereof are set. And generating a program block interface parameter comparison table by corresponding variable addresses in the IO table corresponding to the schematic diagram and program variable interfaces of the program blocks, and showing the mapping relation between the variables connected with the PLC control device and the program variable interfaces. And automatically generating a corresponding PLC program according to the program block interface parameter comparison table. Thus, the automatic and efficient generation of the PLC program is completed. The foregoing is a background technology of the method for generating a PLC program and a central idea of a solution in the present invention, and a specific embodiment of the method for generating a PLC program is described hereinafter.
The embodiment of the invention provides a generation method of a PLC program, which is implemented on the basis of the generation method of any electric design drawing. Fig. 12 is a flowchart of a method for generating a PLC program according to an embodiment of the present invention, and referring to fig. 12, the method for generating a PLC program includes:
S301, combining the control requirements and the attributes of the electrical elements, and establishing a unit program library.
Specifically, the control requirement of the electrical element refers to a control function that the electrical element needs to achieve according to a control signal accessed by an input terminal, and the control requirement can be input by a designer according to experience or user requirements or obtained from a specification of the electrical element, and for example, the control requirement of the indicator light in the indicator light system can be that the PLC control element generates a light switch control signal output by a third terminal according to a light-on signal accessed by a first terminal and a light-off signal accessed by a second terminal, so as to realize the control of the on and off of the indicator light. The attributes refer to basic attributes of the electrical components, including attributes of common electrical components, including user instruction access components and controlled components, as well as attributes of the PLC control device. For example, the attribute may be obtained from a component library, and the attribute of the electrical component may include a name, a number, a symbol, a type, interface group information, and terminal information of each terminal included in the interface group of the electrical component. Further, the interface group information includes an interface group number, an interface group signal type, and a connection requirement of the interface group, and the terminal information includes a terminal number, a terminal signal type, and a connection requirement of the terminal. The unit program library comprises PLC program blocks corresponding to the electric elements, wherein the PLC program blocks comprise program main bodies and program variable interfaces, and can also comprise function introduction of each program variable interface. In addition, the unit program library may further include preset information, such as general program blocks, general instructions, general data tables, etc., that can be repeatedly used in each control logic.
In combination with the control requirements and attributes of the individual electrical components, a unit library may be built. The PLC control program capable of realizing the control requirement of the electric element is packaged into program units, each program unit is provided with a program variable interface for accessing or outputting signals besides a program main body, and in the actual use process, the interface of the program variable can be selected or set according to the actual requirement of the electric element.
S302, generating an electrical design drawing according to the generation method of the electrical design drawing.
This step S302 may be implemented according to any of the foregoing embodiments, and will not be described herein. It should be noted that, step S302 is disposed before step S303, but the relationship between step S302 and each unit step therein and step S301 is not limited, and the user may set the relationship according to the requirement.
S303, determining a target PLC program block from the unit program library according to the electrical design drawing.
Specifically, the electrical design drawing includes a schematic diagram of an electrical system. According to the schematic diagram of the electrical system, the controlled electrical element can be determined from all electrical elements connected with the PLC control device, and then a target PLC program block corresponding to the controlled electrical element is determined in the unit program library. For example, if the controlled electrical component connected to the PLC control device in the schematic diagram of the electrical system is an indicator light, the indicator light control program may be called from the unit program library as the target PLC control block. If the controlled electric element connected with the PLC control device in the electric design drawing is an asynchronous motor, the asynchronous motor control program can be called from the unit program and used as a target PLC control block. In addition, the target PLC block may be further selected according to the number of input terminals and output terminals of the PLC control device in the electrical design drawing, and for example, in the case where there are two input terminals and one output terminal of the PLC control device, a two-input one-output indicator lamp control program may be selected as the target PLC control block.
S304, determining a program interface variable table of the electrical system according to the electrical design drawing and the target PLC program block.
Specifically, the electrical design drawing may further include a related report, which may include an IO table. The IO table is an interface allocation table indicating the attribute of the electrical element to which each terminal of the PLC control device is connected and the signal storage address, and the type of each terminal of the PLC control device and the name, number, function, and connection variable storage address of the electrical element to which each terminal is connected may be shown in the IO table, for example. The program interface variable table comprises all program interfaces in the target PLC program block and corresponding connection variables and/or internal variables. The connection variable is a variable signal obtained or outputted by the target PLC module due to connection with other electrical components, and can be obtained from a control component connected to the PLC control device or generated by the PLC control device and outputted to the controlled component. The internal variable refers to a preset variable signal obtained by the target PLC program block due to connection with the general instruction and/or the general data table. Terminal information of each terminal of the PLC control device and the attribute of the electrical component to which the terminal is connected can be acquired from the IO table. And determining a program variable interface on the target PLC program block according to the target PLC program block. According to the functions of the electric elements (which can be obtained from an element library) connected with each terminal in the IO table and the functions of each program variable interface in the target PLC program block (which can be obtained from a unit program library), the program variable interfaces in the target PLC program block and the terminals of the corresponding PLC control device are mapped in a relation, and the information in the IO table and the program variable interfaces in the target PLC program are correspondingly imported into the same table according to the mapping relation to form a program interface variable table. And importing the storage addresses of the program variable interfaces and the internal variables corresponding to the functions in the target PLC program block into a program interface variable table according to the functions of the program variable interfaces and the functions of the internal variables in the PLC program block to form a complete program interface variable table.
Illustratively, a mapping relationship between the connection variable of the target electrical element and the program variable interface in the target PLC program block is established according to the IO table and the target PLC program block. And establishing a mapping relation between the internal variable and a program variable interface in the target PLC program block according to the functional requirement of the target PLC program block, wherein the internal variable comprises a preset variable and other program-defined variables. And finally, forming a program interface variable table of the electrical system according to the mapping relation. Further, a mapping relationship between the IO table variable and the internal variable and the program variable interface in the target PLC program block is established according to the functional requirement of the target PLC program block. If all variable interfaces required by the target PLC program block need to be established with the internal variables, namely the target PLC program block is not associated with the IO table variables, the steps from the electrical design drawing to the generation of the IO table in the method can be omitted, and the mapping relationship between the internal variables and the program interface variables can be directly established. But this special case still belongs to the method.
S305, generating a PLC program of the electrical system according to the program interface variable table.
Specifically, according to the program variable interfaces in the program interface variable table and the variables (connection variables and internal variables) corresponding to the program variable interfaces, connection of each program interface in the target PLC program block is completed, and a PLC program of the electrical system is generated.
According to the method for generating the PLC program, provided by the embodiment, a unit program library is established in combination with the control requirements and the attributes of the electric elements, the electric design diagram is generated according to the method for generating the electric design diagram, then the target PLC program block is determined from the unit program library according to the electric design diagram, the program interface variable table of the electric system is determined according to the electric design diagram and the target PLC program block, the PLC program of the electric system is generated according to the program interface variable table, the generation of the PLC program is realized, in the process, the corresponding relation between the program variable interfaces and the terminals of the PLC control device is formed according to the functions of the electric elements connected with the PLC control device and the functions of the program variable interfaces of the target PLC program, and then the connection between each interface on the target PLC program block and the corresponding variable is realized, so that the generation of the PLC program is completed, and the programming efficiency of the PLC program is improved.
The invention further provides electronic equipment. An electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the method for generating any PLC program according to the embodiment of the present invention.
The embodiment of the invention also provides a computer readable storage medium. The computer readable storage medium stores computer instructions for causing the processor to execute the method for generating any PLC program according to the embodiment of the present invention.
Various implementations of the methods and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of generating an electrical design drawing, comprising:
establishing an element library based on the attribute of the electric element, wherein the attribute of the electric element comprises the name, the number, the symbol, the interface group information of the electric element and the terminal information of each terminal included in the interface group;
determining a primary structure chart of the electrical system according to the design requirement information and the element library;
adding the connection relation among the interface groups into the preliminary structure chart to completely determine the structure chart of the electrical system;
and determining an electrical design diagram of the electrical system according to the structural diagram of the electrical system, wherein the electrical design diagram comprises a schematic diagram and a related report.
2. The method of generating an electrical schematic according to claim 1, wherein the interface group information includes an interface group number, an interface group signal type, and a connection requirement of an interface group; the terminal information includes a terminal number, a terminal signal type, and a connection requirement of the terminal.
3. The method of generating an electrical design drawing according to claim 2, wherein the design requirement information includes a mechanical design drawing of the electrical system;
Determining a preliminary structural diagram of the electrical system according to the design requirement information and the component library, wherein the preliminary structural diagram comprises the following steps:
determining target electric elements composing the electric system from the element library according to the mechanical design diagram, and adding the target electric elements into the preliminary structure diagram;
and determining a to-be-selected connection interface group of the interface group in the preliminary structure chart according to the interface group information of the target electric element.
4. The method for generating an electrical design drawing according to claim 3, wherein adding the connection relation between the interface groups to the preliminary structural diagram completely determines the structural diagram of the electrical system, comprising:
selecting a target connection interface group of the interface group from the connection interface groups to be selected;
and connecting each interface group in the preliminary structure chart with the corresponding target connection interface group according to the terminal information to generate the structure chart.
5. The method for generating an electrical design drawing according to claim 4, wherein the preliminary structure drawing comprises a preliminary total drawing and a preliminary total drawing, which correspond to each other; the structure chart comprises a structure general chart and a structure grid table, which are mutually corresponding; the preliminary total table is generated according to the preliminary total graph, and the preliminary total table and the content of the preliminary total graph are synchronously changed; the structural grid table is generated according to the structural overall diagram, and the structural grid table and the content of the structural overall diagram synchronously change.
6. The method for generating an electrical design drawing according to claim 4, wherein the preliminary structure drawing comprises a preliminary total drawing and a preliminary total drawing, which correspond to each other; the structure chart comprises a structure general chart and a structure grid table, which are mutually corresponding; the preliminary total graph is generated according to the preliminary total table, and the preliminary total graph and the content of the preliminary total table are synchronously changed; the structure general diagram is generated according to the structure grid table, and the structure general diagram and the content of the structure grid table synchronously change.
7. The method of generating an electrical schematic according to any one of claims 1-6, wherein determining an electrical schematic of an electrical system from the structural diagram of the electrical system comprises:
and generating a schematic diagram of the electrical system and a related report according to the attribute of each target electrical element in the structure general diagram and the connection relation between the interface groups, wherein the schematic diagram of the electrical system comprises symbols of the target electrical elements, the connection relation between the interface groups and the connection relation between the terminals.
8. The method for generating the PLC program is characterized by comprising the following steps:
Combining control requirements and attributes of the electrical elements, and establishing a unit program library, wherein the unit program library comprises PLC program blocks corresponding to the electrical elements, and the PLC program blocks comprise a program main body and a program variable interface;
determining a target PLC program block from the unit program library according to the electrical design diagram;
determining a program interface variable table of the electrical system according to the electrical design drawing and the target PLC program block, wherein the program interface variable table comprises all the program interfaces in the target PLC program block and corresponding connection variables and/or internal variables thereof;
generating a PLC program of the electrical system according to the program interface variable table;
before determining the target PLC program block from the unit program library, the method further comprises the following steps: the electrical design drawing generating method according to any one of claims 1-7, wherein the electrical design drawing is generated.
9. The method for generating a PLC program according to claim 8, wherein the related report in the electrical design drawing includes an IO table including connection variables on the target electrical component connected to the PLC device;
determining a program interface variable table of the electrical system according to the electrical design drawing and the target PLC program block, wherein the program interface variable table comprises the following steps:
Establishing a mapping relation between the connection variable of the target electrical element and the program variable interface in the target PLC program block according to the IO table and the target PLC program block;
establishing a mapping relation between the internal variable and the program variable interface in the target PLC program block according to the functional requirement of the target PLC program block, wherein the internal variable comprises a preset variable and other program-defined variables;
and forming a program interface variable table of the electrical system according to the mapping relation.
10. An electronic device, the electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of generating a PLC program according to any one of claims 8-9.
CN202310313059.5A 2023-03-28 2023-03-28 Method for generating electrical design diagram and method for generating PLC program Pending CN116300678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310313059.5A CN116300678A (en) 2023-03-28 2023-03-28 Method for generating electrical design diagram and method for generating PLC program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310313059.5A CN116300678A (en) 2023-03-28 2023-03-28 Method for generating electrical design diagram and method for generating PLC program

Publications (1)

Publication Number Publication Date
CN116300678A true CN116300678A (en) 2023-06-23

Family

ID=86784983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310313059.5A Pending CN116300678A (en) 2023-03-28 2023-03-28 Method for generating electrical design diagram and method for generating PLC program

Country Status (1)

Country Link
CN (1) CN116300678A (en)

Similar Documents

Publication Publication Date Title
US11093678B2 (en) Method, computer program and system providing real-time power grid hypothesis testing and contingency planning
US20170351646A1 (en) User Interface with Movable Mini-Tabs
CN108958611B (en) Information editing method and device
CN108053460B (en) Drawing method and device of electric power system diagram
CN110765028B (en) Visual construction method and device of verification environment and storage medium
CN111950061A (en) BIM model-based space illumination design method, system, device and medium
CN115495069A (en) Model-driven coal industry software flow implementation method, device and equipment
CN114398071A (en) Control logic configuration implementation method and system of control system
CN112184881B (en) Multi-level overall process monitoring method for power equipment
CN116300678A (en) Method for generating electrical design diagram and method for generating PLC program
WO2021106082A1 (en) Scada web hmi system
CN103440391A (en) Semiconductor process corner scanning and simulating method based on numerical value selection function
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
CN105653750A (en) Realization method for assembly layout in human computer interface 3D designing system
CN112257208A (en) BIM-based automatic arrangement method, system and device for power system of transformer substation
CN114282029A (en) Primitive management method and device, electronic equipment and storage medium
KR20130045092A (en) Auto layout method
CN106650090B (en) Method for quickly generating engineering terminal dial table, box diagram and system diagram based on data sharing
CN111708582A (en) Online configuration method and device and electronic equipment
CN111259567A (en) Layout generating method and device and storage medium
CN110162880A (en) Optical cable laying method, device, equipment and medium
CN114419251A (en) Large-scale digital-analog sharing interaction system and method for airplane strength test
KR101557262B1 (en) XAML Library based on WPF for Human-Machine Interface in Power Plant Simulator
Tsay et al. A personal computer graphical environment for industrial distribution system education, design, and analysis
CN113342413B (en) Method, apparatus, device, medium, and article for processing components

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