Summary of the invention
The objective of the invention is to overcome the above-mentioned deficiency that prior art exists, provide many granularities many-sided numerical control modeling method,, make the user can easily be familiar with its grammer to make up the digital control system model through incorporating the design concept in field.The field is described on the basis of adopting many-sided modeling, and the stratification component model that defines different abstract granularities makes up element as system model, and the NOT-function attribute that time correlation in the digital control system, resource are correlated with is given in the specific modeling element and behavior.Technical scheme of the present invention is following.
The many-sided numerical control modeling method of many granularities may further comprise the steps:
1), adopts meta-model the stratification building mode in making up; Carry out hierarchical decomposition according to the function granule size; Comprising or inheritance between each module of descriptive system, with nested, form the application system model with the link through stratification of the modeling element of the abstract granularity of difference; The digital control system component model according to granularity atomize from small to large assembly, composite component and functional unit, is divided according to this stratification, made up the Component Gallery of digital control system;
2) based on the constructed Component Gallery of step 1), adopt many-sided modeling pattern, the different aspect of complete definition digital control system.
In the many-sided numerical control modeling method of above-mentioned many granularities; Step 2) model set up of the many-sided modeling pattern of said employing comprises: the enforcement aspect model of implementation detail of target platform configured hardware aspect models such as hardware and operating system, the descriptive system operation of function aspects model, the descriptive system of the stratification relation of digital control system functional module and interactive relation is described, said implementation detail comprise that task, the task of system trigger and task between alternately.
In the many-sided numerical control modeling method of above-mentioned many granularities; Make up the digital control system meta-model, and generate the numerical control system graph modeling environment, based on this modeling environment according to this meta-model; Realize many-sided stratification modeling of digital control system, and model emulation is verified, code generates automatically.
Compared with prior art, the present invention has following advantage and technique effect:
Characteristics such as that built-in digital control system has is multi-field, complicated, hard real time, high reliability, existing numerical control modeling pattern can't accurately take out the field characteristic of digital control system and accuracy, rationality and the applicability of the field of assurance language.The present invention has made up a kind of modeling method of accurate description digital control system; On the basis of adopting many-sided modeling; The stratification component model that defines different abstract granularities makes up element as system model, and in modeling element and behavior, adds the NOT-function attribute relevant with resource with time correlation in the digital control system.The present invention improves the reliability of digital control system through making up effective modeling method of computer-oriented numerical control field, shortens the construction cycle simultaneously, improves development efficiency.
Embodiment
Below in conjunction with accompanying drawing practical implementation of the present invention is described further.
As shown in Figure 1, the many-sided numerical control modeling method of many granularities may further comprise the steps:
1), meta-model adopted the stratification construction strategy in making up; Carry out hierarchical decomposition according to the function granule size; Comprising or inheritance of each module of descriptive system, with nested, form the application system model with the link through stratification of the modeling element of the abstract granularity of difference.With the digital control system component model according to granularity atomize from small to large assembly, composite component and functional unit.The atomic function assembly is the elementary cell of composition system, has minimum abstract granularity, comprises incident or data transmission port in the atom component, i.e. interactive interface between functional module and other functional modules or the external environment condition; Carry out in the control expression atomic function assembly one group of state or state exchange, be used for algorithmic dispatching in the control function assembly, one group of algorithm and one group of built-in variable of describing the component internal data processing.Composite component representes to accomplish through component interaction the assembly of specific function, comprise one group of atom component set with and the stream data transmission of component internal transmit with flow of event.Functional unit is represented the autonomous reusable construction part module of coarseness, and its structure and composite component are similar, but is minimum distributed function module, can be distributed on the different computing nodes.Divide according to this stratification, make up the Component Gallery of digital control system, divide, definition atom component, composite component and functional unit according to the function of digital control system.Comprise human-computer interaction interface functional unit (HMI_FU), motion control function unit (MC_FU), FPGA control function unit (PLC_FU) etc. like functional unit (FU); Complex function assembly (CFB) comprises a group functional module (Axisgroup_FB), axle control function assembly (Axis_FB) etc., basic functional components (BFB) comprise decoding function assembly (Codeinterpreter_FB), speed planning functional module (AccDec_FB), etc.
2), adopt many-sided modeling pattern, the different aspect of complete definition digital control system based on Component Gallery.The target platform configured hardware aspect models such as hardware and operating system, the implementation detail of descriptive system operation, the i.e. mutual enforcement aspect model between the task of define system, task triggering and the task that comprise function aspects model, the descriptive system of the stratification relation of describing the digital control system functional module and interactive relation.The function aspects model comprise between data and the incident between the different levels assembly mutual with trigger, the hardware aspect model definition nextport hardware component NextPort and operation system information, like processor(Processor), I/O(Iospec), memory(Storage), clock(Clock)And bus(Interconnect)Deng, enforcement aspect model definition task model and the parameter relevant with real-time give in its meta-model with the mode of attribute definition, comprise duty cycle(Period), the worst execution time(WCET), task the relative time limit(deadline), task priority(Task_Priority)Deng.
3) based on 1), 2) described digital control system modeling method, can make up the numerical control meta-model, generate the digital control system field modeling and make up language; And can generate patterned digital control system modeling development environment; The digital control system that in this environment, makes up can accurately be described digital control system through modes many-sided, many granularities, guarantees its field applicability and rationality; And then the basis is provided for the simulating, verifying of digital control system and code generate automatically, improve the development efficiency and the reliability of system.
The application example of the many-sided numerical control modeling method of many granularities below is provided again, and it comprises step:
1) according to the stratification construction strategy, make up the Component Gallery of digital control system, divide definition atom component, composite component and functional unit according to the function of digital control system.Comprise human-computer interaction interface functional unit (HMI_FU), motion control function unit (MC_FU), FPGA control function unit (PLC_FU) etc. like functional unit (FU); Composite component (CFB) comprises a group functional module (Axisgroup_FB), axle control function assembly (Axis_FB) etc., and atom component (BFB) comprises decoding function assembly (Codeinterpreter_FB), speed planning functional module (AccDec_FB) etc.
2) based on the numerical control Component Gallery, the relation of inclusion in the numerical control meta-model between the definition numerical control assembly.The numerical control of the digital control system the superiors is used and is comprised human-computer interaction interface functional unit (HMI_FU), motion control function unit (MC_FU), FPGA control function unit (PLC_FU) etc.; Motion control function unit (MC_FU) comprises a group functional module (Axisgroup_FB), axle control function assembly complex function assemblies such as (Axis_FB), comprises smart interpolation function assembly (FinerIPO_FB), position control functional module (Positioncontrol_FB) etc. again in the axle control function assembly (Axis_FB).
3) the many-sided meta-model of definition digital control system.Mutual and triggering between data between the function aspects meta-model definition different levels assembly and incident; The numerical control assembly comprises FPDP (Dataport) and incident port (Eventport); FPDP (Dataport) comprises data-in port and data-out port; Link to each other through DataflouCon between the FPDP, incident port (Eventport) comprises incident input port (Eventinput) and incident output port (Eventoutput), links to each other through EventflouCon between the incident port; Data-in port is connected through Within with the incident input port, and data-out port is connected through Without with the incident output port.The data type of TypeRefBase define system is given FPDP through Datatyping, gives the incident port through Eventtyping, gives the built-in variable of basic functional components (BFB) through Invartyping.The function aspects meta-model is stored in the functional layer (FunctionFolder).
4) definition platform aspect meta-model.The configuration of target platforms such as the hardware of platform aspect meta-model define system and operating system.Nextport hardware component NextPort (HW_component) and operating system (OS) are included in the platform model (Platform); Nextport hardware component NextPort has defined processor (Processor), I/O (Iospec), memory (Storage), clock (Clock) and bus (Interconnect) etc.; Nextport hardware component NextPort comprises hardware port (HW_Port); Mutual with other nextport hardware component NextPorts through mutual (Phyconnection), processor (Processor) links to each other through CPUOS_conn with operating system.The performance parameter of nextport hardware component NextPort is given in its meta-model through attribute definition; In processor (Processor); Defined processor type (Process_type) and processor frequencies (Process_frequency), selected and define when supplying user modeling.Platform visual angle meta-model is stored in the podium level (PlatformFolder).
5) the enforcement aspect meta-model of define system.The implementation detail of enforcement aspect meta-model define system operation, promptly the task of define system, task trigger and task between mutual.Task model (Task) is implemented the visual angle meta-model and is stored in the enforcement visual angle (RuntimeFolder).Parameter relevant with real-time in the task model is given in its meta-model with the mode of attribute definition, comprises the relative time limit (deadline) of duty cycle (Period), the worst execution time (WCET), task, the priority (Task_Priority) of task etc.
6) through the definition correlation map, that function aspects meta-model, hardware aspect meta-model and enforcement aspect meta-model is interrelated, and component model is mapped on the task model.
7) based on the meta-model that makes up, generate towards the graphical modeling environment of digital control system exploitation, supply the digital control system developer to carry out system modelling, and can carry out simulating, verifying and code generates automatically based on this model.