CN109343957A - Control card resource allocation method, system, motion control card and storage medium - Google Patents
Control card resource allocation method, system, motion control card and storage medium Download PDFInfo
- Publication number
- CN109343957A CN109343957A CN201811107190.1A CN201811107190A CN109343957A CN 109343957 A CN109343957 A CN 109343957A CN 201811107190 A CN201811107190 A CN 201811107190A CN 109343957 A CN109343957 A CN 109343957A
- Authority
- CN
- China
- Prior art keywords
- resource
- record
- control card
- serial number
- allocation method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides a kind of control card resource allocation method and motion control cards, the control card resource allocation method includes: generation resource distribution file, the resource distribution file includes multiple resource records, and each corresponding physical resource of the resource record, the physical resource are local physical resource or bus physical resource;By in the resource distribution file each resource record and a unique serial number establish mapping relations, generate the mapping table of resource record and serial number;When receiving resource access instruction, the mapping table is inquired according to the serial number carried in the resource access instruction, obtains the corresponding resource record of the serial number, and accesses the corresponding local physical resource of the resource record or bus physical resource.The present invention is by configuring control card resource, while maintaining the usage mode of existing Control card, improves ease for use and compatibility of the developer when using control card;In terms of the inheritance of software, the development efficiency of developer is improved.
Description
Technical field
The present invention relates to motion control fields, more specifically to a kind of control card resource allocation method, system, fortune
Dynamic control card and storage medium.
Background technique
With the continuous development of movement control technology and processor technology, the form of control card also becomes constantly
Change, the ease for use and performance that people use motion controller, which have, continuous to be required to be promoted.The motion control card of mainstream at present
It is all that software design is carried out with fixed physicals resources such as axis, encoder and input/output (Input/Output, I/O), than
The flexibility of the product form of the relative closure resource such as constituted with terminal board and main card, extension is limited by very large.
For the use habit of control card, major part developer is compiled with the sequence such as axis, I/O in the process of development at present
What number mode accessed, this usage mode is convenient to the management of resource and the correspondence of actual process.Existing non-bus type
Control card hardware resource is relatively-stationary, so that the type and quantity of axis and I/O are limited, and it is believed that therefore
In software design, the Development Finance of fixed resource can be generally taken.
However, with the continuous development of bussing technique and the continuous complication of equipment, so that control card carry resource
Type sum number measurer has uncertainty, and the development scheme of existing fixed resource can not adapt to above-mentioned news.
Summary of the invention
The technical problem to be solved in the present invention is that existing fixed resource is opened with the continuous development of bussing technique
Originating party formula can not adapt to the problem of above-mentioned news, for above-mentioned problem, provide a kind of control card resource allocation method, be
System, motion control card and storage medium.
The technical solution that the present invention solves above-mentioned technical problem is to provide a kind of control card resource allocation method, the control
Card resource allocation method, comprising:
Resource distribution file is generated, the resource distribution file includes multiple resource records, and each resource record
A corresponding physical resource, the physical resource are local physical resource or bus physical resource;
By in the resource distribution file each resource record and a unique serial number establish mapping relations, generate money
The mapping table of source record and serial number;
When receiving resource access instruction, the mapping is inquired according to the serial number carried in the resource access instruction and is closed
It is table, obtains the corresponding resource record of the serial number, and accesses the corresponding local physical resource of the resource record or bus object
Manage resource.
In control card resource allocation method of the present invention, the serial number includes type codes and sequence code, the money
Source record includes multiple types, and the resource record of same type uses type codes having the same and different sequence codes.
In control card resource allocation method of the present invention, the generation resource distribution file includes:
By attribute, the attribute data that interface obtains the local physical resource or bus physical resource is set;
Resource record is generated according to the attribute data, and the resource distribution file is written into the resource record.
In control card resource allocation method of the present invention, the corresponding attribute setting of the resource record of each type
Interface, and the local physical resource or bus physical that interface obtains are arranged according to different attribute for different types of resource record
Resource generates.
In control card resource allocation method of the present invention, the attribute data of the attribute setting interface
The channel number of channel number or local resource including bus resource, and the corresponding bus of channel number of each bus resource
Physical resource, corresponding one local physical resource of the channel number of each local resource.
In control card resource allocation method of the present invention, the resource record include with one in Types Below or
It is multiple: axis resource, digital quantity input resource, digital output resource, analog input resource, analog output resource, coding
Device resource, temperature sensor resource.
In control card resource allocation method of the present invention, the method also includes:
The maximum value of the resource record of each type is set, and by each resource record in the resource distribution file
When establishing mapping relations with a unique serial number, if any type of resource record reports an error when being more than corresponding maximum value.
The present invention also provides a kind of control card resource configuration systems, comprising:
Resource distribution file generation unit, for generating resource distribution file, the resource distribution file includes multiple moneys
Source record, each corresponding physical resource of the resource record, the physical resource includes local physical resource or bus object
Manage resource;
Mapping relations establish unit, for by each resource record and a unique sequence in the resource distribution file
Mapping relations number are established, the mapping table of resource record and serial number is generated;
Resource access process unit, for being taken according in the resource access instruction when receiving resource access instruction
The serial number of band inquires the mapping table, obtains the corresponding resource record of the serial number, and it is corresponding to access the resource record
Local physical resource or bus physical resource.
The present invention also provides a kind of motion control cards, including memory and processor, and being stored in the memory can
In the computer program of processor operation, the processor executes the computer program and realizes control card money as described above
The step of source configuration method.
The present invention also provides a kind of storage medium, computer program, the computer journey are stored on the storage medium
When sequence is executed by processor, the step of realizing control card resource allocation method as described above.
Control card resource allocation method, system, motion control card and storage medium of the invention, by control card resource
It is configured, while maintaining the usage mode of existing Control card, it is easy when using control card to improve developer
With property and compatibility;In terms of the inheritance of software, the development efficiency of developer is improved.
Detailed description of the invention
Fig. 1 is the flow diagram of control card resource allocation method embodiment of the present invention;
Fig. 2 is the schematic diagram of resource embodiment in control card resource allocation method of the present invention;
Fig. 3 is the schematic diagram of the resource distribution embodiment of control card resource allocation method axis resource of the present invention;
Fig. 4 is the schematic diagram of the resource distribution embodiment of non-axis resource in control card resource allocation method of the present invention;
Fig. 5 is the schematic diagram of control card resource configuration system embodiment of the present invention;
Fig. 6 is the schematic diagram of motion control card embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
As shown in Figure 1, being the flow diagram of control card resource allocation method first embodiment of the present invention, control card money
Source configuration method is suitable for motion control card, and this method specifically can be by running on the software realization of host computer, and this method has
Body the following steps are included:
Step S11: generating resource distribution file, and resource distribution file includes multiple resource records, and each resource record
A corresponding physical resource, physical resource are local physical resource or bus physical resource.
Specifically, above-mentioned resource distribution file can generate in the following manner: firstly, by attribute be arranged interface (such as
The attribute be arranged interface can be graphic user interface) obtain local physical resource or bus physical resource attribute data (i.e.
User is arranged interface by attribute and inputs relevant attribute data, above-mentioned attribute setting interface specifically can using list option,
The modes such as text box);Then, resource record is generated according to attribute data, and resource distribution file is written into resource record.
Particularly, the resource record of each type can correspond to an attribute setting interface, and different types of resource record
According to different attribute, the local physical resource or the generation of bus physical resource that interface obtains are set.And interface is arranged in above-mentioned attribute
Received attribute data includes the channel number of bus resource or the channel number of local resource, and the channel number pair of each bus resource
Answer a bus physical resource, corresponding one local physical resource of the channel number of each local resource.
Step S12: by resource distribution file each resource record and a unique serial number establish mapping relations, it is raw
At the mapping table of resource record and serial number.Specifically, above-mentioned serial number includes type codes and sequence code, resource record includes more
A type, and the resource record of same type uses type codes having the same and different sequence codes.
Specifically, above-mentioned resource record includes with one or more of Types Below: axis resource, digital quantity input resource,
Digital output resource, analog input resource, analog output resource, coder resource, temperature sensor resource.
As shown in Fig. 2, above-mentioned bus physical resource 2 is specific can include: axis servomotor, pulse output shaft, digital quantity input, number
The output of word amount, analog input, analog output, encoder and temperature sensor etc., and the servo in bus physical resource
Axis, the corresponding resource record of pulse output shaft type be total spool resource, the digital quantity in bus physical resource, which inputs, to be corresponded to
The type of resource record be that digital quantity inputs resource, the class of the corresponding resource record of digital output in bus physical resource
Type is digital output resource, and the type of the corresponding resource record of analog input in bus physical resource is analog input
Resource, the type of the corresponding resource record of analog output in bus physical resource are analog output resource, bus physical
The type of the corresponding resource record of encoder in resource is coder resource, and the temperature sensor in bus physical resource is corresponding
Resource record type be temperature sensor resource.
Above-mentioned local physical resource 1 is specific can include: analog quantity closed loop axis, pulse output shaft, analog input, analog quantity
Output, digital quantity input, digital output and encoder etc., and the analog quantity closed loop axis in local physical resource, pulse are defeated
The type of the corresponding resource record of shaft is this earth's axis resource 11, the corresponding resource note of the analog input in local physical resource
The type of record is analog input resource, and the type of the corresponding resource record of analog output in local physical resource is simulation
Amount exports resource, and the type that the digital quantity in local physical resource inputs corresponding resource record is that digital quantity inputs resource, this
The type of the corresponding resource record of digital output in ground physical resource is digital output resource, in local physical resource
The type of the corresponding resource record of encoder is coder resource.
For building for application system, it is possible to only need local physical resource 1, it is also possible to only need bus physical
Resource 2, in some instances it may even be possible to need being used in mixed way for two kinds of resources.
Step S13: it when receiving resource access instruction, is reflected according to the serial number inquiry carried in resource access instruction
Relation table is penetrated, the corresponding resource record of serial number is obtained, and accesses the corresponding local physical resource of resource record or bus physical money
Source, without specified specific local physical resource or bus physical resource.
The present embodiment is maintaining the same of the usage mode of existing Control card by configuring to control card resource
When, improve ease for use and compatibility of the developer when using control card;In terms of the inheritance of software, developer is improved
Development efficiency.
Above-mentioned control card resource allocation method further include: the maximum value of the resource record of each type is set, and is being incited somebody to action
When each resource record and a unique serial number in resource distribution file establish mapping relations, if any type of resource is remembered
Record reports an error when being more than corresponding maximum value.That is user, can be according to the maximum value of above-mentioned setting when inputting relevant attribute data
It reports an error.It is counted by the validity to resource, prevents developer from improving software development to the maloperation of resource
Robustness.
By taking the resource allocation method of axis resource as an example, as shown in figure 3, turning left from the right side, to local physical resource 1 and bus object
It manages resource 2 and carries out resource allocation.Firstly, generate resource distribution file, by attribute be arranged interface obtain local physical resource 1 or
The attribute data of bus physical resource 2, attribute data include channel number CHN0~CHNX of bus resource or leading to for local resource
Taoist monastic name CHN0~CHN5, and the corresponding bus physical resource 2 of channel number CHN0~CHNX of each bus resource, it is each described
Corresponding one local physical resource 1 of channel number CHN0~CHN5 of local resource.Specifically, due to total spool resource have it is different
Type, 1 axis of a website band having, some websites can support 4 axis, therefore channel number is corresponding with bus physical resource 2
Principle is using the 1st of egress bus total spool resource as the channel number 0 of bus, and the direction gone out along bus will own
Axis picks out, and carries out label by 0~N.
Similarly, for this earth's axis resource, then the sequence of 0~N, local in figure can be carried out according to the intrinsic mark of local resource
Axis resource only has 6 channel number CHN0~CHN5.
The attribute data that interface obtains is set according to attribute and generates resource record, and resource record write-in resource distribution is literary
Part, by resource distribution file each resource record and a unique serial number AXIS0~AXIS31 establish mapping relations, it is raw
At the mapping table of resource record and serial number AXIS0~AXIS31.After the Resource-Allocation Result for obtaining all axis resources,
User only need to inquire mapping table according to the serial number AXIS0~AXIS31 carried in resource access instruction, obtain serial number AXIS0
The corresponding resource record of~AXIS31, and access the corresponding local physical resource 1 of resource record or bus physical resource 2.
It is also similar for other non-axis resources, as shown in figure 4, the non-axis resource of bus and local non-axis resource, are similarly pressed
Each resource record and a unique serial number are established into mapping relations according to respective resource distribution file, generate resource record with
After the mapping table of serial number, mapping table is inquired according to the serial number carried in resource access instruction, it is corresponding to obtain serial number
Resource record, and the non-axis resource in the corresponding local of resource record or the non-axis resource of bus are accessed, complete the configuration to non-axis resource.
For bus resource, with PDO, (Process Data Object crosses number of passes to the data of user interface general operation
According to object, in bus, agreement can be used to the data that timing is exchanged between many nodes) form access, but sometimes
User may need the resource for being specifically not mapped to PDO to access, then need through SDO (Service Data
Objects Service Data Object is a kind of for the specification for using unified data programming model between different data sources
Illustrating) access mode of website carries out.
The present invention also provides a kind of control card resource configuration systems 3, as shown in figure 5, the control card resource configuration system 3 wraps
It includes:
Resource distribution file generation unit 31, for generating resource distribution file, resource distribution file includes multiple resources
Record, the corresponding physical resource of each resource record, wherein physical resource may include local physical resource or bus physical money
Source;
Mapping relations establish unit 32, for by each resource record and a unique serial number in resource distribution file
Mapping relations are established, the mapping table of resource record and serial number is generated;
Resource access process unit 33, for being carried according in resource access instruction when receiving resource access instruction
Serial number inquire the mapping table, obtain the corresponding resource record of serial number, and access the corresponding local physics of resource record
Resource or bus physical resource.
The present invention also provides a kind of motion control cards 4, as shown in fig. 6, the motion control card 4 includes memory 41 and processing
Device 42, and the computer program that can be run in processor 42 is stored in memory 41, it is real that processor 42 executes computer program
Now the step of control card resource allocation method as described above.
The present invention also provides a kind of storage medium, computer program is stored on storage medium, computer program is processed
When device executes, the step of realizing control card resource allocation method as described above.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by anyone skilled in the art,
It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of protection of the claims
Subject to.
Claims (10)
1. a kind of control card resource allocation method characterized by comprising
Resource distribution file is generated, the resource distribution file includes multiple resource records, each resource record corresponding one
A physical resource, the physical resource are local physical resource or bus physical resource;
By in the resource distribution file each resource record and a unique serial number establish mapping relations, generate resource note
The mapping table of record and serial number;
When receiving resource access instruction, the mapping relations are inquired according to the serial number carried in the resource access instruction
Table obtains the corresponding resource record of the serial number, and accesses the corresponding local physical resource of the resource record or bus physical
Resource.
2. control card resource allocation method according to claim 1, which is characterized in that the serial number includes type codes and suitable
Sequence code, the resource record includes multiple types, and the resource record of same type uses type codes having the same and difference
Sequence code.
3. control card resource allocation method according to claim 1, which is characterized in that the generation resource distribution file packet
It includes:
By attribute, the attribute data that interface obtains the local physical resource or bus physical resource is set;
Resource record is generated according to the attribute data, and the resource distribution file is written into the resource record.
4. control card resource allocation method according to claim 3, which is characterized in that the resource record of each type is corresponding
Interface is arranged in one attribute, and different types of resource record is arranged the local physics that interface obtains according to different attribute and provides
Source or bus physical resource generate.
5. control card resource allocation method according to claim 3, which is characterized in that the attribute setting interface
The attribute data includes the channel number of bus resource or the channel number of local resource, and the channel number of each bus resource
A corresponding bus physical resource, corresponding one local physical resource of the channel number of each local resource.
6. control card resource allocation method according to claim 2, which is characterized in that the resource record includes with lower class
One or more of type: axis resource, digital quantity input resource, digital output resource, analog input resource, analog quantity are defeated
Resource, coder resource, temperature sensor resource out.
7. control card resource allocation method according to claim 2, which is characterized in that the method also includes:
The maximum value of the resource record of each type is set, and by each resource record and one in the resource distribution file
When a unique serial number establishes mapping relations, if any type of resource record reports an error when being more than corresponding maximum value.
8. a kind of control card resource configuration system characterized by comprising
Resource distribution file generation unit, for generating resource distribution file, the resource distribution file includes multiple resource notes
Record, each corresponding physical resource of the resource record, the physical resource include local physical resource or bus physical money
Source;
Mapping relations establish unit, for building each resource record in the resource distribution file with a unique serial number
Vertical mapping relations, generate the mapping table of resource record and serial number;
Resource access process unit, for when receiving resource access instruction, according to what is carried in the resource access instruction
Serial number inquires the mapping table, obtains the corresponding resource record of the serial number, and access the resource record corresponding
Ground physical resource or bus physical resource.
9. a kind of motion control card, which is characterized in that being stored with including memory and processor, and in the memory can be in institute
The computer program of processor operation is stated, the processor executes the computer program and realizes as any in claim 1 to 7
The step of item control card resource allocation method.
10. a kind of storage medium, which is characterized in that be stored with computer program, the computer program on the storage medium
When being executed by processor, realize as described in any one of claims 1 to 7 the step of control card resource allocation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811107190.1A CN109343957A (en) | 2018-09-21 | 2018-09-21 | Control card resource allocation method, system, motion control card and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811107190.1A CN109343957A (en) | 2018-09-21 | 2018-09-21 | Control card resource allocation method, system, motion control card and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109343957A true CN109343957A (en) | 2019-02-15 |
Family
ID=65306621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811107190.1A Pending CN109343957A (en) | 2018-09-21 | 2018-09-21 | Control card resource allocation method, system, motion control card and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109343957A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN203386202U (en) * | 2013-06-27 | 2014-01-08 | 上海联影医疗科技有限公司 | Computer communication system |
CN104657193A (en) * | 2013-11-21 | 2015-05-27 | 华为技术有限公司 | Method and device for accessing to physical resources |
CN107807840A (en) * | 2016-09-09 | 2018-03-16 | 阿里巴巴集团控股有限公司 | A kind of equipment direction connection method and device applied to virtual machine network |
CN107977335A (en) * | 2017-10-24 | 2018-05-01 | 北京全路通信信号研究设计院集团有限公司 | Method and device for accessing resources |
-
2018
- 2018-09-21 CN CN201811107190.1A patent/CN109343957A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN203386202U (en) * | 2013-06-27 | 2014-01-08 | 上海联影医疗科技有限公司 | Computer communication system |
CN104657193A (en) * | 2013-11-21 | 2015-05-27 | 华为技术有限公司 | Method and device for accessing to physical resources |
CN107807840A (en) * | 2016-09-09 | 2018-03-16 | 阿里巴巴集团控股有限公司 | A kind of equipment direction connection method and device applied to virtual machine network |
CN107977335A (en) * | 2017-10-24 | 2018-05-01 | 北京全路通信信号研究设计院集团有限公司 | Method and device for accessing resources |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11823017B2 (en) | Interoperation of machine learning algorithms | |
US11562293B2 (en) | Adaptation of machine learning algorithms | |
Rahman et al. | Challenges, applications and design aspects of federated learning: A survey | |
US20200151011A1 (en) | Load balancing of machine learning algorithms | |
US20210144012A1 (en) | Management of interoperating machine leaning algorithms | |
Talebiyan et al. | Decentralized decision making for the restoration of interdependent networks | |
CN109976761A (en) | Generation method, device and the terminal device of Software Development Kit | |
US8677310B2 (en) | Industry template abstracting and creation for use in industrial automation and information solutions | |
Schmidt | Trustworthy components––compositionality and prediction | |
US20090327991A1 (en) | Industry template customization and transclusion for use in industrial automation and information solutions | |
EP3622449A1 (en) | Autonomous logic modules | |
Cakalli | Nθ‐Ward Continuity | |
CN108984388A (en) | A kind of method and terminal device generating automatic test cases | |
Chen et al. | Semisupervised anomaly detection of multivariate time series based on a variational autoencoder | |
Berman et al. | The minmax regret gradual covering location problem on a network with incomplete information of demand weights | |
US7970637B2 (en) | Activity-centric granular application functionality | |
CN108509627A (en) | data discretization model training method and device, data discrete method | |
CN113158189B (en) | Method, device, equipment and medium for generating malicious software analysis report | |
Copie et al. | From cloud governance to iot governance | |
El Beqqal et al. | Taxonomy on IoT Technologies for Designing Smart Systems. | |
Feng et al. | Decomposition of fuzzy soft sets with finite value spaces | |
Pan et al. | An efficiency approach for RBAC reconfiguration with minimal roles and perturbation | |
CN116910567B (en) | Online training sample construction method and related device for recommended service | |
CN109343957A (en) | Control card resource allocation method, system, motion control card and storage medium | |
de Kinderen et al. | Multi-level modeling as a language architecture for reference models: on the example of the smart grid domain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190215 |
|
RJ01 | Rejection of invention patent application after publication |