CN101950167B - Simulated embedded type numerical control system based on Windows operating system and implementation method thereof - Google Patents
Simulated embedded type numerical control system based on Windows operating system and implementation method thereof Download PDFInfo
- Publication number
- CN101950167B CN101950167B CN2010105128893A CN201010512889A CN101950167B CN 101950167 B CN101950167 B CN 101950167B CN 2010105128893 A CN2010105128893 A CN 2010105128893A CN 201010512889 A CN201010512889 A CN 201010512889A CN 101950167 B CN101950167 B CN 101950167B
- Authority
- CN
- China
- Prior art keywords
- cnc
- windows
- software
- analogue system
- virtual
- 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
Links
Images
Landscapes
- Programmable Controllers (AREA)
- Stored Programmes (AREA)
- Numerical Control (AREA)
Abstract
The invention provides a simulated embedded type numerical control system based on a Windows operating system. The invention realizes a virtual computerized numerical control (CNC) system driver in Windows environment, transplants uC/OS-II based on Windows thread and runs uC/OS-II in the Windows operating system after transplantation, and provides a virtual operating environment for CNC application software. Thus, the invention realizes transplantation of CNC software to simulated direct numerical control system software, and highly conforms to man-machine interaction and functions of the real object of the numerical control system, thereby achieving good simulation effect.
Description
Technical field
The present invention relates to the numerical control emulation technology, be specifically related to a kind of emulation built-in digital control system and its implementation based on Windows operating system.
Background technology
Along with the continuous development of embedded Control technology, embedded controller is popularized in industrial every aspect day by day.And the embedded Control imitation technology has also obtained fast development, and still, existing domestic numerical control imitation technology is that external function according to digital control system shows again that design software imitates, and occurs insufficiency unavoidably, shows problems such as inconsistent.
Summary of the invention
The objective of the invention is to overcome weak point of the prior art; A kind of emulation built-in digital control system based on Windows operating system is provided; The present invention has realized virtual CNC (numerically-controlled machine) system driver under the Windows environment, uC/OS-II is carried out the transplanting based on the Windows thread, for the CNC application software provides virtual running environment; Run on Windows operating system after the transplanting; Realization is directly transplanted cnc system software the software emulation of CNC, and is consistent with man-machine interaction, function apparent altitude that digital control system is in kind, reached good simulated effect.
Another object of the present invention is to provide the implementation method of above-mentioned emulation built-in digital control system based on Windows operating system.
The objective of the invention is to realize through following technical scheme: a kind of emulation built-in digital control system based on Windows operating system comprises:
The external unit that embedded type C NC software is connected is transplanted to Windows user's interface program that Windows operating system is generated;
The computing machine of installation and operation indows operating system;
The CNC analogue system that embedded type C NC software transplanting is generated to Windows operating system;
Driver in the embedded type C NC software is transplanted to the virtual Drive Layer that Windows operating system generates;
The virtual uC/OS-II operating system of using the uC/OS-II operating system in the virtual embedded type C NC of the Windows thread software to be generated.
In the said system, said virtual Drive Layer is provided with:
Use the normative document IO interface of Windows to redefine the file system that the original file system interface in the embedded type C NC software is generated, make the CNC analogue system use the file system of Windows, direct computed disk is as storer;
Display driver; For the drawing interface of CNC analogue system provides a contiguous memory storage video data; The size of data field is by display resolution and quality of colour decision, and Windows user's interface program transfers bitmap to from display driver reading displayed data and shows, the liquid crystal display of simulation CNC;
Keyboard drive is the interface that the CNC analogue system provides the keyboard scan status data to visit, and Windows user's interface program is notified the CNC analogue system with the keyboard state of software simulation through keyboard drive;
Nonvolatile random access memory (NVRAM) in virtual driving, uses a disk file storage NVRAM variate-value, when the CNC analogue system starts, reads variate-value to ram space from file, supplies the CNC analogue system to use; When the CNC analogue system was closed, to disk file, when making startup next time of CNC analogue system, the NVRAM variable remained the value of close moment last time with storage of variable values;
Input/output end port is used for the signal I/O of the axis servomotor amount of movement output of CNC analogue system, embedded PLC, aanalogvoltage output, spindle encoder and the input of handwheel code device signal of speed of mainshaft control, is specially:
Axis servomotor amount of movement output, when the operation of CNC analogue system produced axis servomotor and moves, through virtual driving output amount of movement, in CNC software, the frequency of amount of movement output was very high, twice output be spaced apart Millisecond.Adopt the formation of going in ring to store the amount of movement of the each output of each axis servomotor in the virtual driving, offer Windows user's interface program and use, with the motion of emulation axis servomotor; The input/output signal of embedded PLC; Carry out the aanalogvoltage output of speed of mainshaft control; Spindle encoder and the input of handwheel scrambler.
The implementation method of above-mentioned emulation built-in digital control system based on Windows operating system is specially:
With the Windows operating system generation CNC analogue system of embedded type C NC software transplanting to computing machine;
The Windows operating system of driver in the embedded type C NC software being transplanted to computing machine generates virtual Drive Layer;
Use the uC/OS-II operating system in the virtual embedded type C NC of the Windows thread software, generate virtual uC/OS-II operating system.
In the said method, the uC/OS-II operating system in a virtual embedded type C NC of Windows thread of the said use software generates virtual uC/OS-II operating system, specifically comprises the acquisition of clock TICK, the generation that clock interrupts, and task context switches.
The present invention compares that prior art has the following advantages and beneficial effect:
The present invention has realized virtual CNC (numerically-controlled machine) system driver under the Windows environment; UC/OS-II is carried out the transplanting based on the Windows thread; For the CNC application software provides virtual running environment, run on Windows operating system after the transplanting, realize the software emulation of CNC is directly transplanted cnc system software; Consistent with man-machine interaction, function apparent altitude that digital control system is in kind, reached good simulated effect.
Description of drawings
Fig. 1 is a structural representation of the present invention.
Fig. 2 is the particular flow sheet of clock interruption generating among the present invention;
Fig. 3 is the operational flowchart of CNC system transplantation among the present invention.
Embodiment
Below in conjunction with embodiment and accompanying drawing the present invention is described in further detail, but embodiment of the present invention is not limited thereto.
Generally speaking; Technical scheme of the present invention is exactly under the Windows operating system environment, to pass through the related hardware Drive Layer of software simulation embedded system; And the uC/OS-II operating system of using the simulation of Windows thread; Create a virtual built-in system software running environment, transplant the application software of embedded controller, with the external unit of Windows user's interface program simulation CNC connection; CNC software is operated these equipment through virtual Drive Layer, realized emulation embedded controller.
Below in conjunction with embodiment and accompanying drawing the present invention is described in further detail.
Embodiment 1
As shown in Figure 1, the emulation built-in digital control system based on Windows operating system comprises:
The external unit that embedded type C NC software is connected is transplanted to Windows user's interface program that Windows operating system is generated;
The computing machine that contains Windows operating system;
The CNC analogue system that embedded type C NC software transplanting is generated to Windows operating system;
Driver in the embedded type C NC software is transplanted to the virtual Drive Layer that Windows operating system generates;
The virtual uC/OS-II operating system of using the uC/OS-II operating system in the virtual embedded type C NC of the Windows thread software to be generated.
One, virtual Drive Layer
Driver accordant interface function in virtual driving realization and the former CNC software for application layer software provides and the mutual essential interface of hardware, mainly comprises file system; Display driver; Keyboard drive, nonvolatile random access memory (NVRAM), input/output end port etc.
1.1, file system
Virtual driving uses the normative document IO interface of Windows to redefine the original file system interface, makes CNC software use the file system of Windows, and direct computed disk is as storer.
1.2, display driver
Display driver is that the drawing interface of CNC software provides a contiguous memory storage video data, and the size of data field is by display resolution and quality of colour decision.Windows user's interface program transfers bitmap to from display driver reading displayed data and shows, the liquid crystal display of simulation CNC.
1.3, keyboard drive
Keyboard drive provides the interface of keyboard scan status data visit for CNC software.Windows user's interface program is notified CNC software with the keyboard state of software simulation through keyboard drive.
1.4, nonvolatile random access memory (NVRAM)
In virtual driving, use a disk file storage NVRAM variate-value, when emulation CNC starts, read variate-value to ram space from file, supply CNC software to use; When emulation CNC closes, storage of variable values is arrived disk file.When making emulation CNC startup next time, the NVRAM variable remains the value of close moment last time.
1.5, input/output end port
Input/output end port drives and mainly comprises:
1.5.1 axis servomotor amount of movement output.When CNC running software generation axis servomotor moves, through virtual driving output amount of movement.In CNC software, the frequency of amount of movement output is very high, twice output be spaced apart Millisecond.Adopt the formation of going in ring to store the amount of movement of the each output of each axis servomotor in the virtual driving, offer Windows user's interface program and use, with the motion of emulation axis servomotor.
1.5.2 the input/output signal of embedded PLC.
1.5.3 carry out the aanalogvoltage output of speed of mainshaft control.
1.5.4 spindle encoder and the input of handwheel scrambler.
Two, virtual uC/OS-II operating system layer
Use a Windows thread to realize virtual uC/OS-II operating system, make CNC software directly run on Windows, reduce the work relevant in the migration process with operating system through virtual uC/OS-II operating system.This virtual level is that uC/OS-II is carried out the transplanting based on the Windows thread in fact, and its all tasks are all moved in the thread of Windows.
The transplanting of uC/OS-II mainly comprises three contents: the acquisition of clock TICK, and the generation that clock interrupts, task context switches.
2.1, the acquisition of clock TICK
Simulation softward itself is to operate under the Windows, does not need hard real-time, therefore adopts the software timer of Windows, produces simulated clock simulation clock TICK through the timeSetEvent () function that uses timing accuracy ms level.Its function prototype: MMRESULT timeSetEvent (UINT uDelay; UINT uResolution; LPTIMECALLBACK lpTimeProc, WORD dwUser, UINT fuEvent); The task definition that needs are periodically carried out in the lpTimeProc call back function, thereby accomplish the incident of required processing.Can increase a thread after calling this function, the time one is to then in this thread, calling call back function.
2.2, the generation interrupted of clock
TimeSetEvent () function call timing call back function and main thread do not play the effect of interruption simultaneously by the Windows operating system scheduling.So when calling regularly call back function lpTimeProc, must stop the operation of main thread; Withdraw from the operation that call back function then recovers main thread; These things all are placed on regularly call back function, just accomplish in the clock Interrupt Process function of uC/OS-II, and are as shown in Figure 2.
2.3 task context switches
The difference that task context here and uC/OS-II transplant on x86 is that segment register need not be preserved; Because the uC/OS-II task under Windows is just switched in same thread in fact; And under protected mode segment register, its value can not become in same thread.
Three, the CNC system software is transplanted
The CNC system software is externally regularly to carry out the interpolation processing in the interrupt response.The CNC system of simulation operates in on the virtual uC/OS-II system of Windows Thread, and all tasks of CNC all operate in the thread, and has only simulated clock TICK interruption.Simulation softward does not have the real-time requirement, carries out in the highest task of priority so can interpolation be handled, and periodically calls former break in service function, again the task process is carried out few modifications and gets final product.Like the flow process of Fig. 3 for the interpolation Processing tasks.
The foregoing description is a preferred implementation of the present invention; But embodiment of the present invention is not restricted to the described embodiments; Other any do not deviate from change, the modification done under spirit of the present invention and the principle, substitutes, combination, simplify; All should be the substitute mode of equivalence, be included within protection scope of the present invention.
Claims (2)
1. the emulation built-in digital control system based on Windows operating system is characterized in that, comprising:
External unit with Windows user's interface program simulation CNC connection;
The computing machine of installation and operation Windows operating system;
The CNC analogue system that embedded type C NC software transplanting is generated to Windows operating system;
Driver in the embedded type C NC software is transplanted to the virtual Drive Layer that Windows operating system generates, and said virtual Drive Layer is provided with:
Use the normative document IO interface of Windows to redefine the file system that the original file system interface in the embedded type C NC software is generated, make the CNC analogue system use the file system of Windows, direct computed disk is as storer;
Display driver; For the drawing interface of CNC analogue system provides a contiguous memory storage video data; The size of data field is by display resolution and quality of colour decision, and Windows user's interface program transfers bitmap to from display driver reading displayed data and shows, the liquid crystal display of simulation CNC;
Keyboard drive is the interface that the CNC analogue system provides the keyboard scan status data to visit, and Windows user's interface program is notified the CNC analogue system with the keyboard state of software simulation through keyboard drive;
Nonvolatile random access memory in virtual driving, uses a disk file storage nonvolatile random access memory variate-value, when the CNC analogue system starts, reads variate-value to ram space from file, supplies the CNC analogue system to use; When the CNC analogue system was closed, to disk file, when making startup next time of CNC analogue system, the nonvolatile random access memory variable remained the value of close moment last time with storage of variable values;
Input/output end port; Be used for the signal I/O of the axis servomotor amount of movement output of CNC analogue system, embedded PLC, aanalogvoltage output, spindle encoder and the input of handwheel code device signal of speed of mainshaft control; Said input/output end port carries out the axis servomotor amount of movement output of CNC analogue system, is specially: when CNC analogue system operation generation axis servomotor moves, through virtual driving output amount of movement; In CNC software; The frequency of amount of movement output is very high, twice output be spaced apart Millisecond, adopt the formation of going in ring to store the amount of movement of the each output of each axis servomotor in the virtual driving; Offer Windows user's interface program and use, with the motion of emulation axis servomotor;
The virtual uC/OS-II operating system of using the uC/OS-II operating system in the virtual embedded type C NC of the Windows thread software to be generated.
2. the implementation method of the emulation built-in digital control system based on Windows operating system according to claim 1 is characterized in that, is specially:
With the Windows operating system generation CNC analogue system of embedded type C NC software transplanting to computing machine;
The Windows operating system of driver in the embedded type C NC software being transplanted to computing machine generates virtual Drive Layer, and said virtual Drive Layer is provided with:
Use the normative document IO interface of Windows to redefine the file system that the original file system interface in the embedded type C NC software is generated, make the CNC analogue system use the file system of Windows, direct computed disk is as storer;
Display driver; For the drawing interface of CNC analogue system provides a contiguous memory storage video data; The size of data field is by display resolution and quality of colour decision, and Windows user's interface program transfers bitmap to from display driver reading displayed data and shows, the liquid crystal display of simulation CNC;
Keyboard drive is the interface that the CNC analogue system provides the keyboard scan status data to visit, and Windows user's interface program is notified the CNC analogue system with the keyboard state of software simulation through keyboard drive;
Nonvolatile random access memory in virtual driving, uses a disk file storage nonvolatile random access memory variate-value, when the CNC analogue system starts, reads variate-value to ram space from file, supplies the CNC analogue system to use; When the CNC analogue system was closed, to disk file, when making startup next time of CNC analogue system, the nonvolatile random access memory variable remained the value of close moment last time with storage of variable values;
Input/output end port; Be used for the signal I/O of the axis servomotor amount of movement output of CNC analogue system, embedded PLC, aanalogvoltage output, spindle encoder and the input of handwheel code device signal of speed of mainshaft control; Said input/output end port carries out the axis servomotor amount of movement output of CNC analogue system, is specially: when CNC analogue system operation generation axis servomotor moves, through virtual driving output amount of movement; In CNC software; The frequency of amount of movement output is very high, twice output be spaced apart Millisecond, adopt the formation of going in ring to store the amount of movement of the each output of each axis servomotor in the virtual driving; Offer Windows user's interface program and use, with the motion of emulation axis servomotor;
Use the uC/OS-II operating system in the virtual embedded type C NC of the Windows thread software, generate virtual uC/OS-II operating system, specifically comprise the acquisition of clock TICK, the generation that clock interrupts, and task context switches.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105128893A CN101950167B (en) | 2010-10-20 | 2010-10-20 | Simulated embedded type numerical control system based on Windows operating system and implementation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010105128893A CN101950167B (en) | 2010-10-20 | 2010-10-20 | Simulated embedded type numerical control system based on Windows operating system and implementation method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101950167A CN101950167A (en) | 2011-01-19 |
CN101950167B true CN101950167B (en) | 2012-05-30 |
Family
ID=43453685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010105128893A Active CN101950167B (en) | 2010-10-20 | 2010-10-20 | Simulated embedded type numerical control system based on Windows operating system and implementation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101950167B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104317632A (en) * | 2014-09-28 | 2015-01-28 | 航天科工深圳(集团)有限公司 | Method and system for simulating virtual hardware environment for running of UCOS-II (micro control operation system - two) in Windows system |
CN110488763B (en) * | 2019-08-27 | 2021-06-29 | 泉州市大鲨鱼机械科技有限公司 | Interactive interface system based on numerical control controller of wire saw |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6205372B1 (en) * | 1993-07-28 | 2001-03-20 | Thurston/Amt Partnership | System for adapting an automatic screw machine control achieve computer numeric control |
KR20000033804A (en) * | 1998-11-25 | 2000-06-15 | 토니헬샴 | Engine control simulation device and method thereof |
CN100507853C (en) * | 2005-07-20 | 2009-07-01 | 北京华力创通科技有限公司 | Double core semi physical simulation system |
CN201084005Y (en) * | 2007-10-24 | 2008-07-09 | 武汉电力职业技术学院 | Embedded machine tool numerical control system based on ARM technology |
US8209469B2 (en) * | 2009-03-10 | 2012-06-26 | Microsoft Corporation | Offline device-side logical unit number controller |
CN101630343B (en) * | 2009-08-18 | 2011-07-13 | 中兴通讯股份有限公司 | Simulation method and simulation system |
-
2010
- 2010-10-20 CN CN2010105128893A patent/CN101950167B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN101950167A (en) | 2011-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102354155B (en) | Real-time core of open numerical control system and real-time control method of edge curve | |
CN104808592A (en) | Numerical control system based on virtual upper computer | |
CN204615704U (en) | A kind of modularization controllor for step-by-step motor based on ARM platform | |
CN103399798A (en) | Multitask control method and multitask control device of PLC (programmable logic controller) | |
CN102681465A (en) | Industrial robot demonstration planner with motion planning function and control method for industrial robot demonstration planner | |
CN105137800A (en) | PLC cooperative control device based on SOPC technology | |
CN102662349B (en) | Cross-platform numerical control system | |
CN101950167B (en) | Simulated embedded type numerical control system based on Windows operating system and implementation method thereof | |
CN102819450B (en) | The simulator of a kind of equipment of analog hardware in the terminal and its implementation | |
CN205003526U (en) | PLC cooperative control device based on SOPC technique | |
CN102621960A (en) | Advanced RISC machine-Linux (ARM-Linux)-based compiled programmable automation control (PAC) | |
CN208588917U (en) | A kind of industrial robot motion controller based on ARM+DSP+FPGA | |
CN110597191A (en) | Industrial control cloud service system | |
CN101650563B (en) | Self-adapting control method and system for associated data stream | |
CN102354154B (en) | Real-time kernel chip of open numerical control system | |
CN201945835U (en) | Embedded control system used for carton proofing machine | |
CN110543095A (en) | Design method of numerical control gear chamfering machine control system based on quantum frame | |
CN101349907A (en) | Numerical control system and method for optimizing data stream | |
CN103163820A (en) | Programmable logic controller (PLC) enabling program debugging to be convenient and implementing method | |
CN112830429B (en) | Method, device and equipment for controlling actions of aerial work platform and storage medium | |
CN112233498B (en) | Tabular programmable display controller | |
CN201084005Y (en) | Embedded machine tool numerical control system based on ARM technology | |
Yu et al. | Design of controller system for industrial robot based on RTOS Xenomai | |
CN204332194U (en) | A kind of teaching type servo control experiment table | |
CN102540967A (en) | Numerical control (NC) machine control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |