CN114721712B - Task execution method and device, electronic equipment and storage medium - Google Patents

Task execution method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114721712B
CN114721712B CN202210643886.6A CN202210643886A CN114721712B CN 114721712 B CN114721712 B CN 114721712B CN 202210643886 A CN202210643886 A CN 202210643886A CN 114721712 B CN114721712 B CN 114721712B
Authority
CN
China
Prior art keywords
signal
determining
block
configuration
program block
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
CN202210643886.6A
Other languages
Chinese (zh)
Other versions
CN114721712A (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.)
Beijing Jingdiao Group Co Ltd
Original Assignee
Beijing Jingdiao Group 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 Beijing Jingdiao Group Co Ltd filed Critical Beijing Jingdiao Group Co Ltd
Priority to CN202210643886.6A priority Critical patent/CN114721712B/en
Publication of CN114721712A publication Critical patent/CN114721712A/en
Application granted granted Critical
Publication of CN114721712B publication Critical patent/CN114721712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention relates to the technical field of automation control, and provides a task execution method, a task execution device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a device program block of each type of external device; determining a configuration signal of the target external device according to a configuration file of the target external device in the task to be executed; determining mapping information of each configuration signal and input/output (I/O) signals in each equipment program block, and determining a target equipment program block from each equipment program block according to the mapping information; and executing the task to be executed according to the target equipment program block. According to the invention, the device program block is predefined, and the target device program block is determined based on signal mapping matching, so that the PLC program is prevented from being rewritten, debugged and maintained, a large amount of PLC program processing time is saved, and the task execution efficiency is improved.

Description

Task execution method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of automation control technologies, and in particular, to a method and an apparatus for task execution, an electronic device, and a storage medium.
Background
At present, various external devices need to be connected to an automation system, and due to different external devices, different I/O (Input/Output) signal arrangements of the external devices, and different Logic requirements for signal processing, a large number of PLC (Programmable Logic Controller) programs need to be written, and the writing, debugging and maintenance workload of the PLC programs is large, which requires a large amount of time. Generally, when a new task is executed, I/O signals need to be matched again, and a PLC program needs to be partially rewritten or rewritten, so that the task execution efficiency is low.
Disclosure of Invention
The invention provides a task execution method, a task execution device, an electronic device and a storage medium, which are used for solving the problem of low task execution efficiency caused by the fact that an I/O signal needs to be re-matched and a PLC program needs to be partially rewritten or rewritten when a new task is executed.
The invention provides a task execution method, which comprises the following steps:
determining a device program block of each type of external device;
determining a configuration signal of a target external device according to a configuration file of the target external device in a task to be executed;
determining mapping information of each configuration signal and input/output (I/O) signals in each device program block, and determining a target device program block from each device program block according to the mapping information;
and executing the task to be executed according to the target equipment program block.
In one embodiment, the determining mapping information of each of the configuration signals to input/output I/O signals in each of the device blocks includes:
acquiring the address offset of each configuration signal according to the configuration file;
and determining mapping information of each configuration signal and the I/O signals in the equipment program blocks according to the address offset of each configuration signal.
In one embodiment, before determining mapping information of each of the configuration signals to input/output I/O signals in the device block, the method further comprises:
determining ordering information of the configuration signal;
determining the mapping sequence of the configuration signals according to the sequencing information;
and mapping each configuration signal with the I/O signals in each device program block according to the mapping sequence.
In one embodiment, the determining the device block of each type of external device includes:
determining the logic relation of the I/O signals of each type of external equipment;
and determining the device program block of each type of the external device according to the logic relation of the I/O signals.
In one embodiment, after determining mapping information of each of the configuration signals to input/output I/O signals in the device block, the method further comprises:
if the target device program block is not determined from the device program blocks according to the mapping information, determining the device program block of the target external device according to the logical relationship of the configuration signal;
or, the device program block is adjusted according to the configuration signal, so as to obtain the device program block of the target external device.
In an embodiment, before determining the configuration signal of the target external device according to the configuration file of the target external device in the task to be executed, the method further includes:
determining an I/O signal of the target external device;
configuring the I/O signal of the target external equipment according to the digit number of the I/O signal to obtain the configuration signal;
or configuring the I/O signal of the target external device according to the byte number of the I/O signal to obtain the configuration signal.
In one embodiment, after determining the device block of each type of the external device according to the logical relationship of the I/O signals, the method includes:
and determining an I/O signal table of each equipment program block, and associating the I/O signal table with the corresponding equipment program block.
The present invention also provides a task execution device, including:
the first determining module is used for determining the device program block of each type of external device;
the second determining module is used for determining a configuration signal of the target external device according to the configuration file of the target external device in the task to be executed;
a third determining module, configured to determine mapping information between each configuration signal and an input/output I/O signal in each device block, and determine a target device block from each device block according to the mapping information;
and the execution module is used for executing the task to be executed according to the target equipment program block.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the task execution method.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of task execution as described in any of the above.
The invention provides a task execution method, a task execution device, electronic equipment and a storage medium, wherein equipment program blocks of each type of external equipment are determined; determining a configuration signal of the target external device according to a configuration file of the target external device in the task to be executed; determining mapping information of each configuration signal and input/output (I/O) signals in each equipment program block, and determining a target equipment program block from each equipment program block according to the mapping information; and executing the task to be executed according to the target equipment program block. According to the invention, the device program block is predefined, and the target device program block is determined based on signal mapping matching, so that the PLC program is prevented from being rewritten, debugged and maintained, a large amount of PLC program processing time is saved, and the task execution efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow chart of a task execution method provided by the present invention;
FIG. 2 is a second flowchart of a task execution method according to the present invention;
FIG. 3 is a third schematic flowchart of a task execution method provided by the present invention;
FIG. 4 is a fourth flowchart illustrating a task execution method according to the present invention;
FIG. 5 is a schematic diagram of a task execution device according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A task execution method, apparatus, electronic device, and storage medium of the present invention are described below with reference to fig. 1 to 6.
Specifically, the present invention provides a task execution method, and referring to fig. 1, fig. 1 is one of the flow diagrams of the task execution method provided by the present invention.
The task execution method provided by the embodiment of the invention comprises the following steps:
step S10, determining the device program block of each type of external device;
it should be noted that PLC programming is an electronic system for digital arithmetic operations, and is designed for application in an industrial environment.
In the embodiment of the present invention, the device program block of each type of external device needs to be determined in advance, specifically, the logical relationship of the I/O signals of each type of external device is determined, and then the device program block of each type of external device is determined according to the logical relationship of the I/O signals. It will be understood that the device program block includes the PLC program of the device as well as the I/O signals of the device. The I/O signals refer to input signals and output signals, and the logical relationship of the I/O signals refers to a plurality of input signals calculating a plurality of corresponding output results, wherein the logical relationship between the signals is relatively complex, and the logical relationship can be determined according to the logical requirements between the signals, which is not limited herein.
For example, a function analysis is performed on an existing PLC application, a common part of each external device is extracted based on a function analysis result, and the external devices having the common part are defined as the same type of external device, for example, a panel closely related to a model is defined as a panel device, for example, an MCP panel, an operation panel of a teach pendant, or the like. Further, the I/O signal of each type of external device and the logical relationship of the I/O signal are determined, for example, signals such as a positive/negative limit signal related to the axis, an origin signal, whether to go back to the origin signal, an up/down electric signal, and whether to enter the Ready signal are used as basic signals of the axis device. And taking basic signals related to the channels of the shaft group as a group of channel basic equipment signals, such as channel state signals, program running state signals and the like. Signals related to power-on and power-off of the system and emergency stop are used as a group of signals, such as a signal to be powered on, a signal to be powered on successfully, an emergency stop signal and the like. In addition, signals related to common external equipment are determined, such as a push-out action signal, a return action signal and a push-to-place signal and a return-to-place signal related to the action and the state of the cylinder; whether a signal is present for material in connection with a material inspection; refrigerant related device ready, device alarm, device power on, device start, device stop, etc.
After determining the logical relationship of the I/O signals, determining the device program block of each type of external device based on the logical relationship of the I/O signals, for example, programming the logical relationship of the I/O signals of the external device by using a preset programming language (e.g., C language, C + + language) to obtain a logical relationship program effective for the I/O signals, thereby forming a device program block, wherein each device program block can carry a device name of the corresponding external device, so as to facilitate subsequent identification of the device program block, thereby improving the identification efficiency of the device program block.
According to the embodiment of the invention, the device program block of each type of external device is predetermined through the logic relation of the I/O signals, and the PLC program is prevented from being rewritten, debugged and maintained when a new task is executed, so that a large amount of PLC program processing time is saved, and the task execution efficiency is improved.
Step S20, determining the configuration signal of the target external device according to the configuration file of the target external device in the task to be executed;
it should be noted that the target external devices are external devices required to execute the task to be executed, where each target external device corresponds to a configuration file, and the configuration file includes a pre-configured signal, that is, a configuration signal, where the configuration signal refers to an actual I/O signal of the device. Therefore, the configuration signal of the target external device can be determined according to the configuration file of the target external device in the task to be executed.
Step S30, determining mapping information between each of the configuration signals and an input/output I/O signal in each of the device blocks, and determining a target device block from each of the device blocks according to the mapping information;
it should be noted that, in the configuration software provided in the embodiment of the present invention, the device corresponding to the predefined device program block is selected by the user, the selected device is displayed on the left side of the configuration interface in the form of a tree list, then the configuration signal of the target external device is displayed on the right side of the configuration interface, and the target device program block is determined by mapping and matching the configuration signal on the right side of the configuration interface and the I/O signal on the left side of the configuration interface.
Specifically, configuration signals of each target external device are determined from a configuration file, each configuration signal is mapped and matched with I/O signals in a predefined device program block one by one, namely, an actual I/O signal is mapped and matched with the I/O signals in the device program block, then the I/O signal mapped by each configuration signal is determined, and finally, the target device program block is determined from each device program block according to the mapped I/O signals, wherein the mapping information refers to the I/O signals mapped by each configuration signal. It will be understood that if the configuration signal can match the I/O signal mapping in the predefined device block, the device block corresponding to the I/O signal is taken as the target device block, i.e. the target device block refers to the block matching the predefined device block.
Further, the determining mapping information of each configuration signal and the input/output I/O signal in each device block includes:
step S31, obtaining the address offset of each configuration signal according to the configuration file;
step S32, determining mapping information between each configuration signal and the I/O signal in each device block according to the address offset of each configuration signal.
In the embodiment of the present invention, the address offset of each configuration signal is obtained according to the configuration file, and then the mapping information between each configuration signal and the I/O signal in each device block is determined according to the address offset of each configuration signal, that is, the I/O signal mapped by each configuration signal is determined, where it is understood that the address offset refers to a byte offset and a word bit offset. For example, suppose that two devices, namely cyl1[ cylinder ] and cyl2[ cylinder ], are added under Chan01 in the tree list corresponding to the channel device, wherein cyl1[ cylinder ] and cyl2[ cylinder ] include several signals under the following conditions:
cyl1[ cylinder ]
  [IN]Chan01Cyl1:CylPushok[%IX138.0];
  [IN]Chan01Cyl1:CylPullOk[%IX141.6];
  [OUT]Chan0lCyl1:Cy1Push[%QX142.0];
  [OUT]Chan01Cyl1:CylPul1;
Cyl2[ Cylinder ]
  [IN]Chan01Cyl2:Cy1PushOk;
  [IN]Chan0lCyl2:CylPul1Ok;
  [OUT]chan01Cyl2:CylPush;
  [OUT]chan0lCyl2:CylPul1;
The configuration signal information is displayed in tabular form on the right side of the configuration interface, as shown in table 1:
TABLE 1
Figure 411430DEST_PATH_IMAGE001
As can be seen from table 1, the address, type, name and signal name of the configuration signal are included in the configuration file, and after determining the address offset of the configuration signal, the mapped I/O signal is determined based on the address offset. For example, the first address% IX141.6 in table 1 matches the address map of the input signal CylPullOk of cyl1[ cylinder ], i.e. the configuration signal matches the input signal CylPullOk map of cyl1[ cylinder ], where% IX141.6 represents an offset of 141 bytes, i.e. a byte offset of 141; the third address% QX142.0 in table 1 matches the address map of the output signal Cy1Push of cyl1[ cylinder ], i.e. the configuration signal matches the address map of the output signal Cy1Push of cyl1[ cylinder ], where% QX142.0 represents an offset of 140 bytes, i.e. a byte offset of 140.
According to the embodiment of the invention, the I/O signal mapped by each configuration signal is determined according to the address offset of each configuration signal, so that the time for signal mapping matching can be reduced, the efficiency of signal mapping matching is improved, and the accuracy of signal mapping matching can be improved.
Further, before determining mapping information between each of the configuration signals and input/output I/O signals in the device block, the method further includes:
step S33, determining the sorting information of the configuration signal;
step S34, determining the mapping order of the configuration signals according to the sorting information;
step S35, mapping each configuration signal with the I/O signal in each device block according to the mapping order.
It should be noted that the I/O signals of each external device have a specific ordering, and based on this, the I/O signals in the predefined device block also have a specific ordering, so if the configuration signal of the target external device is not consistent with the ordering of the I/O signals in the predefined device block, the ordering of the I/O signals in the predefined device block needs to be adjusted in the process of signal mapping matching.
Specifically, the sequencing information of the configuration signals is determined based on the configuration file, then the mapping sequence of the configuration signals is determined according to the sequencing information, and finally each configuration signal is mapped with the I/O signals in each device program block according to the mapping sequence. For example, assuming that the input signals of the predefined device block and the signal sequence are signals A, B, C, the configuration signal of the target external device includes the input signal A, B, C, but the signal sequence thereof is C, B, A, so in order to ensure the consistency of the signal sequence, the sequence of the signal mapping matching is set to C, B, A in the signal mapping matching process, based on which the sequence of the input signals of the predefined device block can be adjusted, and then the PLC program in the signal adjusted device block is executed.
It should be noted that, assuming that the I/O signal ordering of the device block is consistent with the I/O signal ordering of the configuration signal, but the number of the signals is different, the I/O signal of the device block may be adjusted, for example, assuming that the I/O signal of the device block is A, B, C and the configuration signal is A, B, C, D, at this time, the signal D needs to be added to the device block; assuming that the I/O signal for the device block is A, B, C, D and the configure signal is A, B, C, then the unconfigured signal D may have a default input of 0 at all times.
According to the embodiment of the invention, the signal sequence of the equipment program block is adjusted in the signal mapping matching process, so that the signal sequence of the equipment program block meets the sequence of the configuration signals, and the PLC program is prevented from being rewritten, thereby saving a large amount of PLC program processing time, improving the PLC compiling efficiency and further improving the task execution efficiency.
And step S40, executing the task to be executed according to the target device program block.
And after the target equipment program block is determined, directly executing the PLC program in the equipment program block, thereby completing the execution of the task to be executed.
According to the task execution method provided by the embodiment of the invention, the equipment program block of each type of external equipment is determined; determining a configuration signal of the target external device according to a configuration file of the target external device in the task to be executed; determining mapping information of each configuration signal and input/output (I/O) signals in each equipment program block, and determining a target equipment program block from each equipment program block according to the mapping information; and executing the task to be executed according to the target equipment program block. Based on this, if the configuration signal of the target external device can be mapped and matched with the I/O signal in the predefined device program block, the PLC program in the predefined device program block can be directly executed, thereby avoiding rewriting, debugging and maintaining the PLC program, thereby saving a large amount of PLC program processing time and improving the task execution efficiency.
Referring to fig. 2, fig. 2 is a second schematic flowchart of a task execution method provided by the present invention, in the task execution method provided by the embodiment of the present invention, after determining mapping information between each configuration signal and an input/output I/O signal in the device block, the method further includes:
step S50, if the target device block is not determined from the device blocks according to the mapping information, determining the device block of the target external device according to the logical relationship of the configuration signal;
and step S60, adjusting the device program block according to the configuration signal to obtain the device program block of the target external device.
It should be noted that if the predefined device block does not meet the requirement, at this time, an additional device block may be developed by itself or the predefined device block may be modified.
Specifically, if the target device block, that is, the device block which does not satisfy the requirement, is not determined from the device blocks according to the mapping information, at this time, the device block of the target external device may be determined according to the logical relationship of the configuration signal, for example, the logical relationship of the configuration signal is programmed by using a preset programming language (e.g., C language, C + + language), so as to obtain a logical relationship program which takes effect on the configuration signal, thereby forming one device block. Alternatively, the device block is adjusted according to the configuration signal to obtain the device block of the target external device, for example, adding a signal, adding a logic processing program, and the like.
According to the embodiment of the invention, when the target device program block is not determined based on the configuration signal, an additional device program block can be developed by self, or the predefined device program block is improved, so that the program corresponding to the target external device can be normally executed, and meanwhile, the programming efficiency of the PLC can be improved by directly improving the predefined device program block.
Referring to fig. 3, fig. 3 is a third schematic flowchart of a task execution method provided by the present invention, in the task execution method provided by the embodiment of the present invention, before determining a configuration signal of a target external device according to a configuration file of the target external device in a task to be executed, the method further includes:
step S21, determining an I/O signal of the target external device;
step S22, configuring the I/O signal of the target external device according to the digit of the I/O signal to obtain the configuration signal;
and step S23, configuring the I/O signal of the target external device according to the byte number of the I/O signal to obtain the configuration signal.
It should be noted that the number of bits or bytes corresponding to each I/O signal may be different, and therefore, the signals may be configured based on the number of bits or bytes. Specifically, an I/O signal of the target external device is determined, and then the I/O signal of the target external device is configured according to a word bit number of the I/O signal to obtain a configuration signal, or the I/O signal of the target external device is configured according to a byte number of the I/O signal to obtain the configuration signal. For example, the I/O signals are configured according to the intended use of a single word bit, or a plurality of word bits, or a plurality of bytes, it is understood that most PLC signals are used according to word bits, such as up and down signals, on and off signals, start and stop signals, and the like. Some PLC signals can be realized by combining multiple bits, for example, the selection of the channel and shaft motion multiplying power requires 4-5 bits to define different multiplying power gears. Some PLC signals need to be used according to a plurality of bytes, for example, pulse number information of a hand wheel of a demonstrator or some special hand wheel needs to be configured according to two bytes, and other digital values obtained by analog quantity conversion with higher precision also need to be configured according to a plurality of bytes.
According to the embodiment of the invention, the configuration signal is obtained by configuring the I/O signal of the target external device by adopting the digit number or the byte number of the I/O signal, so that different I/O signals can be configured based on the digit number or the byte number, and meanwhile, the signal configuration efficiency can be improved.
Referring to fig. 4, fig. 4 is a fourth schematic flowchart of a task execution method provided by the present invention, in the task execution method provided by the embodiment of the present invention, after determining the device program block of each type of the external device according to the logical relationship of the I/O signal, the method includes:
step S13, determining an I/O signal table of each of the device blocks, and associating the I/O signal table with the corresponding device block.
It should be noted that, in order to improve the efficiency of signal search, each device block may be associated with a corresponding I/O signal in advance. Specifically, an I/O signal table for each device block is determined, and then the I/O signal table is associated with the corresponding device block. For example, signal expansion is performed on each device block, all possible I/O signals used by each device block are formed into an I/O signal table, for example, the logical relationship of the signals in each device block is expanded, configuration expansion can be performed for similar logical relationships, and for larger-difference logical relationships, a new device block is defined. For another example, the MCP panels of some models have similar functions, but the selection mode of the axis JOG motion may be different, and at this time, two device program blocks may be used for processing, where if the number of controlled axes is small, such as 2 to 3, at this time, 2 to 3 sets of positive and negative direction motion buttons may be used to indicate the positive and negative direction motion of each axis; if the number of axes to be controlled is large, for example, 5-6, the number of buttons may be too many, and the panel button may not be enough, and this can be realized by adopting a method of selecting the axes button and adding two positive and negative direction movement buttons.
After all the I/O signals corresponding to each equipment program block are determined, an I/O signal table is established, and the I/O signal table is associated with the corresponding equipment program block, so that the I/O signal information configured by the equipment program block can be quickly known by looking up the I/O signal table.
According to the embodiment of the invention, the I/O signal table of each equipment program block is determined, and then the I/O signal table is associated with the corresponding equipment program block, so that the I/O signal information configured by the equipment program block can be rapidly determined based on the I/O signal table, and the signal searching efficiency is improved.
Fig. 5 is a schematic structural diagram of a task execution device provided by the present invention, and referring to fig. 5, an embodiment of the present invention provides a task execution device, which includes a first determining module 501, a second determining module 502, a third determining module 503, and an executing module 504.
The first determining module is used for determining the device program block of each type of external device;
the second determining module is used for determining a configuration signal of the target external device according to a configuration file of the target external device in the task to be executed;
the third determining module is configured to determine mapping information between each configuration signal and an input/output I/O signal in each device block, and determine a target device block from each device block according to the mapping information;
and the execution module is used for executing the task to be executed according to the target equipment program block.
The task execution device provided by the embodiment of the invention determines the equipment program block of each type of external equipment; determining a configuration signal of the target external device according to a configuration file of the target external device in the task to be executed; determining mapping information of each configuration signal and input/output (I/O) signals in each equipment program block, and determining a target equipment program block from each equipment program block according to the mapping information; and executing the task to be executed according to the target equipment program block. Based on this, if the configuration signal of the target external device can be mapped and matched with the I/O signal in the predefined device program block, the PLC program in the predefined device program block can be directly executed, thereby avoiding rewriting, debugging and maintaining the PLC program, thereby saving a large amount of PLC program processing time and improving the task execution efficiency.
In an embodiment, the third determining module 503 is specifically configured to:
acquiring the address offset of each configuration signal according to the configuration file;
and determining mapping information of each configuration signal and the I/O signals in each equipment program block according to the address offset of each configuration signal.
In an embodiment, the third determining module 503 is specifically configured to:
determining ordering information of the configuration signal;
determining the mapping sequence of the configuration signals according to the sequencing information;
and mapping each configuration signal with the I/O signals in each device program block according to the mapping sequence.
In one embodiment, the first determining module 501 is specifically configured to:
determining the logic relation of the I/O signals of each type of external equipment;
and determining the device program block of each type of the external device according to the logic relation of the I/O signals.
In an embodiment, the third determining module 503 is specifically configured to:
if the target device program block is not determined from the device program blocks according to the mapping information, determining the device program block of the target external device according to the logical relationship of the configuration signal;
or, the device program block is adjusted according to the configuration signal, so as to obtain the device program block of the target external device.
In an embodiment, the second determining module 502 is specifically configured to:
determining an I/O signal of the target external device;
configuring the I/O signal of the target external equipment according to the digit number of the I/O signal to obtain the configuration signal;
or configuring the I/O signal of the target external device according to the byte number of the I/O signal to obtain the configuration signal.
In one embodiment, the first determining module 501 is specifically configured to:
and determining an I/O signal table of each equipment program block, and associating the I/O signal table with the corresponding equipment program block.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a task execution method comprising:
determining a device program block of each type of external device;
determining a configuration signal of a target external device according to a configuration file of the target external device in a task to be executed;
determining mapping information of each configuration signal and input/output (I/O) signals in each device program block, and determining a target device program block from each device program block according to the mapping information;
and executing the task to be executed according to the target equipment program block.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. 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.
In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform a task execution method provided by the above methods, the method including:
determining a device program block of each type of external device;
determining a configuration signal of a target external device according to a configuration file of the target external device in a task to be executed;
determining mapping information of each configuration signal and input/output (I/O) signals in each device program block, and determining a target device program block from each device program block according to the mapping information;
and executing the task to be executed according to the target equipment program block.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of task execution, comprising:
determining a device program block of each type of external device;
determining a configuration signal of a target external device according to a configuration file of the target external device in a task to be executed;
determining mapping information of each configuration signal and input/output (I/O) signals in each device program block, and determining a target device program block from each device program block according to the mapping information;
executing the task to be executed according to the target equipment program block;
wherein the determining mapping information between each configuration signal and the input/output I/O signal in each device block includes:
acquiring the address offset of each configuration signal according to the configuration file;
and determining mapping information of each configuration signal and the I/O signals in the equipment program blocks according to the address offset of each configuration signal.
2. The task execution method of claim 1, wherein before determining mapping information between each of the configuration signals and input/output (I/O) signals in the device block, the method further comprises:
determining ordering information of the configuration signal;
determining the mapping sequence of the configuration signals according to the sequencing information;
and mapping each configuration signal with the I/O signals in each device program block according to the mapping sequence.
3. The task execution method according to claim 1, wherein the determining the device block of each type of external device includes:
determining the logic relation of the I/O signals of each type of external equipment;
and determining the device program block of each type of the external device according to the logic relation of the I/O signals.
4. The task execution method of claim 1, wherein after determining mapping information between each of the configuration signals and input/output (I/O) signals in the device block, the method further comprises:
if the target device program block is not determined from each device program block according to the mapping information, determining the device program block of the target external device according to the logical relationship of the configuration signal;
or, the device program block is adjusted according to the configuration signal, so as to obtain the device program block of the target external device.
5. The task execution method of claim 1, wherein before determining the configuration signal of the target external device according to the configuration file of the target external device in the task to be executed, the method further comprises:
determining an I/O signal of the target external device;
configuring the I/O signal of the target external equipment according to the digit number of the I/O signal to obtain the configuration signal;
or configuring the I/O signal of the target external device according to the byte number of the I/O signal to obtain the configuration signal.
6. The task execution method according to claim 3, wherein the determining of the device block of each type of the external device according to the logical relationship of the I/O signal comprises:
and determining an I/O signal table of each equipment program block, and associating the I/O signal table with the corresponding equipment program block.
7. A task execution apparatus, comprising:
the first determining module is used for determining the device program block of each type of external device;
the second determining module is used for determining a configuration signal of the target external device according to the configuration file of the target external device in the task to be executed;
a third determining module, configured to determine mapping information between each configuration signal and an input/output I/O signal in each device block, and determine a target device block from each device block according to the mapping information;
the execution module is used for executing the task to be executed according to the target equipment program block;
the third determining module is further configured to obtain an address offset of each configuration signal according to the configuration file;
and determining mapping information of each configuration signal and the I/O signals in the equipment program blocks according to the address offset of each configuration signal.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the task execution method according to any one of claims 1 to 6 when executing the program.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the task execution method according to any one of claims 1 to 6.
CN202210643886.6A 2022-06-09 2022-06-09 Task execution method and device, electronic equipment and storage medium Active CN114721712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210643886.6A CN114721712B (en) 2022-06-09 2022-06-09 Task execution method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210643886.6A CN114721712B (en) 2022-06-09 2022-06-09 Task execution method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114721712A CN114721712A (en) 2022-07-08
CN114721712B true CN114721712B (en) 2022-09-02

Family

ID=82232566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210643886.6A Active CN114721712B (en) 2022-06-09 2022-06-09 Task execution method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114721712B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104157A (en) * 2019-12-18 2020-05-05 江苏芯盛智能科技有限公司 Mass production method and device of storage equipment, storage medium and electronic equipment
CN112540787A (en) * 2020-12-14 2021-03-23 北京知道未来信息技术有限公司 Program reverse analysis method and device and electronic equipment
CN114047952A (en) * 2022-01-11 2022-02-15 长芯盛(武汉)科技有限公司 Processor and method for single chip microcomputer, single chip microcomputer and storage medium
CN114138363A (en) * 2021-11-27 2022-03-04 深圳市元征科技股份有限公司 Program data calling method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8549502B2 (en) * 2010-06-21 2013-10-01 Microsoft Corporation Compiler with user-defined type inference rules
US9015306B2 (en) * 2011-12-15 2015-04-21 Cisco Technology, Inc. Mapping protocol endpoints to networked devices and applications based on capabilities
CN112579275A (en) * 2020-12-23 2021-03-30 苏州三六零智能安全科技有限公司 Task execution method, device, equipment and storage medium
CN112905314A (en) * 2021-01-27 2021-06-04 北京百度网讯科技有限公司 Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN114461363A (en) * 2022-01-26 2022-05-10 上海意略明数字科技股份有限公司 Task execution method and device and computer readable storage medium
CN114510400A (en) * 2022-02-23 2022-05-17 平安普惠企业管理有限公司 Task execution method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104157A (en) * 2019-12-18 2020-05-05 江苏芯盛智能科技有限公司 Mass production method and device of storage equipment, storage medium and electronic equipment
CN112540787A (en) * 2020-12-14 2021-03-23 北京知道未来信息技术有限公司 Program reverse analysis method and device and electronic equipment
CN114138363A (en) * 2021-11-27 2022-03-04 深圳市元征科技股份有限公司 Program data calling method, device, equipment and storage medium
CN114047952A (en) * 2022-01-11 2022-02-15 长芯盛(武汉)科技有限公司 Processor and method for single chip microcomputer, single chip microcomputer and storage medium

Also Published As

Publication number Publication date
CN114721712A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
US10977014B2 (en) Web-based programming environment for embedded devices
WO2016189689A1 (en) Program generation device, program generation method, and program generation program
US6826432B2 (en) Process for programming an automation application
CN114237676A (en) FPGA (field programmable Gate array) logic updating method, device, equipment and readable storage medium
CN114564192A (en) Data mapping method for real-time Ethernet industrial control software development environment
CN111291443B (en) Automatic generation method, device and equipment for I/O module model of vehicle control unit software
CN114721712B (en) Task execution method and device, electronic equipment and storage medium
CN110633258A (en) Log insertion method, device, computer device and storage medium
US7949501B1 (en) Systems and methods for a real time machine simulator to explore the effects of rules used in a modular manufacturing or assembly system
US20120046773A1 (en) Mold design system and method
CN107844334B (en) Method and system for automatically configuring RCS of robot
JP2008165324A (en) Program creation support device
CN111813702A (en) Debugging system, debugging method, device, and computer-readable storage medium
JP5492573B2 (en) Device / PLC simulator device, method, and program having trace function
CN110188491B (en) Processing method and device for improving calculation efficiency in simulation calculation process
JPH0410081B2 (en)
CN116126366B (en) Chip input/output interface configuration method, device, medium and electronic equipment
JP2007172128A (en) I/o simulator device
JP2001318121A (en) Inspection system for circuit board and circuit board
JPS6041102A (en) Sequence control device
JPH1115697A (en) Debugging method for program type display device
CN115883351A (en) Setting method and device of physical address of network card, electronic equipment and storage medium
CN114626145A (en) Data collaborative management method, device, equipment and medium
Rzońca et al. Interfacing inputs and outputs with IEC 61131-3 control software
CN116466918A (en) Construction method, device, equipment and storage medium of post-processor

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Task execution method, device, electronic equipment, and storage medium

Granted publication date: 20220902

Pledgee: China Construction Bank Corporation Beijing Mentougou Branch

Pledgor: BEIJING JINGDIAO TECHNOLOGY GROUP Co.,Ltd.

Registration number: Y2024980037951