CN107861458B - PLC rapid construction method capable of automatically configuring hardware resources - Google Patents

PLC rapid construction method capable of automatically configuring hardware resources Download PDF

Info

Publication number
CN107861458B
CN107861458B CN201711097833.4A CN201711097833A CN107861458B CN 107861458 B CN107861458 B CN 107861458B CN 201711097833 A CN201711097833 A CN 201711097833A CN 107861458 B CN107861458 B CN 107861458B
Authority
CN
China
Prior art keywords
plc
port
configuration
parameter table
hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711097833.4A
Other languages
Chinese (zh)
Other versions
CN107861458A (en
Inventor
孙瑞瑞
程广河
王茂励
李成攻
赵晓杰
赵帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Computer Science Center National Super Computing Center in Jinan
Original Assignee
Shandong Computer Science Center National Super Computing Center in Jinan
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 Shandong Computer Science Center National Super Computing Center in Jinan filed Critical Shandong Computer Science Center National Super Computing Center in Jinan
Priority to CN201711097833.4A priority Critical patent/CN107861458B/en
Publication of CN107861458A publication Critical patent/CN107861458A/en
Application granted granted Critical
Publication of CN107861458B publication Critical patent/CN107861458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/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/1138Configuration of I-O

Landscapes

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

Abstract

A PLC rapid construction method capable of automatically configuring hardware resources comprises the following steps: (1) generating a hardware resource configuration parameter table; (2) downloading the hardware resource configuration parameter table PLC-CS into a PLC-PCB parameter configuration storage area FLASH, and downloading a PLC monitoring program into the PLC-PCB program storage area FLASH to complete the construction of the PLC; (3) the constructed PLC runs and realizes the process; (3.1) reading a hardware resource configuration parameter table PLC-CS to finish I/O drive analysis and finish autonomous configuration of hardware resources; and (3.2) running the PLC monitoring program. The invention can rapidly build the customized PLC hardware by carrying out the autonomous configuration of the hardware on the CPU hardware resource, and can rapidly form the series of safe PLC research and development of different I/O points and different communication modes by realizing the customization of any I/O point number in the CPU hardware resource range through the configuration technology.

Description

PLC rapid construction method capable of automatically configuring hardware resources
Technical Field
The invention relates to a PLC (programmable logic controller) rapid construction method capable of automatically configuring hardware resources, belonging to the technical field of PLC hardware resource configuration.
Background
The PLC product serialization refers to the difference customization development according to the difference of different I/O input/output types, paths and communication modes, and the traditional mode needs to develop different software, so that the development difficulty is greatly increased, and the problems of long development period, poor software stability and consistency and the like exist.
Chinese patent document CN101303580A discloses an implementation method for supporting multiple CPU structure PLC controllers, and the present invention includes two major parts, a core structure part and an application design part. The core construction part comprises a PLC instruction frame, a PLC engine construction and a CPU platform construction, wherein the PLC instruction frame realizes the conversion of a PLC instruction algorithm and assembly codes, the PLC engine construction realizes the structure and frame customization of a general engine, and the CPU construction realizes the customization and description of various CPU attributes. The application design part comprises a hardware construction platform and a software design platform, and the hardware design platform customizes and describes various hardware resources including I/O, interrupt, timer, configurable soft elements and the like according to the CPU construction of the application and the core part. The software design platform realizes IL instruction writing and ladder diagram design, provides a logic control program design platform for users, and realizes the customization development of the PLC controller by combining the structure results of the CPU by the user logic control program and the hardware construction platform.
The differences between the chinese patent document CN101303580A and the technology of the present invention are shown in table 1:
table 1:
Figure BDA0001462634630000011
Figure BDA0001462634630000021
according to the invention, hardware is autonomously configured on CPU hardware resources, customized PLC hardware is rapidly constructed, any I/O point within the CPU hardware resource range is customized through a configuration technology, and serial safe PLC research and development of different I/O points and different communication modes can be rapidly formed.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a PLC rapid construction method capable of automatically configuring hardware resources. When the construction method is applied to the development of the PLC with a new model, the PCB hardware circuit is developed only according to the difference of the I/O points, the PLC system software is not developed independently, and the construction method is realized by a parameter configuration mode, thereby shortening the development period and ensuring the stability and the consistency of the software.
The technical scheme of the invention is as follows:
a PLC rapid construction method capable of automatically configuring hardware resources comprises the following steps:
(1) generating a hardware resource configuration parameter table;
according to the customization requirement of a PLC product, the PLC hardware determines the number and the type of I/O points according to the control requirement and the functions of the PLC, and the construction of PLCs of different models is realized within the range allowed by the I/O resources of the CPU hardware;
the method for determining the hardware resource configuration parameters comprises the following steps:
(1.1) selecting the I/O point number of the PLC, firstly considering the control requirement and considering the standby allowance; the number of I/O points is determined according to the actual requirements of input and output signals of a controlled object and the addition of 10% -30% of spare quantity;
(1.2) developing a PCB (programmable logic controller) -PCB according to the I/O resource requirement;
(1.3) generating a hardware resource configuration parameter table PLC-CS by using hardware configurable software to realize the autonomous configuration of PLC hardware resources; the hardware configurable software is software commonly used by technicians in the field and has the function of realizing a hardware resource configuration parameter table PLC-CS;
to better explain the hardware configurable software, its operation interface is shown in fig. 1, I/O port type column L1 is a list of types commonly used for PLC; after the L1 is selected, an I/O port access name column L3 is automatically generated, and the I/O port access is a PLC variable needed by the programming of a PLC user program; selecting an I/O port serial number column L2, wherein all selectable CPUs in the column L1 type correspond to pins; then, generating a 'hardware resource configuration parameter table PLC-CS' by increasing line by line;
(2) downloading the hardware resource configuration parameter table PLC-CS into a PLC-PCB parameter configuration storage area FLASH, and downloading a PLC monitoring program into the PLC-PCB program storage area FLASH to complete the construction of the PLC;
the PLC monitoring program is a technology well known by those skilled in the art, is a bottom-layer driver at a hardware platform end, and comprises hardware analysis, statement analysis, communication interface drive and the like, the monitoring program comprises a fusion technology of different PLCs, and the monitoring program is a monitoring program specially developed for a configurable PLC, but the monitoring program is unique for different PLCs;
(3) the constructed PLC operation implementation process comprises the following steps of:
(3.1) reading a hardware resource configuration parameter table PLC-CS to finish I/O drive analysis and finish autonomous configuration of hardware resources;
(3.2) running a PLC monitoring program; therefore, the PLC completely has the functions of the PLC in operation, programming of a ladder diagram and a statement table, and the functions of logic control, arithmetic operation, timing, counting, data processing, PID operation and communication are realized.
Preferably, in the step (1), the establishment of the PLC configuration parameters is realized through QT software, a PLC-CS parameter file is formed according to a parameter table data structure and is downloaded into a PLC hardware circuit through a serial port, and the configuration parameters PLC-CS are called when the PLC is operated to complete the I/O drive configuration; the parameter table data structure is as follows:
the PLC-CS parameter table structure:
PLC I/O port type PLC I/O port location CPU I/O port Pi.j
PLC I/O port types: according to the PLC model requirement, the PLC is configured into a switching value input (DI), a switching value output (DO), an analog value input (AI) and an analog value output (AO);
position of PLC I/O port: configuring the road number position of the selected type according to the PLC model requirement;
CPU I/O port Pi.j: according to different CPU types, a plurality of I/O ports P0.0, P0.1,. Pi.j.; the field sets the CPU I/O port Pi.j corresponding to the position of the PLC I/O port.
Preferably, according to the present invention, the PLC-CS parameter table structure further includes PLC I/O port parameters: setting parameters for the configured I/O port according to the PLC model requirement; null when there is no type parameter;
Figure BDA0001462634630000031
according to the preferable embodiment of the present invention, the method for calling the configuration parameter PLC-CS when the PLC is operated in step (3) to complete the I/O driver configuration analysis includes:
PLC I/O port type PLC I/O port location PLC I/O port parameters CPU I/O port Pi.j
When the PLC is operated, the PLC operating system software firstly calls a configuration parameter PLC-CS, and I/O driving configuration of an I/O port corresponding to a CPU is completed according to the types of PLC I/O port type switching value input (DI), switching value output (DO), analog value input (AI) and analog value output (AO) according to the parameter table records, and the implementation method is as follows:
PLC I/O port types: reading the type of an LC I/O port, and calling different configuration programs according to different types of PLC port switching value input (DI), switching value output (DO), analog value input (AI) and analog value output (AO);
position of PLC I/O port: according to the positions of the PLC I/O ports, configuration programs are completed in sequence;
③ PLC I/O port parameters: according to the PPLC I/O port parameters, configuring the corresponding I/O port according to the configuration parameters;
CPU I/O port Pi.j: and selecting a CPU I/O port Pi.j corresponding to the currently configured PLC I/O port to perform I/O drive configuration.
The technical advantages of the invention are as follows:
1. when the method is applied to PLC manufacturers, when products with different external resources need to be issued according to different application requirements, only the hardware needs to be designed, and the pin function is configured through hardware configuration, so that the corresponding monitoring program does not need to be researched and developed again.
2. When the invention is applied to an end user, different port types can be configured according to the existing resources of hardware, for example, the user has a configurable PLC, and has 20 switching value input and output ports in total, and the user can configure 10 switching value inputs and 10 switching value outputs or 15 switching value inputs and 5 switching value outputs.
Drawings
FIG. 1 is a schematic diagram of the interface operation of the hardware configurable software according to the present invention;
FIG. 2 is a schematic diagram of a PLC for constructing different I/O points in the present invention; the types of the CPUs of different PLCs are different, for example, LPC2368 of Arm series is adopted by PLC1, and STM32 series or MSP430 series is adopted by PLC 2. Thus, the system can be prevented from being dead in the same place as much as possible;
FIG. 3 is a flow chart for constructing the operating mode of the PLC in the present invention;
FIG. 4 is a flow chart of the present invention, wherein the PLC-CS completes I/O driving analysis.
Detailed Description
The invention is described in detail below with reference to the following examples and the accompanying drawings of the specification, but is not limited thereto.
Examples
As shown in fig. 1-4.
A PLC rapid construction method capable of automatically configuring hardware resources comprises the following steps:
(1) generating a hardware resource configuration parameter table;
according to the customization requirement of a PLC product, the PLC hardware determines the number and the type of I/O points according to the control requirement and the functions of the PLC, and the construction of PLCs of different models is realized within the range allowed by the I/O resources of the CPU hardware;
the method for determining the hardware resource configuration parameters comprises the following steps:
(1.1) selecting the I/O point number of the PLC, firstly considering the control requirement and considering the standby allowance; the number of I/O points is determined according to the actual requirements of input and output signals of a controlled object and the addition of 10% -30% of spare quantity;
(1.2) developing a PCB (programmable logic controller) -PCB according to the I/O resource requirement;
(1.3) generating a hardware resource configuration parameter table PLC-CS by using hardware configurable software to realize the autonomous configuration of PLC hardware resources; the hardware configurable software is software commonly used by technicians in the field and has the function of realizing a hardware resource configuration parameter table PLC-CS;
to better explain the hardware configurable software, its operation interface is shown in fig. 1, I/O port type column L1 is a list of types commonly used for PLC; after the L1 is selected, an I/O port access name column L3 is automatically generated, and the I/O port access is a PLC variable needed by the programming of a PLC user program; selecting an I/O port serial number column L2, wherein all selectable CPUs in the column L1 type correspond to pins; then, generating a 'hardware resource configuration parameter table PLC-CS' by increasing line by line;
the PLC configuration parameter establishment is realized through QT software, a PLC-CS parameter file is formed according to a parameter table data structure and is downloaded into a PLC hardware circuit through a serial port, and the configuration parameter PLC-CS is called when the PLC is operated to complete the I/O drive configuration; the parameter table data structure is as follows:
the PLC-CS parameter table structure:
PLC I/O port type PLC I/O port location CPU I/O port Pi.j
PLC I/O port types: according to the PLC model requirement, the PLC is configured into a switching value input (DI), a switching value output (DO), an analog value input (AI) and an analog value output (AO);
position of PLC I/O port: configuring the number position of the selected type, such as a 3 rd switching value input (DI3), according to the PLC model requirement;
CPU I/O port Pi.j: according to different CPU types, a plurality of I/O ports P0.0, P0.1,. Pi.j.; the field sets the CPU I/O port Pi.j corresponding to the position of the PLC I/O port.
The PLC-CS parameter table structure further includes PLC I/O port parameters: setting parameters for the configured I/O port according to the PLC model requirement, wherein the type parameter of analog input AI is 4-20 mA; null when there is no type parameter;
Figure BDA0001462634630000051
(2) downloading the hardware resource configuration parameter table PLC-CS into a PLC-PCB parameter configuration storage area FLASH, and downloading a PLC monitoring program into the PLC-PCB program storage area FLASH to complete the construction of the PLC;
the PLC monitoring program is a technology well known by those skilled in the art, is a bottom-layer driver at a hardware platform end, and comprises hardware analysis, statement analysis, communication interface drive and the like, the monitoring program comprises a fusion technology of different PLCs, and the monitoring program is a monitoring program specially developed for a configurable PLC, but the monitoring program is unique for different PLCs;
(3) the constructed PLC operation implementation process comprises the following steps of:
(3.1) reading a hardware resource configuration parameter table PLC-CS to finish I/O drive analysis and finish autonomous configuration of hardware resources;
(3.2) running a PLC monitoring program; therefore, the PLC completely has the functions of PLC in operation, programming of a ladder diagram and a statement table, and the functions of logic control, arithmetic operation, timing, counting, data processing, PID operation and communication are realized;
the implementation method for calling the configuration parameter PLC-CS to complete the I/O drive configuration analysis when the PLC is operated in the step (3)
PLC I/O port type PLC I/O port location PLC I/O port parameters CPU I/O port Pi.j
When the PLC is operated, the PLC operating system software firstly calls a configuration parameter PLC-CS, and I/O driving configuration of an I/O port corresponding to a CPU is completed according to the types of PLC I/O port type switching value input (DI), switching value output (DO), analog value input (AI) and analog value output (AO) according to the parameter table records, and the implementation method is as follows:
PLC I/O port types: reading the type of an LC I/O port, and calling different configuration programs according to different types of PLC port switching value input (DI), switching value output (DO), analog value input (AI) and analog value output (AO);
position of PLC I/O port: according to the positions of the PLC I/O ports, configuration programs are completed in sequence;
③ PLC I/O port parameters: according to the PPLC I/O port parameters, configuring the corresponding I/O port according to the configuration parameters;
CPU I/O port Pi.j: and selecting a CPU I/O port Pi.j corresponding to the currently configured PLC I/O port to perform I/O drive configuration.

Claims (4)

1. A PLC rapid construction method capable of automatically configuring hardware resources is characterized by comprising the following steps:
(1) generating a hardware resource configuration parameter table PLC-CS;
(2) downloading the hardware resource configuration parameter table PLC-CS into a PLC-PCB parameter configuration storage area FLASH, and downloading a PLC monitoring program into the PLC-PCB program storage area FLASH to complete the construction of the PLC;
(3) the constructed PLC operation implementation process comprises the following steps of:
(3.1) reading a hardware resource configuration parameter table PLC-CS to finish I/O drive analysis and finish autonomous configuration of hardware resources;
and (3.2) running the PLC monitoring program.
2. The method for rapidly building PLC of the self-configurable hardware resource of claim 1, wherein in the step (1), the PLC configuration parameter establishment is realized by QT software, a PLC-CS parameter file is formed according to a parameter table data structure and downloaded to a PLC hardware circuit through a serial port, so as to call the PLC-CS parameter table for completing the I/O drive configuration when the PLC is operated; the parameter table data structure is as follows:
the PLC-CS parameter table structure:
Figure FDA0002865336020000011
(ii) PLCI/O port type: according to the PLC model requirement, the PLC is configured into a switching value input (DI), a switching value output (DO), an analog value input (AI) and an analog value output (AO);
PLCI/O port location: configuring the road number position of the selected type according to the PLC model requirement;
CPU I/O port Pi.j: according to different CPU types, a plurality of I/O ports P0.0, P0.1,. Pi.j.; the field sets the CPU I/O port Pi.j corresponding to the PLCI/O port position.
3. The PLC rapid building method of an autonomously configurable hardware resource of claim 2, wherein the PLC-CS parameter table structure further comprises PLC I/O port parameters: setting parameters for the configured I/O port according to the PLC model requirement; null when there is no type parameter;
Figure FDA0002865336020000012
4. the method as claimed in claim 3, wherein the step (3) of calling the PLC-CS in the hardware resource configuration parameter table when running the PLC includes the following steps:
Figure FDA0002865336020000021
when the PLC is operated, the PLC operating system software firstly calls a hardware resource configuration parameter table PLC-CS, and completes I/O drive configuration on an I/O port corresponding to a CPU according to the types of PLC I/O port type switching value input (DI), switching value output (DO), analog value input (AI) and analog value output (AO) according to the parameter table records, and the implementation method is as follows:
PLC I/O port types: reading the type of a PLC I/O port, and calling different configuration programs according to different types of PLC port switching value input (DI), switching value output (DO), analog value input (AI) and analog value output (AO);
position of PLC I/O port: according to the positions of the PLC I/O ports, configuration programs are completed in sequence;
③ PLC I/O port parameters: according to the PLC I/O port parameters, configuring the corresponding I/O port according to the configuration parameters;
CPU I/O port Pi.j: and selecting the CPU I/O port Pi.j corresponding to the PLCI/O port currently configured to perform I/O drive configuration.
CN201711097833.4A 2017-11-09 2017-11-09 PLC rapid construction method capable of automatically configuring hardware resources Active CN107861458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711097833.4A CN107861458B (en) 2017-11-09 2017-11-09 PLC rapid construction method capable of automatically configuring hardware resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711097833.4A CN107861458B (en) 2017-11-09 2017-11-09 PLC rapid construction method capable of automatically configuring hardware resources

Publications (2)

Publication Number Publication Date
CN107861458A CN107861458A (en) 2018-03-30
CN107861458B true CN107861458B (en) 2021-05-14

Family

ID=61700041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711097833.4A Active CN107861458B (en) 2017-11-09 2017-11-09 PLC rapid construction method capable of automatically configuring hardware resources

Country Status (1)

Country Link
CN (1) CN107861458B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681444A (en) * 2018-04-12 2018-10-19 华中科技大学 A kind of Soft- PLC configuration development approach based on XML technology
CN108646638B (en) * 2018-07-12 2020-05-12 山东大学 Configuration method and operation method of controller with flexible logic and controller
US11622464B2 (en) 2020-02-24 2023-04-04 Selec Controls Private Limited Modular and configurable electrical device group
CN112241141B (en) * 2020-11-12 2022-08-09 上海电气风电集团股份有限公司 Hardware configuration method, system, device and medium of PLC control system
CN112925572B (en) * 2021-03-01 2023-05-23 联想(北京)有限公司 Control method and device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303580A (en) * 2008-06-24 2008-11-12 杭州义益自动化有限公司 Implementing method of PLC controller for supporting multiple CPU structures
CN102608947B (en) * 2012-03-23 2013-09-18 浙江大学 Programmable control system and configuration program control method
CN106789183A (en) * 2016-12-03 2017-05-31 易泰帝传动技术(烟台)有限公司 It is a kind of to communicate the method that configuration data is parsed automatically
CN107291444B (en) * 2017-05-11 2020-08-28 广东卓信环境科技股份有限公司 PLC instruction generation method and device and PLC programming method

Also Published As

Publication number Publication date
CN107861458A (en) 2018-03-30

Similar Documents

Publication Publication Date Title
CN107861458B (en) PLC rapid construction method capable of automatically configuring hardware resources
KR100641015B1 (en) Method and apparatus for utilizing a sequence interpreter approach to control logic of a programmable logic controller
CN104898546B (en) A kind of PLC on-line debugging system and method based on SOC
CN103558473A (en) Transducer field debugging system based on human-computer interaction interface and transducer field debugging method
CN103941650B (en) Logical AND motion integrated manipulator
CN103324541B (en) The self-propagating method of data between software
CN107092413A (en) A kind of visible controls corners processing method and system
CN114564192A (en) Data mapping method for real-time Ethernet industrial control software development environment
CN115657564A (en) Programming-free field control device and method
JPH083731B2 (en) Programmable controller
CN104423310A (en) Apparatus and method for updating operating system in programmable logic controller
EP2691822A1 (en) Method for managing process automation control and associated system
CN104615412A (en) Control flow executing method and system based on trigger instruction structure
CN101655884A (en) Method for automatically drawing trimming line of stamping die
CN101750992A (en) General sequence control algorithm used in programmable logic controller
CN108829440B (en) Method and system for converting logic configuration array into logic execution command
JPS63273101A (en) Programmable controller
CN104750029A (en) Five-axis motion controller and control method thereof
CN105241011A (en) Air conditioner group control system development device and method
CN101710233A (en) Design method of motion controller based on RCP
JP2004280299A (en) Controller, developing device and system
CN106736071A (en) Welding system and welding system control method
KR20170086334A (en) Iot actuator terminal smart frame work
WO2000067083A1 (en) Method of programming motion controller
CN110262350B (en) Design method of building block type multi-singlechip control system with preset program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant