CN112486089A - Data processing method and device of programmable logic controller and computer equipment - Google Patents

Data processing method and device of programmable logic controller and computer equipment Download PDF

Info

Publication number
CN112486089A
CN112486089A CN202011455120.2A CN202011455120A CN112486089A CN 112486089 A CN112486089 A CN 112486089A CN 202011455120 A CN202011455120 A CN 202011455120A CN 112486089 A CN112486089 A CN 112486089A
Authority
CN
China
Prior art keywords
tab
configuration
target
register
user
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
CN202011455120.2A
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.)
Zhengzhou J&T Hi Tech Co Ltd
Original Assignee
Zhengzhou J&T Hi Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou J&T Hi Tech Co Ltd filed Critical Zhengzhou J&T Hi Tech Co Ltd
Priority to CN202011455120.2A priority Critical patent/CN112486089A/en
Publication of CN112486089A publication Critical patent/CN112486089A/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

Abstract

The application provides a data processing method and device of a programmable logic controller and computer equipment, wherein the method comprises the following steps: displaying a configuration interface, wherein the configuration interface is used for carrying out data configuration of the programmable logic controller, and the configuration interface comprises: the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab; responding to an operation of clicking a target tab by a user, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the numeric value input tab, the numeric value output tab, the input register tab and the holding register tab; and responding to the operation information of the user on the configuration item of the target tab, and generating and storing the configuration information corresponding to the target tab. The method reduces the complexity of configuration and improves the configuration efficiency.

Description

Data processing method and device of programmable logic controller and computer equipment
Technical Field
The present application relates to the field of programmable logic controllers, and in particular, to a data processing method and apparatus for a programmable logic controller, and a computer device.
Background
A Programmable Logic Controller (PLC) is a digital operation Controller for automation control, and the PLC may be composed of a CPU, an instruction and data memory, an input/output interface, a power supply, and a digital-to-analog conversion functional unit. The PLC may communicate with a Personal Computer (PC) via a serial port, and a user may read or write data from or to the PLC via an interface provided on the PC. The reading of data may include, for example, reading digital input data, reading input register data, reading holding register data, and the like, and the writing of data to the PLC may include, for example, writing digital output data, and the like. The user can input digital quantity, output digital quantity, input register and hold register configuration on the interface of the PC end, such as configuring the variable name corresponding to the address of the digital quantity input.
In the prior art, a PC terminal uses the same configuration page for digital input, digital output, an input register, and a holding register.
However, the method of the prior art causes the configuration process to be tedious and the configuration efficiency to be low.
Disclosure of Invention
An objective of the present application is to provide a method and an apparatus for processing data of a programmable logic controller, and a computer device, to solve the problems of complicated configuration process and low configuration efficiency in the prior art.
In a first aspect, an embodiment of the present application provides a data processing method for a programmable logic controller, including:
displaying a configuration interface, wherein the configuration interface is used for carrying out data configuration of the programmable logic controller, and the configuration interface comprises: the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab;
responding to an operation of clicking a target tab by a user, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the numeric value input tab, the numeric value output tab, the input register tab and the holding register tab;
and responding to the operation information of the user on the configuration item of the target tab, and generating and storing the configuration information corresponding to the target tab.
As an alternative implementation, the target tab is the input register tab or the holding register tab;
the method further comprises the following steps:
responding to the selection operation of a user for the configured register under the target tab, displaying a mapping interface, and displaying the mapping configuration items of the configured register on the mapping interface, wherein the mapping configuration items at least comprise: the device comprises a variable upper limit value, a variable lower limit value, a device upper limit value, a device lower limit value and a variable name;
and responding to the operation information of the mapping configuration item from the user, and generating and storing the mapping data corresponding to the configured register.
As an alternative implementation, the target tab is the input register tab or the holding register tab;
the responding to the operation of clicking the target tab by the user, and displaying the configuration item of the target tab on the configuration interface, wherein the method comprises the following steps:
responding to the operation of clicking a target tab by a user, displaying a configuration item of a target register on the configuration interface, wherein the target register is an input register or a holding register, and the configuration item of the target register at least comprises: and the address item of the target register and the variable name item corresponding to the target register.
As an optional implementation manner, the generating and storing configuration information corresponding to the target tab in response to operation information of the user on the configuration item of the target tab includes:
responding to the operation of inputting the address of the target register and the variable name corresponding to the target register by a user, and generating and storing the configuration information of the target register.
As an alternative implementation manner, the target tab is the digital input tab or the digital output tab;
the responding to the operation of clicking the target tab by the user, and displaying the configuration item of the target tab on the configuration interface, wherein the method comprises the following steps:
responding to the operation of clicking a target tab by a user, and displaying a corresponding configuration item on the configuration interface, wherein the corresponding configuration item at least comprises: the system comprises a configuration address item and a variable name item, wherein the configuration address item comprises an address item of digital quantity input or an address item of digital quantity output.
As an optional implementation manner, the generating and storing configuration information corresponding to the target tab in response to operation information of the user on the configuration item of the target tab includes:
and responding to the operation of inputting a configuration address and a variable name by a user, and generating configuration information of the digital quantity input or the digital quantity output.
As an optional implementation manner, the generating and storing configuration information corresponding to the target tab in response to operation information of the user on the configuration item of the target tab includes:
and responding to batch operation information of the configuration items of the target tab by the user, and generating a plurality of pieces of configuration information corresponding to the target tab.
In a second aspect, an embodiment of the present application provides a data processing apparatus for a programmable logic controller, including:
a display module, configured to display a configuration interface, where the configuration interface is used to configure data of a programmable logic controller, and the configuration interface includes: the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab; responding to an operation of clicking a target tab by a user, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab;
and the processing module is used for responding to the operation information of the user on the configuration item of the target tab and generating and storing the configuration information corresponding to the target tab.
As an alternative implementation, the target tab is the input register tab or the holding register tab;
the display module is further configured to:
responding to the selection operation of a user for the configured register under the target tab, displaying a mapping interface, and displaying the mapping configuration items of the configured register on the mapping interface, wherein the mapping configuration items at least comprise: the device comprises a variable upper limit value, a variable lower limit value, a device upper limit value, a device lower limit value and a variable name;
the processing module is further configured to:
and responding to the operation information of the mapping configuration item from the user, and generating and storing the mapping data corresponding to the configured register.
As an alternative implementation, the target tab is the input register tab or the holding register tab;
the display module is specifically configured to:
responding to the operation of clicking a target tab by a user, displaying a configuration item of a target register on the configuration interface, wherein the target register is an input register or a holding register, and the configuration item of the target register at least comprises: and the address item of the target register and the variable name item corresponding to the target register.
As an optional implementation manner, the processing module is specifically configured to:
responding to the operation of inputting the address of the target register and the variable name corresponding to the target register by a user, and generating and storing the configuration information of the target register.
As an alternative implementation manner, the target tab is the digital input tab or the digital output tab;
the display module is specifically configured to:
responding to the operation of clicking a target tab by a user, and displaying a corresponding configuration item on the configuration interface, wherein the corresponding configuration item at least comprises: the system comprises a configuration address item and a variable name item, wherein the configuration address item comprises an address item of digital quantity input or an address item of digital quantity output.
As an optional implementation manner, the processing module is specifically configured to:
and responding to the operation of inputting a configuration address and a variable name by a user, and generating configuration information of the digital quantity input or the digital quantity output.
As an optional implementation manner, the processing module is specifically configured to:
and responding to batch operation information of the configuration items of the target tab by the user, and generating a plurality of pieces of configuration information corresponding to the target tab.
In a third aspect, an embodiment of the present application provides a computer device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when a computer device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the data processing method of the programmable logic controller according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the data processing method of the programmable logic controller according to the first aspect.
According to the data processing method and device for the programmable logic controller and the computer equipment, different tabs are respectively set for a digital quantity input register, a digital quantity output register, an input register and a holding register on a configuration interface of the PC, a user clicks one tab and then displays a special configuration item of the tab, and the user can further realize configuration of configuration information through operation on the configuration items. Through the mode, the point positions of different types are independently configured, the configuration efficiency is improved, and the use experience of a user is further improved.
In addition, a mapping interface is provided for the input register or the holding register, a user can fill information of each mapping configuration item in the mapping interface, the PC can further generate and store mapping data corresponding to the register according to the input of the user, and the user can perform subsequent reading and writing of the register data, so that the configuration of the mapping from the PLC byte data to the PC-side communication variables is realized, and the user experience is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic system architecture diagram of a data processing method of a PLC provided in the present application;
fig. 2 is a schematic flowchart of a data processing method of a programmable logic controller according to an embodiment of the present application;
FIG. 3 is a first schematic interface diagram according to an embodiment of the present disclosure;
FIG. 4 is a second schematic interface diagram according to an embodiment of the present application;
FIG. 5 is a third schematic interface diagram according to an embodiment of the present application;
FIG. 6 is a fourth schematic interface diagram according to an embodiment of the present application;
FIG. 7 is a fifth schematic interface diagram according to an embodiment of the present application;
FIG. 8 is a sixth schematic interface view according to an embodiment of the present application;
FIG. 9 is a seventh exemplary interface diagram according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of a process of reading and writing point location data by a PC based on configuration information;
fig. 11 is a block diagram of a data processing apparatus of a programmable logic controller according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer device 120 according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
In the software interface of the PC terminal provided at present, the same configuration page is used for configuration of a digital quantity input, a digital quantity output, an input register and a holding register. However, the configuration modes required by the four information types during configuration may be different, and therefore, when a same page is used for configuring a plurality of information types requiring different requirements, the configuration process of a user becomes cumbersome, and configuration efficiency is low.
In addition, for the input register and the holding register, in actual use, the mapping of PLC byte data to the PC-side communication variables may need to be performed, so that when other devices use the data of the input register or the holding register, the other devices can use the data based on the PC-side communication variables. However, in the current PC-side software, a configuration function for mapping PLC byte data to PC-side communication variables is not provided, which results in a low user experience.
Based on the above problems, the embodiments of the present application provide a PLC data processing method, which provides independent configuration interfaces for digital input, digital output, an input register, and a holding register, and provides a mapping configuration from PLC byte data of the input register and the holding register to a PC-side communication variable, so that a user can conveniently configure PLC data, and user experience is greatly improved.
Fig. 1 is a schematic system architecture diagram of a data processing method of a PLC provided in the present application, and as shown in fig. 1, the method involves a PLC and a PC. The PC may include, for example: desktop computers, notebook computers, etc., PCs have computing capabilities and include display screens. Serial communication can be carried out between the PC and the PLC based on a specific communication protocol. Illustratively, the PC and the PLC can communicate through a serial communication protocol such as modbus, profibus, rs232 and the like.
Based on serial port communication, the PC can read point location data from or write point location data to the PLC. Specifically, the PC may also be connected to other electronic devices, or some processing software may be installed on the PC. After the PC reads the point location data from the PLC, the other electronic devices or processing software may read the point location data from the PC for subsequent processing, and/or the other electronic devices or processing software may set the point location data of the PLC and write the point location data into the PLC via the PC. The other electronic devices or the processing software request the PC to read point location data of the PLC or instruct the PC to write the point location data into the PLC by using a variable name configured at the PC end as an identifier of the point location, and after receiving the read request or the write instruction, the PC can learn, based on configuration information input by a user on a configuration interface of the PC, the point location that the electronic devices or the processing software need to read or write, and correspondingly read or write the data of the point location.
The following embodiments of the present application will describe in detail a process in which a user inputs configuration information based on a configuration interface of a PC, and a process in which the PC reads point location data from and writes point location data to the PLC based on the configuration information.
Before describing the technical solutions of the embodiments of the present application, technical terms related to the embodiments of the present application are explained first.
1. Point location
In a PLC, a point location may refer to the name of an acquisition point, which may correspond to a sensor, for example. One point location may correspond to an address that is distinct from other point locations and may be used to uniquely identify one point location.
In the following embodiments, the references to "addresses" each refer to an address to which a point bit corresponds.
2. Digital quantity input and digital quantity output
Digital quantities refer to discrete signals that vary intermittently in both time and value. In the PLC, the digital quantity input and the digital quantity output may include input and output of a switching quantity (high and low levels). For example: button digital input, coil digital output and the like. The PC can read the digital input dot data and write the digital output dot data.
3. Input register and holding register
An input register in the PLC may store the state of each input interface. The holding register may be a register that can be read or written by a communication command, typically some function control register or holding register or the like.
In the present application, the input register and the holding register may also be regarded as point locations, and the PLC may read point location data of the input register and hold point location data of the register.
It should be understood that the point location data described herein refers to the numerical values at the point locations.
First, a process in which a user inputs configuration information via a configuration interface of a PC will be described below.
Fig. 2 is a schematic flowchart of a data processing method of a programmable logic controller according to an embodiment of the present application, where an execution subject of the method is the PC. As shown in fig. 2, the method includes:
s201, displaying a configuration interface, wherein the configuration interface is used for carrying out data configuration of the programmable logic controller, and the configuration interface comprises: a digital quantity input tab, a digital quantity output tab, an input register tab, and a hold register tab.
Fig. 3 is a first interface schematic diagram of the embodiment of the present application, and as shown in fig. 3, a PC may display a configuration interface. In the configuration interface, four tabs of a digital quantity input tab, a digital quantity output tab, an input register tab and a holding register tab are displayed. The left-most digital quantity input tab is selected by default, and a user can click any other tab to switch.
S202, responding to the operation that a user clicks a target tab, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the numeric value input tab, the numeric value output tab, the input register tab and the holding register tab.
As described above, when the PC displays the configuration page, the leftmost digit quantity input tab is selected by default, that is, the customer is considered to have selected the digit quantity input tab by default, and in response to this default selection operation, with continued reference to fig. 3, the PC displays configuration items of the digit quantity input tab on the configuration interface, including: digital quantity input point location, address sequence number, variable name, variable value, point location value and description. The numerical value input point bit represents an address corresponding to the point location, the address serial number represents a number of the address corresponding to the numerical value input point location at the PC end, the variable name represents a variable name corresponding to the numerical value input point location at the PC end, that is, a name used by the electronic device or the processing software communicating with the PC, the variable value represents a value corresponding to the value of the numerical value input point location at the PC end, and the point location represents a value on the numerical value input point location in the PLC.
And after the user clicks other tabs, the PC correspondingly displays the configuration items of the other tabs.
S203, responding to the operation information of the user on the configuration item of the target tab, and generating and storing the configuration information corresponding to the target tab.
Optionally, the user may perform an add, modify, or delete operation on the configuration item to implement adding, modifying, or deleting the configuration information. The specific process will be described in detail in the following examples.
When the target page tag is a digital quantity input page tag, the configuration information corresponding to the target page tag is the configuration information of one or more digital quantity input point locations, when the target page tag is digital quantity output, the configuration information corresponding to the target page tag is the configuration information of one or more digital quantity output point locations, when the target page tag is an input register, the configuration information corresponding to the target page tag is the configuration information of one or more input registers, and when the target page tag is a holding register, the configuration information corresponding to the target page tag is the configuration information of one or more holding registers.
Continuing with fig. 3 as an example, after the user clicks the digital quantity input tab, the configuration item of the digital quantity input is displayed on the interface, and at the same time, the configuration information that the user has added is displayed under the configuration item. A row represents the configuration information of a digital quantity input point location, and a user can modify the added configuration information by modifying the value of a certain configuration item, or select a certain row to delete the configuration information corresponding to the row, or input the data of each configuration item in a new empty row to add the configuration information of a new digital quantity input point location.
After the user performs the operation and confirms, the PC may store the configuration information after the user operation in a local PLC communication file of the PC, and use the file in subsequent reading or writing of point location data.
In this embodiment, the PC sets different tabs for the digital quantity input, the digital quantity output, the input register, and the holding register on the configuration interface, and after a user clicks a tab, a configuration item specific to the tab is displayed, so that the user can configure the configuration information by operating the configuration item. Through the mode, the point positions of different types are independently configured, the configuration efficiency is improved, and the use experience of a user is further improved.
When the target tab is an input register tab or a holding register tab, the user may add configuration information of several input registers or configuration information of holding registers by performing step S203. On this basis, the user can configure the mapping data for these newly added input registers or holding registers. The following description will be specifically made.
Optionally, the method further includes:
responding to the selection operation of the user for the configured register under the target tab, displaying a mapping interface, and displaying the mapping configuration item of the configured register on the mapping interface, wherein the mapping configuration item at least comprises: a variable upper limit value, a variable lower limit value, a device upper limit value, a device lower limit value, and a variable name. And responding to the operation information of the mapping configuration item by the user, and generating and storing the mapping data corresponding to the configured register.
The above process is described below by taking the configuration interface of the input register as an example, and the configuration interface of the holding register may be the same as the configuration interface of the input register, which is not described separately.
Fig. 4 is a schematic view of an interface according to an embodiment of the present application, where as shown in fig. 4, after a user clicks a tab of an input register, a configuration item of the input register is displayed on the interface, and configuration information that has been added by the user is displayed, where the configuration item includes: configuration information of the input register AI0.0 and configuration information of the input register AI 0.1. Where AI0.0 and AI0.1 respectively represent the addresses of the input registers. Input registers AI0.0 and AI0.1 are configured registers. After the user selects one of the configured registers (for example, the selection input register AI0.0 in fig. 4), a mapping interface shown in fig. 5 and described below may pop up above the interface of fig. 4. Alternatively, the user may select the configuration register by double-clicking, single-click and determining, and the like.
Fig. 5 is a third interface schematic diagram of the embodiment of the present application, and as shown in fig. 5, a mapping configuration item of a configured register is displayed in a mapping interface, where the mapping configuration item includes: a variable upper limit value, a variable lower limit value, a device upper limit value, a device lower limit value, and a variable name. The upper limit value and the lower limit value of the variable form a variable value range of the PC end, and the upper limit value and the lower limit value of the equipment form a point value range of the PLC. The variable name defaults to the variable name of the input register when the user selects the input register, which the user can modify in fig. 5. The user can add a new empty line under the mapping interface and input the data of each configuration item in the line, and after the user fills and determines the data of the configuration items, the PC generates and stores the mapping data corresponding to the input register AI 0.0. After the PC reads the point location data of the input register AI0.0 from the PLC, the variable value on the PC can be obtained according to the mapping data and used by other electronic equipment or processing software. When the PC needs to write point location data into the input register AI0.0, a point location value on the PLC can be obtained according to the mapping data and written into the PLC.
In addition, for the interface illustrated in fig. 5, the user may also modify the added mapping data by modifying the value of a certain configuration item, or may also select a certain row to delete the mapping data corresponding to the row.
In this embodiment, a mapping interface is provided for the input register or the holding register, a user can fill information of each mapping configuration item in the mapping interface, and the PC can further generate and store mapping data corresponding to the register according to the input of the user, and enable the user to perform subsequent reading and writing of register data, thereby implementing configuration of mapping from PLC byte data to a communication variable at the PC end, and greatly improving user experience.
The specific execution of steps S202 and S203 will be described below.
First, a specific execution procedure of steps S202 and S203 when the target tab is the input register tab or the hold register tab will be described.
When the target tab is an input register tab or a holding register tab, and when the step S202 is executed, the PC may respond to an operation of clicking the target tab by a user, and display a configuration item of the target register on the configuration interface, where the target register is an input register or a holding register, and the configuration item of the target register at least includes: the address item of the target register and the variable value item corresponding to the target register. Accordingly, when the above step S203 is executed, the configuration information of the target register is generated and saved in response to the operation of inputting the address of the target register and the variable value corresponding to the target register by the user.
The above process is described below by taking the configuration interface of the input register as an example, and the configuration interface of the holding register may be the same as the configuration interface of the input register, which is not described separately.
Continuing with the example of the input register and with continuing reference to fig. 4, after the user clicks the tab of the input register, the PC displays the configuration items of the input register on the configuration interface, including: an address entry of the input register (shown in the interface as the input register) and a variable name entry of the input register. In addition, the configuration items may further include: address sequence number, variable value, point value, and description. The address item of the input register represents an address corresponding to the input register and is a unique identifier of the input register, the address serial number represents a number of the address corresponding to the input register at the PC end, the variable name represents a variable name corresponding to the input register at the PC end, namely, a name used by the electronic equipment or the processing software which is communicated with the PC, the variable value represents a value corresponding to the value of the input register at the PC end, and the point value represents a value on the input register in the PLC.
Furthermore, the user can input and confirm the data of each configuration item in the new empty row under the configuration item, that is, the configuration information of one input register can be added.
In addition, as illustrated in fig. 4, the PC may also display the added configuration information on the configuration interface, where a row represents the configuration information of one input register, and the user may also modify the added configuration information by modifying the value of a certain configuration item, or may select a certain row to delete the configuration information corresponding to the row, or may also input the data of each configuration item in a new empty row to add the configuration information of a new input register.
After the user performs the above operation and confirms, the PC may store the configuration information after the user operation in a local PLC communication file of the PC, and use the file in subsequent reading or writing of point location data.
Hereinafter, a specific execution procedure of steps S202 and S203 when the target tab is a digital quantity input tab or a digital quantity output tab will be described.
When the target tab is a numeric input tab or a numeric output tab, and the step S202 is executed, the PC may respond to an operation of clicking the target tab by a user, and display a corresponding configuration item on the configuration interface, where the corresponding configuration item at least includes: a configuration address item and a variable name item, wherein the configuration address item comprises an address item of digital quantity input or an address item of digital quantity output. Accordingly, when the above step S203 is executed, the configuration information of the digital quantity input or the digital quantity output is generated in response to the operation of inputting the configuration address and the variable name by the user.
The above process is described below by taking the configuration interface of the digital quantity input as an example, and the configuration interface of the digital quantity output may be the same as the configuration interface of the input register, and is not described separately.
Continuing with the example of numeric value input and with continuing reference to fig. 3, after the user clicks the tab of numeric value input, the PC displays the configuration items of numeric value input on the configuration interface, including: a configuration address item of digital input (displayed as a digital input point position in an interface) and a variable name item of digital input. In addition, the configuration items may further include: address sequence number, variable value, point value, and description. The configuration address item of the digital input represents an address corresponding to the digital input point location, and is a unique identifier of the digital input point location, the address serial number represents a serial number of an address corresponding to the digital input point location at a PC end, the variable name represents a variable name corresponding to the digital input point location at the PC end, namely a name used by the electronic equipment or processing software communicated with the PC, the variable value represents a value corresponding to the digital input point location at the PC end, and the point location value represents a point location value input by the digital in the PLC.
Furthermore, the user can input and confirm the data of each configuration item in the new empty row under the configuration item, that is, the configuration information of a digital quantity input point position can be newly added.
In addition, as illustrated in fig. 3, the PC may also display the added configuration information on the configuration interface, where a row represents the configuration information of one digital quantity input point location, and the user may also modify the added configuration information by modifying the value of a certain configuration item, or may select a certain row to delete the configuration information corresponding to the row, or may also input the data of each configuration item in a new empty row to add the configuration information of a new digital quantity input point location.
After the user performs the above operation and confirms, the PC may store the configuration information after the user operation in a local PLC communication file of the PC, and use the file in subsequent reading or writing of point location data.
As an alternative embodiment, the user may also implement batch configuration of digital quantity input, digital quantity output, input register or holding register by batch operation in the configuration interface.
Optionally, in step S203, the PC generates a plurality of configuration information corresponding to the target tab in response to the batch operation information of the configuration item of the target tab by the user.
It should be understood that one configuration information may refer to a row of information as illustrated in fig. 3 or fig. 4, which represents configuration information of one point location, and a plurality of configuration information represents configuration information of a plurality of point locations, for example, configuration information of a plurality of digital quantity input point locations, and configuration information of a plurality of input registers.
Optionally, the batch operation information on the configuration item of the target tab may include batch addition, batch modification, or batch deletion operations executed under the target tab.
The following describes a batch operation processing procedure by taking a batch operation under a digital quantity input tab as an example.
Fig. 6 is a fourth interface schematic diagram of the embodiment of the present application, as shown in fig. 6, under the numerical quantity input page tab, a user may trigger the PC to pop up a batch increase popup window of configuration information for batch increase numerical quantity input by selecting a right key or clicking a button, and two items of a "start address" and a "continuous quantity" are displayed in the popup window, where the "start address" indicates a start address of a numerical quantity input point to be batch increased at this time, and in fig. 6, the start address is generated by default by the PC, but in an actual application, the user may be allowed to edit, which is not specifically limited in this application. The "consecutive number" indicates the total number of the digital quantity input point bits to be added in batch at this time. After the user enters the consecutive number and clicks ok, the information of fig. 7 is displayed. Fig. 7 is a fifth interface schematic diagram according to an embodiment of the present application, as shown in fig. 7, after a user inputs a continuous number, the PC closes the pop-up window, adds and displays records of a continuous number of rows input by the user under a digital quantity input tab, where configuration items of "digital quantity input point locations" in each row of records are numbered sequentially from a start address in the pop-up window, and the user may respectively input information of other configuration items such as a variable name of each digital quantity input point location, or information of other configuration items such as variable names may also be automatically generated in the pop-up window according to a certain rule, for the newly added digital quantity input point locations.
Through the processing, the batch increase of the digital quantity input point positions is realized, and compared with a mode of increasing one by one, the efficiency of the batch increasing mode is greatly improved.
Fig. 8 is a sixth schematic interface diagram of the embodiment of the present application, fig. 9 is a seventh schematic interface diagram of the embodiment of the present application, and as shown in fig. 8 and fig. 9, under the tab of the numeric input page, the user selects multiple records, that is, selects configuration information of multiple numeric input point locations, and further, the user can click a right mouse button, and the interface pops up addition, modification, and deletion options, and the user can select a deletion option, and accordingly, the PC can delete the configuration information selected by the user according to the selection of the user. And as shown in fig. 9, configuration information of the remaining number amount input after deletion is displayed in the interface. It should be appreciated that the PC, when deleting configuration information, will also delete configuration information in the saved local PLC communication file in addition to deleting configuration information on the interface.
The batch modification mode may refer to the operation process during batch deletion, and is not described in detail. It should be noted that, during batch modification, the address sequence number, the variable name, and the like may be modified in batches, and modification of the entry of the digital quantity input point may not be allowed.
Hereinafter, a procedure in which the PC reads point location data from the PLC and writes point location data to the PLC based on the configuration information will be described.
As described above, after the user inputs the configuration information through the foregoing embodiments, the PC may save the configuration information in the local PLC communication file of the PC.
In an alternative, the PC may read point location data from the PLC and generate an external communication variable based on the saved configuration information corresponding to the target tab. The following first branch, third branch, and fourth branch are all embodiments for reading point location data from the PLC based on the stored configuration information corresponding to the target tab. In the third branch and the fourth branch, the PC also reads the mapping data corresponding to the input register or the holding register at the same time.
In another alternative, the PC may read the external communication variables and write the point location data into the PLC based on the stored configuration information corresponding to the target tab. The second branch described below is an example of reading an external communication variable and writing point data to the PLC based on the configuration information corresponding to the saved target tab.
Fig. 10 is a schematic flowchart of a process of reading and writing point location data by the PC based on the configuration information, and as shown in fig. 10, the process of reading and writing point location data by the PC based on the configuration information includes:
and S1001, loading the PLC communication file.
And S1002, loading configuration information of the digital quantity input point positions.
S1003, requesting to read the digital quantity input dot data.
And S1004, generating an external communication variable based on the configuration information of the digital quantity input point position.
Optionally, based on the configuration information of the digital input point location, the PC may obtain a variable name corresponding to the digital input point location, and may further use a variable value corresponding to a point bit value of each read digital input point location as a variable value corresponding to the variable name and write the variable value into the external communication variable. The variable value corresponding to the point location value may be the point location value, or may refer to a variable value obtained by the point location value according to a certain mapping relationship.
Alternatively, the external communication variables may be used directly by the aforementioned electronic device or processing software.
The above steps S1002 to S1004 are branches of digital quantity input, referred to as a first branch.
And S1005, loading configuration information of the digital quantity output point positions.
And S1006, reading an external communication variable and requesting to write digital quantity output dot data to the PLC.
Alternatively, if the external communication variable changes, the PC can read the external communication variable and request the PLC to write digital output dot data.
And S1007, writing the data of the digital output point bits into the PLC based on the configuration information of the digital output point bits.
Optionally, based on the configuration information of the digital output point location, the PC may learn the digital output point location of the PLC corresponding to the variable name in the external communication variable, and then may write the point location value corresponding to the variable value of the variable name into the digital output point location of the PLC. The point bit value corresponding to the variable value may be the value of the variable or the point bit value obtained by the variable value according to a certain mapping relationship.
The above steps S1005-S1007 are branches of digital quantity output, referred to as a second branch.
And S1008, loading configuration information of the input register.
S1009 loads the mapping data corresponding to the input register.
And S1010, requesting to read the point location data of the input register.
S1011, generating an external communication variable based on the configuration information of the input register and the mapping data corresponding to the input register.
Optionally, based on the configuration information of the input register, the PC may learn a variable name corresponding to the input register, and further, based on the mapping data corresponding to the input register, may learn whether the PLC data meets the mapping conversion condition, and if not, take the read point value of the input register as a variable value corresponding to the variable name and write the point value into the external communication variable. And if the mapping conversion condition is met, processing the read point position value of the input register according to the mapping data, then taking the point position value as a variable value corresponding to the variable name, and writing the variable value into the external communication variable.
The above steps S1008 to S1011 are branches of digital quantity output, and are referred to as a third branch.
S1012, loading the configuration information of the holding register.
And S1013, loading the mapping data corresponding to the holding register.
And S1014, requesting to read and hold the register point bit data.
S1015, generates the external communication variable based on the configuration information of the holding register and the mapping data corresponding to the holding register.
Optionally, based on the configuration information of the holding register, the PC may learn a variable name corresponding to the holding register, and further, based on the mapping data corresponding to the holding register, may learn whether the PLC data meets the mapping conversion condition, and if not, the read point value of the holding register is used as a variable value corresponding to the variable name and written into the external communication variable. And if the mapping conversion condition is met, processing the read point position value of the holding register according to the mapping data, then taking the point position value as a variable value corresponding to the variable name, and writing the variable value into the external communication variable.
The above steps S1008 to S1015 are branches of digital quantity output, and are referred to as a fourth branch.
Optionally, the first branch, the second branch, the third branch, and the fourth branch are branches executed independently, and each branch may be executed according to a specific cycle.
Based on the same inventive concept, the embodiment of the present application further provides a data processing apparatus of a programmable logic controller corresponding to the data processing method of the programmable logic controller, and since the principle of the apparatus in the embodiment of the present application for solving the problem is similar to the data processing method of the programmable logic controller described above in the embodiment of the present application, the implementation of the apparatus may refer to the implementation of the method, and repeated details are omitted.
Fig. 11 is a block diagram of a data processing apparatus of a programmable logic controller according to an embodiment of the present application, and as shown in fig. 11, the apparatus includes:
a display module 1101, configured to display a configuration interface, where the configuration interface is used to perform data configuration of a programmable logic controller, and the configuration interface includes: the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab; and responding to the operation of clicking a target tab by a user, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the numeric value input tab, the numeric value output tab, the input register tab and the holding register tab.
The processing module 1102 is configured to respond to operation information of the user on the configuration item of the target tab, and generate and store configuration information corresponding to the target tab.
As an alternative embodiment, the target tab is the input register tab or the holding register tab.
The display module 1101 is further configured to:
responding to the selection operation of a user for the configured register under the target tab, displaying a mapping interface, and displaying the mapping configuration items of the configured register on the mapping interface, wherein the mapping configuration items at least comprise: a variable upper limit value, a variable lower limit value, a device upper limit value, a device lower limit value, and a variable name.
The processing module 1102 is further configured to:
and responding to the operation information of the mapping configuration item from the user, and generating and storing the mapping data corresponding to the configured register.
As an alternative embodiment, the target tab is the input register tab or the holding register tab.
The display module 1101 is specifically configured to:
responding to the operation of clicking a target tab by a user, displaying a configuration item of a target register on the configuration interface, wherein the target register is an input register or a holding register, and the configuration item of the target register at least comprises: and the address item of the target register and the variable name item corresponding to the target register.
As an optional implementation, the processing module 1102 is specifically configured to:
responding to the operation of inputting the address of the target register and the variable name corresponding to the target register by a user, and generating and storing the configuration information of the target register.
As an alternative embodiment, the target tab is the digital input tab or the digital output tab.
The display module 1101 is specifically configured to:
responding to the operation of clicking a target tab by a user, and displaying a corresponding configuration item on the configuration interface, wherein the corresponding configuration item at least comprises: the system comprises a configuration address item and a variable name item, wherein the configuration address item comprises an address item of digital quantity input or an address item of digital quantity output.
As an optional implementation, the processing module 1102 is specifically configured to:
and responding to the operation of inputting a configuration address and a variable name by a user, and generating configuration information of the digital quantity input or the digital quantity output.
As an optional implementation, the processing module 1102 is specifically configured to:
and responding to batch operation information of the configuration items of the target tab by the user, and generating a plurality of pieces of configuration information corresponding to the target tab.
An embodiment of the present application further provides a computer device 120, as shown in fig. 12, which is a schematic structural diagram of the computer device 120 provided in the embodiment of the present application, and includes: a processor 121, a memory 122, and a bus 123. The memory 122 stores machine-readable instructions (such as execution instructions corresponding to the display module and the processing module in the apparatus of fig. 11) executable by the processor 121, when the computer device 120 runs, the processor 121 and the memory 122 communicate via the bus 123, and the machine-readable instructions are executed by the processor 121 to perform the method steps in the above method embodiments.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program executes the steps of the data processing method of the programmable logic controller.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A data processing method of a programmable logic controller is characterized by comprising the following steps:
displaying a configuration interface, wherein the configuration interface is used for carrying out data configuration of the programmable logic controller, and the configuration interface comprises: the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab;
responding to an operation of clicking a target tab by a user, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the numeric value input tab, the numeric value output tab, the input register tab and the holding register tab;
and responding to the operation information of the user on the configuration item of the target tab, and generating and storing the configuration information corresponding to the target tab.
2. The method of claim 1, wherein the target tab is the input register tab or a holding register tab;
the method further comprises the following steps:
responding to the selection operation of a user for the configured register under the target tab, displaying a mapping interface, and displaying the mapping configuration items of the configured register on the mapping interface, wherein the mapping configuration items at least comprise: the device comprises a variable upper limit value, a variable lower limit value, a device upper limit value, a device lower limit value and a variable name;
and responding to the operation information of the mapping configuration item from the user, and generating and storing the mapping data corresponding to the configured register.
3. The method of claim 1, wherein the target tab is the input register tab or a holding register tab;
the responding to the operation of clicking the target tab by the user, and displaying the configuration item of the target tab on the configuration interface, wherein the method comprises the following steps:
responding to the operation of clicking a target tab by a user, displaying a configuration item of a target register on the configuration interface, wherein the target register is an input register or a holding register, and the configuration item of the target register at least comprises: and the address item of the target register and the variable name item corresponding to the target register.
4. The method according to claim 3, wherein the generating and saving the configuration information corresponding to the target tab in response to the operation information of the user on the configuration item of the target tab comprises:
responding to the operation of inputting the address of the target register and the variable name corresponding to the target register by a user, and generating and storing the configuration information of the target register.
5. The method according to any one of claims 1-4, wherein the target tab is the digital-quantity input tab or the digital-quantity output tab;
the responding to the operation of clicking the target tab by the user, and displaying the configuration item of the target tab on the configuration interface, wherein the method comprises the following steps:
responding to the operation of clicking a target tab by a user, and displaying a corresponding configuration item on the configuration interface, wherein the corresponding configuration item at least comprises: the system comprises a configuration address item and a variable name item, wherein the configuration address item comprises an address item of digital quantity input or an address item of digital quantity output.
6. The method of claim 5, wherein the generating and saving the configuration information corresponding to the target tab in response to the operation information of the user on the configuration item of the target tab comprises:
and responding to the operation of inputting a configuration address and a variable name by a user, and generating configuration information of the digital quantity input or the digital quantity output.
7. The method according to any one of claims 1 to 4, wherein the generating and saving the configuration information corresponding to the target tab in response to the operation information of the user on the configuration item of the target tab comprises:
and responding to batch operation information of the configuration items of the target tab by the user, and generating a plurality of pieces of configuration information corresponding to the target tab.
8. A data processing apparatus of a programmable logic controller, comprising:
a display module, configured to display a configuration interface, where the configuration interface is used to configure data of a programmable logic controller, and the configuration interface includes: the digital quantity input tab, the digital quantity output tab, the input register tab and the holding register tab; and the number of the first and second groups,
responding to an operation of clicking a target tab by a user, and displaying a configuration item of the target tab on the configuration interface, wherein the target tab is any one of the numeric value input tab, the numeric value output tab, the input register tab and the holding register tab;
and the processing module is used for responding to the operation information of the user on the configuration item of the target tab and generating and storing the configuration information corresponding to the target tab.
9. A computer device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the computer device is running, the processor executing the machine-readable instructions to perform the steps of the data processing method of the programmable logic controller according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the data processing method of a programmable logic controller according to any one of claims 1 to 7.
CN202011455120.2A 2020-12-10 2020-12-10 Data processing method and device of programmable logic controller and computer equipment Pending CN112486089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011455120.2A CN112486089A (en) 2020-12-10 2020-12-10 Data processing method and device of programmable logic controller and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011455120.2A CN112486089A (en) 2020-12-10 2020-12-10 Data processing method and device of programmable logic controller and computer equipment

Publications (1)

Publication Number Publication Date
CN112486089A true CN112486089A (en) 2021-03-12

Family

ID=74916713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011455120.2A Pending CN112486089A (en) 2020-12-10 2020-12-10 Data processing method and device of programmable logic controller and computer equipment

Country Status (1)

Country Link
CN (1) CN112486089A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1469254A (en) * 2002-06-07 2004-01-21 ���µ�����ҵ��ʽ���� Processor apparatus, information processor using the same, compiling apparatus and method thereof
CN104618146A (en) * 2015-01-04 2015-05-13 上海雷尼威尔技术有限公司 Input and output configurable safety device control system and method
CN106647419A (en) * 2017-02-22 2017-05-10 南京国电南自电网自动化有限公司 Matrix mapping method for hardware channel of relay protection device
CN107209492A (en) * 2015-01-22 2017-09-26 三菱电机株式会社 Programmable logic controller (PLC) sets file generated servicing unit
CN107391914A (en) * 2017-07-06 2017-11-24 沈阳东软医疗系统有限公司 A kind of method for displaying parameters, device and equipment
CN108064104A (en) * 2018-01-09 2018-05-22 广东扬光照明科技有限公司 City converts LED light Lighting Control Assembly
CN111381879A (en) * 2018-12-31 2020-07-07 华为技术有限公司 Data processing method and device
CN111813613A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Test management method, test management device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1469254A (en) * 2002-06-07 2004-01-21 ���µ�����ҵ��ʽ���� Processor apparatus, information processor using the same, compiling apparatus and method thereof
CN104618146A (en) * 2015-01-04 2015-05-13 上海雷尼威尔技术有限公司 Input and output configurable safety device control system and method
CN107209492A (en) * 2015-01-22 2017-09-26 三菱电机株式会社 Programmable logic controller (PLC) sets file generated servicing unit
CN106647419A (en) * 2017-02-22 2017-05-10 南京国电南自电网自动化有限公司 Matrix mapping method for hardware channel of relay protection device
CN107391914A (en) * 2017-07-06 2017-11-24 沈阳东软医疗系统有限公司 A kind of method for displaying parameters, device and equipment
CN108064104A (en) * 2018-01-09 2018-05-22 广东扬光照明科技有限公司 City converts LED light Lighting Control Assembly
CN111381879A (en) * 2018-12-31 2020-07-07 华为技术有限公司 Data processing method and device
CN111813613A (en) * 2020-07-20 2020-10-23 网易(杭州)网络有限公司 Test management method, test management device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP4982020B2 (en) Graphical programming system with distributed block diagram execution and user interface display
CN107678988A (en) A kind of multifunctional serial port device and implementation method
CN112445729B (en) Operation address determination method, PCIe system, electronic device and storage medium
US20220317185A1 (en) Pattern generation system with pin function mapping
CN110989487B (en) PLC initialization method and device for industrial server and readable storage medium
CN104536812A (en) LabVIEW-based dynamic link library calling method
CN111124094A (en) Server hard disk power-on and power-off control method, control device and control equipment
US20150161068A1 (en) Address Range Decomposition
CN112486089A (en) Data processing method and device of programmable logic controller and computer equipment
CN112446625A (en) Process line generation system, method, platform and storage medium
JP2003044108A (en) Registering device for editor, registering program, and recording medium where the same is recorded
CN103902298A (en) Instruction set firmware recovery state information setting method and device
CN113031947A (en) Configuration data management method and device used in interface design tool
CN113778401A (en) Page generation method and device
CN113821219A (en) Method and system for realizing application program containerization
JP4282961B2 (en) System that defines data input / output in the controller
CN101859307A (en) Keyboard-screen-mouse switcher, computer system and file searching method
CN116126366B (en) Chip input/output interface configuration method, device, medium and electronic equipment
CN116186816B (en) Rotary machine parameter display method, storage medium and electronic device
EP3933523A1 (en) Engineering device, engineering method, and program
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN109902278B (en) Annotating processing method and device
CN117348919A (en) Information configuration method, information configuration device, computer equipment and storage medium
CN113204339A (en) Visual programming method, device, equipment and medium for chip
CN114138276A (en) Page compiling method and device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210312

RJ01 Rejection of invention patent application after publication