CN107368371B - Programming resource allocation method of embedded PLC - Google Patents

Programming resource allocation method of embedded PLC Download PDF

Info

Publication number
CN107368371B
CN107368371B CN201710543070.5A CN201710543070A CN107368371B CN 107368371 B CN107368371 B CN 107368371B CN 201710543070 A CN201710543070 A CN 201710543070A CN 107368371 B CN107368371 B CN 107368371B
Authority
CN
China
Prior art keywords
resource
programming
resources
allocation request
type
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
CN201710543070.5A
Other languages
Chinese (zh)
Other versions
CN107368371A (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.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN201710543070.5A priority Critical patent/CN107368371B/en
Publication of CN107368371A publication Critical patent/CN107368371A/en
Application granted granted Critical
Publication of CN107368371B publication Critical patent/CN107368371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals

Abstract

The invention provides a programming resource allocation method of an embedded PLC, which comprises the following steps: obtaining a resource allocation request; wherein the resource allocation request comprises the number and type of the programming resources requested to be allocated and port information of the physical port; allocating a corresponding programming resource according to the resource allocation request, so that the corresponding programming resource is used through the physical port. By obtaining the resource allocation request and allocating the corresponding programming resource according to the resource allocation request, the programming resource is automatically allocated according to the request, and the utilization rate of the programming resource is improved.

Description

Programming resource allocation method of embedded PLC
Technical Field
The invention relates to the field of industrial control, in particular to a programming resource allocation method of an embedded PLC.
Background
PLC (programmable Logic controller) refers to a programmable Logic controller. With the rapid development of Soc chip technology in recent years, embedded PLC combining PLC and Soc chip technology is becoming more and more widely used in the field of industrial control.
When the software programming of the embedded PLC is carried out, the embedded PLC realizes the data reading and control with the external equipment by referring to and operating the soft element of the programming resource. The soft elements of the programming resources include an input relay X, an output relay Y, an auxiliary relay M, a data register VD, a timer T, a counter C, etc.
In the prior art, corresponding programming resources are required to be allocated to each port of the embedded PLC, and then programming development is performed within the allocated programming resources; in this embodiment, the situations that part of the ports actually used cannot be allocated with the programming resources, the ports not used are allocated with the programming resources, part of the ports used are allocated with too many programming resources, and part of the ports used are allocated with insufficient programming resources, are caused, so that the utilization rate of the programming resources is reduced.
Disclosure of Invention
The invention provides a programming resource allocation method of an embedded PLC (programmable logic controller) to solve the problem of low utilization rate of programming resources.
According to an aspect of the present invention, there is provided a programming resource allocation method for an embedded PLC, including:
obtaining a resource allocation request; wherein the resource allocation request comprises the number and type of the programming resources requested to be allocated and port information of the physical port;
allocating a corresponding programming resource according to the resource allocation request, so that the corresponding programming resource is used through the physical port.
Optionally, the physical port is a connected device, and the code segment of the physical port is already embedded in the embedded PLC.
Optionally, before allocating the corresponding programming resource according to the resource allocation request, the method further includes:
confirming that the currently allocatable programming resources recorded in the resource pool satisfy the quantity and the type of the programming resources in the resource allocation request.
Optionally, the programmed resource recorded in the resource pool is predetermined.
Optionally, the programming resources recorded in the resource pool are all allocable programming resources initially.
The information recorded by the resource pool includes:
a type of programming resource;
the number of each type of programming resource;
the number of the currently allocated programming resources in each type of programming resources;
the number of the programming resources which can be currently allocated in each type of programming resources;
the starting address of the currently allocatable programming resource among the types of programming resources.
Optionally, the resource pool records the programming resource by:
(Resourcet,Allocated,Avaible,Start);
wherein t is 0,1,2,3 …, (M-1);
m is the total number of types of programming resources;
Resourcetfor indicating the type of programming resource;
allocated is used to indicate the amount of the corresponding Allocated programming resource;
available is used to indicate the amount of the corresponding assignable programming resource;
start is used to indicate the starting address of the allocable programming resource.
Optionally, the obtaining a resource allocation request includes:
obtaining one of said resource allocation requests for the same type of programmed resource of one of said physical ports.
Optionally, the resource allocation request is expressed by the following form:
iResource=Allocate(Pi,Resourcet,Num)
wherein iResource is used to represent the requested allocated programming resource;
Pifor representing a physical port;
i=0,1,…,(N-1);
n is the number of physical ports;
Resourcetfor indicating the type of programming resource;
t=0,1,2,3…,(M-1);
m is the total number of types of programming resources;
num is used to indicate the amount of programming resources requested to be allocated;
allocate is used to indicate the way in which the programming resources are allocated.
Optionally, after allocating the corresponding programming resource according to the resource allocation request, the method includes:
and updating and recording the quantity, the type and the address information of the programming resource corresponding to the physical port.
Optionally, after allocating the corresponding programming resource according to the resource allocation request, the method includes:
determining that the distribution of the programming resources of all physical ports of the programming resources to be distributed is finished;
and recording the distribution condition of the programming resources through a programming resource matrix.
Optionally, the corresponding programming resource is obtained for use by:
Resource=GetResource(Pi,Resourcet,iResource,j);
wherein iResource ═ allocation (P)i,Resourcet,Num);
Resource represents an object of the programming Resource used;
Pifor representing a physical port;
i=0,1,…,(N-1);
n is the number of physical ports;
Resourcetfor indicating the type of programming resource;
t=0,1,2,3…,(M-1);
m is the total number of types of programming resources;
iResource is used to represent the programming resource to which allocation is requested;
j is index information for indicating that the programmed resource is to be accessed;
the allocation is used for indicating the allocation mode of the programming resource;
GetResource is used to represent the manner in which objects of the programming resource are obtained.
According to the programming resource allocation method of the embedded PLC, the resource allocation request is obtained, and the corresponding programming resource is allocated according to the resource allocation request, so that the programming resource is automatically allocated according to the request, and the utilization rate of the programming resource is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in 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 only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a first flowchart illustrating a method for allocating programming resources of an embedded PLC according to the present invention;
FIG. 2 is a first flowchart illustrating a method for allocating programming resources of an embedded PLC according to the present invention;
FIG. 3 is a schematic diagram illustrating a first embodiment of a method for allocating programming resources;
FIG. 4 is a schematic diagram of a second embodiment of the present invention;
fig. 5 is a schematic diagram of an embedded PLC of the present invention.
Description of reference numerals:
301-an obtaining module; 302-a distribution module; 303-a first confirmation module; 304-an update module; 305-a second confirmation module; 306-recording module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances and that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Example 1
FIG. 1 is a flow chart illustrating a method for allocating programming resources of an embedded PLC according to the present invention; referring to fig. 1, the present invention provides a method for allocating programming resources of an embedded PLC, including:
s11: obtaining a resource allocation request; wherein the resource allocation request comprises the number and type of the programming resources requested to be allocated and port information of the physical port;
s12: allocating a corresponding programming resource according to the resource allocation request, so that the corresponding programming resource is used through the physical port.
The resource allocation request can be understood as any form of request which can trigger a programmed resource allocation event; the port information of a physical port may be understood as information indicating which physical port is specified.
According to the programming resource allocation method of the embedded PLC, the programming resources are automatically allocated according to the request by obtaining the resource allocation request and allocating the corresponding programming resources according to the resource allocation request, and the utilization rate of the programming resources is improved.
Example 2
FIG. 2 is a flow chart illustrating a method for allocating programming resources of an embedded PLC according to the present invention; referring to fig. 2, a method for allocating programming resources of an embedded PLC is provided, including:
s21: obtaining a resource allocation request; the resource allocation request comprises the quantity and the type of the programming resources requested to be allocated and port information of the physical port;
in one embodiment, the physical port may be a physical port of a connected device, and a code segment corresponding to the physical port is embedded in the embedded PLC. A physical port that conforms to this description may be understood as an active physical port. In contrast, if a physical port is not connected to a device or a code corresponding to the physical port is not embedded in the embedded PLC, the physical port may be understood as an inactive physical port, and for the inactive physical port, a resource allocation request may not be generated.
The implementation method can only allocate the programming resources to the equipment of the active physical port, avoids the situation that the programming resources are allocated to the unused port, improves the pertinence of the allocation of the programming resources, and further improves the utilization rate of the programming resources.
The resource allocation request can be understood as any form of request capable of triggering a programmed resource allocation event, and can be obtained by automatically generating a code segment corresponding to an active physical port executed by the embedded PLC.
In this embodiment, through execution of the device code, each active physical port may generate a resource allocation request corresponding to the active physical port. Because different devices require different programming resources, developers can apply for the corresponding programming resources for different physical ports as needed when determining code segments corresponding to the physical ports, for example, compared with a switching value device, developers need to apply for more programming resources such as an auxiliary relay M, a data register VD, a timer T, a counter C, and the like for communication devices with complex protocols and large exchange data amounts.
Fig. 4 is a schematic diagram illustrating a principle of allocating programming resources according to a second embodiment of the present invention, referring to fig. 2 in combination with fig. 4, wherein in an embodiment, after a user determines a device to which a physical port is connected, the user may determine a corresponding code segment according to the device and the physical port; after code segments corresponding to all equipment and physical ports connected with the embedded PLC are determined, codes of equipment software can be obtained; the code of the equipment software can be placed into the embedded PLC, and the placement of the code of the equipment software can realize the placement of the code segment corresponding to the physical port.
In one example, placing the embedded PLC may include: and compiling and generating an executable program according to the codes of the equipment software, and downloading and solidifying the executable program to the embedded PLC.
The embedded PLC may connect a plurality of identical devices, and the identical devices may be understood herein as the embedded PLC having the same code segment required for the device. The same device, connected to different physical ports, executing the same code segment, may request and obtain resource allocation, respectively.
The port information of a physical port may be understood as information that represents which physical port is specific.
In one embodiment, the information of the physical port may be determined by the initialization configuration of the physical port before step S1, and in a specific embodiment, when the initialization configuration of the physical port is performed, a physical port list may be established and sequentially encoded in the list for each port. In one example, for different types of physical ports, different port types can be distinguished to establish different physical port lists, and when the physical ports in the same list are coded, a serial number can be allocated to each port from 0; for different lists, it is possible to distinguish by assigning different coded letters. For example: can be divided into switching value read-in port groups (X)0~Xn-1) And a switching value output port group (Y)0~Ym-1) Analog input port group (AI)0~AIx-1) Analog output port group (AO)0~AOy-1) And protocol communication PORT group (PORT)0~PORTz-1). Wherein, X, Y, AI, AO, PORT respectively represent the type of the physical PORT, correspond to different lists, n, m, X, Y, z, etc. respectively represent specific numbers, which can represent the serial numbers in the list corresponding to the type.
After step S21, it may include:
s22: confirming that the currently allocable programming resources recorded in the resource pool meet the quantity and the type of the programming resources in the resource allocation request; in one embodiment, the programmed resources recorded in the resource pool are predetermined. The programming resources recorded in the resource pool are all allocable programming resources initially. The initial state can be understood as the time when the embedded PLC runs the initialization code.
The resource pool may be understood as a data structure for recording information of all corresponding programming resources, or may be understood as a set of all corresponding programming resources, and simultaneously carries a data structure for recording information of all corresponding programming resources. All the corresponding programming resources can be understood as all the programming resources corresponding to the embedded PLC software, so that one embedded PLC software may have one resource pool correspondingly. FIG. 3 is a schematic diagram of a program resource allocation according to the present invention. Referring to fig. 3, the resource pool can record and characterize the condition of the programmed resource in any way.
In one embodiment, before step S21, specifically after completing initialization of the physical port, the following steps may be performed: determining the corresponding resource pool according to the embedded PLC software, for example, the allocation condition of each resource pool may be recorded by using a data structure; when the embedded PLC is started, it can be specifically understood that before step S21, information of all programming resources of the resource pool is initialized and recorded as allocable programming resources.
In one embodiment, the information recorded by the resource pool includes: a type of programming resource; the number of each type of programming resource; the number of the currently allocated programming resources in each type of programming resources; the number of the programming resources which can be currently allocated in each type of programming resources; the starting address of the currently allocatable programming resource among the types of programming resources.
In a specific implementation process, the above information may be recorded in a data structure, where one example may be:
the resource pool records the programming resources by:
(Resourcet,Allocated,Avaible,Start);
wherein t is 0,1,2,3 …, (M-1); m is a programming resourceA total number of types of sources; resourcetFor indicating the type of programming resource; allocated is used to indicate the amount of the corresponding Allocated programming resource; available is used to indicate the amount of the corresponding assignable programming resource; start is used to indicate the starting address of the allocable programming resource. Each programming resource can be understood to have one address correspondingly, and the addresses can be continuous, so that in the case of determining the starting address, the number and the type, one or more programming resources can be determined correspondingly, so as to realize accurate and efficient management.
Under the recording mode of the data structure, the programming resources in the resource pool or the information of the programming resources in the resource pool can be stored in a linear mode, so that the calling management of the programming resources is simpler and more efficient.
Since the information of the programmed resources is stored in a linear manner in the resource pool, when requesting allocation of the programmed resources, allocation in a linear manner may be requested, for which purpose, in one embodiment, one of said resource allocation requests is obtained for the same type of programmed resources of one physical port. I.e. the physical port needs the programming resources needed for the one-time request by type.
In the above embodiment, the allocation in a linear manner can improve the work efficiency of allocation, and is also beneficial to ensuring the management of the resource pool on the programming resources or the programming resource information.
In one example, the resource allocation request is expressed by the following form:
iResource=Allocate(Pi,Resourcet,Num)。
wherein iResource is used to represent the requested allocated programming resource; piFor representing a physical port; i is 0,1, … (N-1), N represents the number of physical ports; resourcetFor indicating the type of programming resource; t ═ 0,1,2,3 …, (M-1); m is the total number of types of programming resources; num is used to indicate the amount of programming resources requested to be allocated; allocate is used to indicate the way in which the programming resources are allocated.
In this expression, in the case of determining the number, the type and the allocation manner, one or more programming resources may be correspondingly determined. However, the present invention is not limited to this, and the requested content may be clearly expressed in the resource allocation request.
In one embodiment, in step S2, if not, the allocation is rejected, and it may be determined that the request resource allocation fails.
In addition, only under the condition that the existing resource allocation requests can be met, the subsequent codes are continuously executed, otherwise, the system reports errors and stops executing, namely the embedded PLC stops running.
S23: allocating a corresponding programming resource according to the resource allocation request, so that the corresponding programming resource is used through the physical port. Step S2 may be understood as being performed prior to step S3.
In one embodiment, when allocating, the corresponding programming resource may be allocated by returning the address of the programming resource. It is understood that the allocation results in: through which the corresponding programming resource can be used corresponding to the address returned by the call.
Referring to fig. 3, for the allocated programming resources, the sorting record may be performed by way of programming resource blocks, where each programming resource block may be understood as a data structure unit, or a subset of the programming resources, and correspondingly, the programming resources are allocated, and may also be understood as a corresponding programming resource block allocated for the programming resources.
After step S23, it may include:
s24: and updating and recording the quantity, the type and the address information of the programming resource corresponding to the physical port. Which may be understood as information that updates the data structure of the recording resource pool.
In one embodiment, the updated information may be expressed as follows:
(Resourcet,Allocated,iStart);
wherein ResourcetFor indicating the type of programming resource; t ═ 0,1,2,3 …, (M-1); m is the total number of types of programming resources; allocated is used to represent the compilation of the corresponding programming resource typeThe number of process resources; the iStart is used to indicate the starting address of the allocated programming resource.
Step S25 may be implemented after step S24: judging whether the programming resources of all physical ports of the programming resources to be allocated are allocated completely;
if the programming resources of all physical ports of the programming resources to be allocated are determined to be completely allocated; step S26 may be implemented: and recording the distribution condition of the programming resources through a programming resource matrix.
In one embodiment, the programming resource matrix may be expressed as follows:
(Pi,Resourcet,Allocated,iStart);
the specific meanings thereof are as described hereinbefore.
In an optional embodiment of the present invention, the method may further include a process of obtaining and using the corresponding programming resource, and in a specific implementation process, the corresponding programming resource is obtained and used in the following manner:
Resource=GetResource(Pi,Resourcet,iResource,j);
wherein iResource ═ allocation (P)i,ResourcetNum); resource represents an object of the programming Resource used; piFor representing a physical port; resourcetFor indicating the type of programming resource; t ═ 0,1,2,3 …, (M-1); m is the total number of types of programming resources; iResource is used to represent the programming resource to which allocation is requested; j is index information for indicating that the programmed resource is to be accessed; the allocation is used for indicating the allocation mode of the programming resource; GetResource is used to represent the manner in which objects of the programming resource are obtained.
The above procedure for obtaining usage can be implemented by executing corresponding code segments.
In addition, the embedded PLC system can judge the effectiveness of the programming resource requested by the resource allocation request by executing the corresponding code segment, thereby preventing illegal and out-of-range access. After gaining use, the code may continue execution, otherwise, an error may be reported.
According to the programming resource allocation method of the embedded PLC, the resource allocation request is obtained, and the corresponding programming resource is allocated according to the resource allocation request, so that the programming resource is automatically allocated according to the request, and the utilization rate of the programming resource is improved.
Example 3
Fig. 5 is a schematic diagram of an embedded PLC of the present invention. Referring to fig. 5, there is provided an embedded PLC including:
an obtaining module 301, configured to obtain a resource allocation request; wherein the resource allocation request comprises the number and type of the programming resources requested to be allocated and port information of the physical port;
an allocating module 302, configured to allocate, according to the resource allocation request, a corresponding programming resource, so that the corresponding programming resource is used through the physical port.
In one embodiment, the physical port is a connected device, and the code of the connected device is placed in the physical port of the embedded PLC.
In one embodiment, the method further comprises:
a first confirming module 303, configured to confirm that the currently allocatable programming resource recorded in the resource pool satisfies the number and the type of the programming resource in the resource allocation request.
The information recorded by the resource pool includes:
a type of programming resource;
the number of each type of programming resource;
the number of the currently allocated programming resources in each type of programming resources;
the number of the programming resources which can be currently allocated in each type of programming resources;
the starting address of the currently allocatable programming resource among the types of programming resources.
In one embodiment, the obtaining module is specifically configured to:
obtaining one of said resource allocation requests for the same type of programmed resource of one of said physical ports.
In one embodiment, the resource allocation request is expressed by the following form:
iResource=Allocate(Pi,Resourcet,Num);
wherein iResource is used to represent the requested allocated programming resource; piFor representing a physical port; i ═ 0,1, … (N-1); n is the number of physical ports.
ResourcetFor indicating the type of programming resource; t ═ 0,1,2,3 …, (M-1); m is the total number of types of programming resources; num is used to indicate the amount of programming resources requested to be allocated; allocate is used to indicate the way in which the programming resources are allocated.
In one embodiment, the method further comprises:
and the updating module 304 is configured to update and record the number, type, and address information of the programming resource corresponding to the physical port.
In one embodiment, the method further comprises:
a second confirming module 305, configured to determine that the allocation of the programming resources of all the physical ports to which the programming resources are to be allocated is completed;
a recording module 306, configured to record the allocation of the programming resource through the programming resource matrix.
In one embodiment, the corresponding programming resource is obtained for use by:
Resource=GetResource(Pi,Resourcet,iResource,j);
wherein iResource ═ allocation (P)i,ResourcetNum); resource represents an object of the programming Resource used; piFor representing a physical port; resourcetFor indicating the type of programming resource; t ═ 0,1,2,3 …, (M-1); m is the total number of types of programming resources; iResource is used to represent the programming resource to which allocation is requested; j is index information for indicating that the programmed resource is to be accessed; the allocation is used for indicating the allocation mode of the programming resource; GetResource is used to represent the manner in which objects of the programming resource are obtained.
The embedded PLC provided in this embodiment allocates the corresponding programming resource by obtaining the resource allocation request and according to the resource allocation request, so as to implement automatic allocation of the programming resource according to the request, and improve the utilization rate of the programming resource.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for distributing programming resources of an embedded PLC is characterized by comprising the following steps:
obtaining a resource allocation request; wherein the resource allocation request comprises the number and type of the programming resources requested to be allocated and port information of the physical port;
allocating a corresponding programming resource according to the resource allocation request, so that the corresponding programming resource is used through the physical port;
the physical port is a physical port of connected equipment, and a code segment corresponding to the physical port is embedded into the embedded PLC; and the resource allocation request is automatically generated by the embedded PLC executing the code segment corresponding to the physical port.
2. The method of claim 1, wherein before allocating the corresponding programming resource according to the resource allocation request, further comprising:
confirming that the currently allocatable programming resources recorded in the resource pool satisfy the quantity and the type of the programming resources in the resource allocation request.
3. The method of claim 2, wherein the information recorded by the resource pool comprises:
a type of programming resource;
the number of each type of programming resource;
the number of the currently allocated programming resources in each type of programming resources;
the number of the programming resources which can be currently allocated in each type of programming resources;
the starting address of the currently allocatable programming resource among the types of programming resources.
4. The method according to claim 1 or 2, wherein the obtaining a resource allocation request comprises:
obtaining one of said resource allocation requests for the same type of programmed resource of one of said physical ports.
5. The method according to claim 1 or 2, wherein the resource allocation request is expressed by the following form:
iResource=Allocate(Pi,Resourcet,Num)
wherein iResource is used to represent the requested allocated programming resource;
Pifor representing a physical port;
i=0,1,…,(N-1);
n is the number of physical ports; resourcetFor indicating the type of programming resource;
t=0,1,2,3…,(M-1);
m is the total number of types of programming resources;
num is used to indicate the amount of programming resources requested to be allocated;
allocate is used to indicate the way in which the programming resources are allocated.
6. The method according to claim 1 or 2, wherein the allocating the corresponding programming resource according to the resource allocation request comprises:
and updating and recording the quantity, the type and the address information of the programming resource corresponding to the physical port.
7. The method according to claim 1 or 2, wherein the allocating the corresponding programming resource according to the resource allocation request comprises:
determining that the distribution of the programming resources of all physical ports of the programming resources to be distributed is finished;
and recording the distribution condition of the programming resources through a programming resource matrix.
8. Method according to claim 1 or 2, characterized in that the respective programming resource is obtained for use by:
Resource=GetResource(Pi,Resourcet,iResource,j);
wherein iResource ═ allocation (P)i,Resourcet,Num);
Resource represents an object of the programming Resource used;
Pifor representing a physical port;
i=0,1,…,(N-1);
n is the number of physical ports;
Resourcetfor indicating the type of programming resource;
t=0,1,2,3…,(M-1);
m is the total number of types of programming resources;
iResource is used to represent the programming resource to which allocation is requested;
j is index information for indicating that the programmed resource is to be accessed;
the allocation is used for indicating the allocation mode of the programming resource;
GetResource is used to represent the manner in which objects of the programming resource are obtained.
CN201710543070.5A 2017-07-05 2017-07-05 Programming resource allocation method of embedded PLC Active CN107368371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710543070.5A CN107368371B (en) 2017-07-05 2017-07-05 Programming resource allocation method of embedded PLC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710543070.5A CN107368371B (en) 2017-07-05 2017-07-05 Programming resource allocation method of embedded PLC

Publications (2)

Publication Number Publication Date
CN107368371A CN107368371A (en) 2017-11-21
CN107368371B true CN107368371B (en) 2020-12-15

Family

ID=60305244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710543070.5A Active CN107368371B (en) 2017-07-05 2017-07-05 Programming resource allocation method of embedded PLC

Country Status (1)

Country Link
CN (1) CN107368371B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471862A (en) * 2019-07-16 2019-11-19 杭州电子科技大学 A kind of the address of variable distribution system and method for programmable controller

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303580A (en) * 2008-06-24 2008-11-12 杭州义益自动化有限公司 Implementing method of PLC controller for supporting multiple CPU structures
CN101349906A (en) * 2007-07-20 2009-01-21 无锡市信捷自动化有限公司 Method and apparatus for implementing distribution function between terminal and soft element
CN101567028A (en) * 2009-06-01 2009-10-28 杭州电子科技大学 Modularized hardware elementary diagram automatic generating method
CN102799546A (en) * 2012-06-30 2012-11-28 广西工学院 Read/write and time sequence controller for output bit information
CN103577266A (en) * 2012-07-31 2014-02-12 国际商业机器公司 Method and system for distributing field programmable gate array (FPGA) resources
CN105353715A (en) * 2015-09-23 2016-02-24 上海大学 Realization method of logic control of VB/VC (Microsoft Visual Basic 6.0/Microsoft Visual C++) and PLC (Programmable Logic Controller) on the basis of serial communication
CN105955184A (en) * 2016-05-18 2016-09-21 天津畅乐电子科技股份有限公司 Programmable logic controller (PLC)-based multi-working procedure universal control method
CN106444602A (en) * 2016-08-31 2017-02-22 北京龙鼎源科技股份有限公司 Security programmable logic controller communication system and communication method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6667636B2 (en) * 2001-06-11 2003-12-23 Lsi Logic Corporation DSP integrated with programmable logic based accelerators
US9081501B2 (en) * 2010-01-08 2015-07-14 International Business Machines Corporation Multi-petascale highly efficient parallel supercomputer

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101349906A (en) * 2007-07-20 2009-01-21 无锡市信捷自动化有限公司 Method and apparatus for implementing distribution function between terminal and soft element
CN101303580A (en) * 2008-06-24 2008-11-12 杭州义益自动化有限公司 Implementing method of PLC controller for supporting multiple CPU structures
CN101567028A (en) * 2009-06-01 2009-10-28 杭州电子科技大学 Modularized hardware elementary diagram automatic generating method
CN102799546A (en) * 2012-06-30 2012-11-28 广西工学院 Read/write and time sequence controller for output bit information
CN103577266A (en) * 2012-07-31 2014-02-12 国际商业机器公司 Method and system for distributing field programmable gate array (FPGA) resources
CN105353715A (en) * 2015-09-23 2016-02-24 上海大学 Realization method of logic control of VB/VC (Microsoft Visual Basic 6.0/Microsoft Visual C++) and PLC (Programmable Logic Controller) on the basis of serial communication
CN105955184A (en) * 2016-05-18 2016-09-21 天津畅乐电子科技股份有限公司 Programmable logic controller (PLC)-based multi-working procedure universal control method
CN106444602A (en) * 2016-08-31 2017-02-22 北京龙鼎源科技股份有限公司 Security programmable logic controller communication system and communication method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于Cortex-M3的嵌入式PLC设计";李冠军等;《仪器仪表用户》;20130808;第20卷(第4期);第39-41页 *
"基于ePLC的工业机器人关键技术研究";孙丹枫;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140915(第09期);论文第2.5节 *

Also Published As

Publication number Publication date
CN107368371A (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN106339222B (en) A kind of service implementing method and device
CN110597616A (en) Memory allocation method and device for neural network
CN108345462B (en) Method and device for upgrading components
CN104461698A (en) Dynamic virtual disk mounting method, virtual disk management device and distributed storage system
CN107368426B (en) Test method and test device
CN115858083A (en) Container CPU resource scheduling and isolating method and device, storage medium and electronic equipment
CN110399217A (en) A kind of memory source distribution method, device and equipment
KR20210105378A (en) How the programming platform's user code works and the platform, node, device, medium
CN112667405A (en) Information processing method, device, equipment and storage medium
CN115033352A (en) Task scheduling method, device and equipment for multi-core processor and storage medium
CN107368371B (en) Programming resource allocation method of embedded PLC
CN110673787A (en) Volume configuration method and device
CN107566543B (en) Node identifier setting method and device
CN107357529B (en) Storage cluster online upgrading method and system
CN113055216B (en) Mesh network upgrading method and system, computer device and storage medium
CN108255526B (en) System starting and running method and device
CN107153561A (en) The method of firmware, apparatus and system in a kind of renewal expansion card
CN113672375A (en) Resource allocation prediction method, device, equipment and storage medium
US6988174B1 (en) Method of creating a plurality of partitions on removable device
JP2006524853A (en) System for determining the unreturned standby resource usage rate
CN108710514B (en) Object jump control method and device, storage medium and electronic device
CN104281587A (en) Connection establishing method and device
CN109660575B (en) Method and device for realizing NFV service deployment
CN115061813A (en) Cluster resource management method, device, equipment and medium
CN110333870B (en) Simulink model variable distribution processing method, device and equipment

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