Summary of the invention
The technical problem to be solved in the present invention provides a kind of open soft numerical control system of recombinating based on Windows CE.NET, this system can save motion control card, reduce the cost of total system, can recombinate to numerical control software according to actual needs by user oneself or system development merchant simultaneously, obtain greater flexibility, satisfy the different demands of different user easily and quickly, be applied to multiple machine tool types such as numerically controlled lathe, milling machine, drilling machine, grinding machine, angle pipe equipment.
The technical scheme that addresses the above problem is (referring to Fig. 1, Fig. 2, Fig. 3): the present invention is made up of the reorganization development platform that the embedded board machine more than 32 and 32, Digital I interface card, software package are formed;
Described embedded board machine is provided with central microprocessor (1), and central microprocessor is connected with clock generator (14) with power supply, and
Link to each other with Ethernet interface (7) with ethernet controller by pci bus (15);
Link to each other with bus controller (2) with display controller by internal bus;
Be connected with internal memory SDRAM (12) by memory interface;
Above-mentioned display controller is connected PC/104 bus interface (3), serial line interface (6), parallel interface (5), CF card (13), hard-disk interface (11), BIOS (10) with bus controller (2) respectively by PC/104 bus (16); Be provided with USB (universal serial bus) USB (8), keyboard and mouse interface (9), LCD interface or VGA interface (4) simultaneously; Wherein the CF card has been stored the Windows CE.NET operation system image according to the motherboard hardware customization, and the numerical control application program, and operation system image and numerical control application program are formed by the software development environment configuration;
Described display controller and bus controller, as the bridge between system's central microprocessor connection miscellaneous part, the PCI of support standard and PC104 bus, and connect LCD or regular display (CRT) by display controller, the information of carrying out shows, in the bus controller management system between each parts and with the data communication of central microprocessor, the task of coordinating between each parts is handled;
Described PC/104 bus interface provides the embedded main board extended capability;
Described Digital I interface card is provided with logic controller (20), logic controller is connected with timer counter (17), timer interrupt logic (18), PC/104 bus interface (19), clock (21), IO interrupt logic (22), buffer digital IO interface (23) respectively, carries out logic control;
Above-mentioned timer counter (17) links to each other with timer interrupt logic (18), produces regularly interrupt control;
Timer counter (17) is connected with 4-axle generic interface (25), 4-axle differential interface (26) respectively, and the signal of control servomotor is provided;
Timer counter (17) is connected to form counter with encoder interfaces (24) and clock (21), and the pulse of scrambler is counted;
Described Digital I interface card is connected to the PC/104 bus interface (3) of embedded board machine by PC/104 bus interface (19), is controlled by mainboard and software;
Above-mentioned Digital I interface card is formed the digital interface plate of open type soft numerical control system of the present invention, meet the PC/104 bus standard, have from the ability of piling up, the digital interface plate is by servomotor, scrambler, limit switch, state detection sensor in the interface linking number controlled machine, so that transmission and the control between control data or status data and the execution unit to be provided;
Described reorganization development platform is provided with system requirements describer/analyzer/automatic modeling device, functional block editing machine, functional block connector, functional block compiler, functional block storehouse, software motion control and PLC software module library, fault diagnosis module storehouse, human-computer interaction function module library, embedded object connection procedure control (OPC) server module storehouse and hardware drive program storehouse and embedded OS customizer; Above-mentioned reorganization development platform comprises digital control system development environment and running environment, and wherein development environment and running environment are separated from each other, and running environment is to be generated by the development environment reorganization;
On the reorganization platform, form system requirements according to regular input system demand and describe, generate the functional module that the user needs in the digital control system by described system requirements describer/analyzer/automatic modeling device; Create the functional module that the self-built user of user needs by described functional module editing machine; Create user's numerical control application function piece logic by the functional module connector again, by the functional block compiler user's numerical control application function piece logic, with comprised the described functional block storehouse of the realization of Processing Algorithm control in a certain respect respectively, software motion control and PLC software module library, the fault diagnosis module storehouse, the human-computer interaction function module library, the opc server module library, corresponding module compiles connection in the functional module that the self-built user of hardware drive program storehouse and user needs, produce the numerical control software of customer requirements, video according to hardware customization Windows CE.NET embedded real-time operating system by the embedded OS customizer then, operation system image and numerical control software are packaged into scale-of-two compression reflection, download to the embedded target hardware platform and be stored on the CF card, realization is generated numerical control software and embedded real-time operating system reflection as required and is downloaded on the target hardware platform by the reorganization platform and moves, and carries out digital control processing.Digital interface plate of the present invention produces regular look-at-me has beat to the motion control process control by software control, output is the direction and the rate signal of control servomotor in real time, finish the motion control task of system, the pulse number that receives motor servo driver or the output of grating chi by encoder interfaces is counted, obtain the current location of servomotor motion in real time, realize High Accuracy Control, the Digital I interface card realizes that with numerical control software soft programmable logic controller (PLC) (PLC) controls the technology logical order of each parts in the lathe, finish the control of process of manufacture, and the status information of receiving sensor and switch provides the status information of process and fault diagnosis in real time;
This numerical control system except with the driving interface in the external world, all realize by single board computer, and the software function module of digital control system can dispose by system development environment, in actual applications, numerical control software of the present invention and embedded real-time operating system reflection, can use the reorganization development platform by user or system development merchant processing request according to product, forming system requirements according to regular input system demand describes, by the system requirements describer/analyzer in the development platform/automatic modeling device, generate the functional module that the user needs in the digital control system; The user also can be as required, create the functional block that oneself needs by the functional block editing machine, functions of use piece connector is created user's numerical control application function piece logic then, the functional block storehouse that user's numerical control application function piece logical and is provided in advance by the functional block compiler, software motion control and PLC software module library, the fault diagnosis module storehouse, the human-computer interaction function module library, corresponding module compiles connection in opc server module library and the hardware drive program storehouse, produce the numerical control software of customer requirements, video according to hardware customization Windows CE.NET embedded real-time operating system by the embedded OS customizer then, operation system image and numerical control software are packaged into scale-of-two compression reflection, download to the embedded target hardware platform and be stored on the CF card.The wherein mainly distribution of establishment, coordinated operation and the management control task of the instance objects of responsible each functional block of operation system image, the numerical control application function piece logic that the user creates then realize user's process of manufacture control.Thereby realization numerical control software and embedded real-time operating system reflection are generated and are downloaded on the target hardware platform by the needs of development platform according to user or system development merchant of recombinating and move, and carry out digital control processing.
Because the present invention adopts technique scheme, promptly can be applicable to multiple machine tool types such as numerically controlled lathe, milling machine, drilling machine, grinding machine, angle pipe equipment through simple reorganization; Can realize one to a plurality of kinematic axiss, a control application through simple reorganization to a plurality of peripheral auxiliary equipments; This user oriented functional block member method can make user oneself or system development merchant according to actual needs numerical control software be recombinated, and obtains greater flexibility, fast the market demand is made response;
This numerical control system except with the driving interface in the external world, the motion interpolation function of being realized by motion control card is at present all realized by the software that operates on the single board computer. die except control card, can reduce the cost of total system on the one hand, can realize the customization to digital control system on the other hand by the selection to software module, the software function module of digital control system can dispose by system development environment;
Software development environment of the present invention and running environment are separated, and is easier in the modular customization of digital control system control employing, and have opening, comparable change or the interpolation of new function and the technology of integrated renewal that is easier to realize function.
Embodiment
The invention will be further described below in conjunction with embodiment and accompanying drawing:
In Fig. 1, central microprocessor 1, display controller and bus controller 2, PC/104 bus interface 3, LCD interface or VGA interface 4, parallel interface 5, serial line interface 6, ethernet controller and Ethernet interface 7, USB (universal serial bus) (USB) 8, keyboard and mouse interface 9, BIOS10, hard-disk interface 11, internal memory (SDRAM) 12, CF card 13, clock generator and power supply 14, pci bus 15, PC/104 bus 16 are formed the embedded main board of open type soft numerical control system of the present invention.
Central microprocessor 1 links to each other with Ethernet interface 7 with ethernet controller by pci bus 15, links to each other with bus controller 2 with display controller by internal bus, is connected with internal memory (SDRAM) 12 by memory interface; Display controller is connected PC/104 bus interface 3, serial line interface 6, parallel interface 5, CF card 13, hard-disk interface 11, BIOS10 with bus controller 2 respectively by PC/104 bus 16, and USB (universal serial bus) (USB) 8, keyboard and mouse interface 9, LCD interface or VGA interface 4 are provided simultaneously.
Wherein,
Central microprocessor 1, adopt 32 high performance embedded type low-power consumption processor chips, be used for the control computing of entire system, software motion interpolation operation, scheduler task is calculated, fault diagnosis is calculated and functional coordination, is using under the working environment of videoing according to the Windows CE.NET real-time embedded operating system of embedded main board hardware customization, mainly finishes the integral body control computing to system, the motion software interpolation, the task coordinate management.And, finish the interpolation of real time kinematics software and calculate and complicated control and functional task by cooperatively interacting with the digital interface plate.
Display controller and bus controller 2, as the bridge between system's central microprocessor 1 connection miscellaneous part, the PCI of support standard and PC104 bus, the miscellaneous part of supporting PCI or PC104 bus and central microprocessor 1 and operating system coordination be can connect and real-time Data Transmission, calculating and conversion between each parts controlled, and LCD or VGA interface by display controller connect LCD or CRT, carry out real-time control data, the demonstration of information such as duty and system help.Bus controller is managing and parallel interface 5, serial line interface 6, ethernet controller and Ethernet interface 7, USB (universal serial bus) (USB) 8, universal keyboard and mouse interface 9, BIOS10, hard-disk interface 11, CF card 13 between and with the data communication of central microprocessor 1, the task of coordinating between each parts is handled.
PC/104 bus interface 3 provides the extended capability of embedded main board, supports to have other calculating, control or functional integrated circuit board of PC/104 interface.Interface is a stack, by this interface, can add a plurality of additional firmware and software modules that need later other functions, makes this digital control system have well extended capability flexibly.
LCD interface or VGA interface 4, LCD or CRT display monitor central monitoring system are provided the standard interface of control and transmitting and displaying data, to the control data of system, work state information and system help information are handled and graphical the demonstration in real time, help the user to understand the state of today's numerical control system clearly.
Parallel interface 5 provides and being connected of printer, by this interface and printer, and the job sequence information that the output user edits, system health information, system failure autodiagnosis information, user's service recorder, record of production.
Serial line interface 6, provide the computing machine of standard to carry out serial transmission interface, the standard modem that provides by software drives and the modulator-demodular unit of the standard of support, realize dial-up networking, can only use the area of modulator-demodular unit networking or the ability that the user provides special line or phone networking equally at some.Provide the data message and the control information that connect and handle between this numerical control system and factory and enterprise internal lan and the Internet network Internet to transmit.And by display controller and bus controller 2 and PC/104 bus interface 3 link to each other with the digital interface plate software remote status monitoring and the fault diagnosis of collaborative realization system together of communication and customization.
Ethernet controller and Ethernet interface 7 are used for connecting and handling this numerical control system and other digital control systems, production line numerical control Industrial Ethernet network, the data message between factory and enterprise internal lan and the Internet network Internet and control information transmission.Ethernet controller links to each other with bus controller 2 with central microprocessor 1 and display controller by pci bus 15 with Ethernet interface 7, coordination and control by bus controller, be used to receive the data message decoding network agreement that Network Transmission is come, reduction user's data and control information, the embedded real-time operating system Windows CE.NET that offers central microprocessor 1 and customization carries out the production and processing operation of PIAPACS, the digital control system on-the-spot operation information, status information, production information is simultaneously also carried out protocol code by pci bus 15 and ethernet controller and Ethernet interface 7 and is uploaded to the production management center or the data centralization server carries out stored record, supplies with historical production and analyzes and the digital control system state analysis.Ethernet controller and Ethernet interface 7 are also by pci bus 15, display controller and bus controller 2 and PC/104 bus interface 3 link to each other with the digital interface plate software remote status monitoring and the fault diagnosis of collaborative realization system together of communication and customization
USB (universal serial bus) (USB) 8 provides the function of plug and play, makes the user can use USB device to carry out data transmission, and this interface is used to manage the communication between USB device and the digital control system.Support USB portable memory apparatus, USB positioning equipment, USB input equipment, USB touch apparatus.USB (universal serial bus) (USB) 8 carries out the data message communication by display controller and bus controller 2, pci bus 15 and PC/104 bus interface 3 with other associated components.
Keyboard and mouse interface 9, being connected of system and keyboard and mouse is provided, by display controller and bus controller 2 press key message sent by user and screen locating information are input in the system, are handled by central microprocessor 1, the control that realizes user and digital control system is with mutual.
BIOS, Basic Input or Output System (BIOS) provides the initialization and the management of digital control system embedded main board hardware-level, and offers the exportable hardware service of upper layer application.
Hard-disk interface 11 and CF card 13, hard-disk interface 11 is used to provide the connection hard disk storage devices, and when needs storage Large Volume Data information, using hard disk is the mode of an economy.CF card 13 is used to deposit embedded real-time operating system, numerical control software, deposits production and processing information, system diagnostics database of information and the data and the control information of coming by Network Transmission, the zone of depositing information as total system.
Internal memory (SDRAM) 12 directly links to each other with central microprocessor 1, loads operating system and numerical control software and temporarily deposits information when providing system to move.
Above-mentioned central microprocessor, each quasi-controller and interface, parts and the digital interface plate that is connected on the PC/104 bus interface 3 interconnect by pci bus 15 and PC/104 bus, carry out coordination and management between the bus by display controller and bus controller 2, the information conveyance in the digital control system external world is handled to each corresponding component of embedded main board, and by each interface and be connected digital interface plate on the PC/104 bus interface 3 with the control command of system and data transmission to external control component.
Pci bus 15, PC/104 bus 16, pci bus 15 is supported 32 bit patterns, be used to have the equipment or the chip of pci interface, 16 of PC/104 buses provide the passage of 16 bit data width to connect a plurality of parts, pci bus 15 and 16 main connection and the communications of being responsible between controller, interface, storage CF card, USB device, input and output, digital interface plate and the central microprocessor 1 of PC/104 bus are as the bridge of transmission data, address date and control signal.
Clock generator and power supply 14 provide the power supply of whole embedded main board and digital interface plate and the work clock of driving central microprocessor, each quasi-controller, bus and interface.
Open digital interface plate shown in Figure 2 is by timer counter 17, timer interrupt logic 18, PC/104 bus interface 19, logic controller 20, clock 21, IO interrupt logic 22, buffer digital IO interface 23, encoder interfaces 24,4-axle generic interface 25,4-axle differential interface 26 is formed, meet the PC/104 bus standard, have from the ability of piling up, the digital interface plate is by the servomotor in the interface linking number controlled machine, scrambler, limit switch, state detection sensor provides transmission and control between control data or status data and the execution unit.
The digital interface plate is connected to PC/104 bus interface 3 on the embedded main board by PC/104 bus interface 19, is controlled by mainboard and software.Logic controller 20 is connected with timer counter 17, timer interrupt logic 18, PC/104 bus interface 19, clock 21, IO interrupt logic 22, buffer digital IO interface 23 respectively, carries out logic control; Timer counter 17 links to each other with timer interrupt logic 18, produces regularly interrupt control; Timer counter 17 is connected with 4-axle generic interface 25,4-axle differential interface 26 respectively, and the signal of control servomotor is provided; Timer counter 17 is connected to form counter with encoder interfaces 24 and clock 21, and the pulse of scrambler is counted.
Wherein,
Logic controller 20, be used for the data message from the embedded main board that transmits by PC/104 bus interface 19 is carried out logic decoding, timer counter 17, timer interrupt logic 18, IO interrupt logic 22,4-axle generic interface 25,4-axle differential interface 26 and buffer digital IO interface 23 are controlled, send control information or receive external encoders, sensor from encoder interfaces 24, buffer digital IO interface 23, the status information of switch, then by PC/104 bus interface 19 the status information transmission of external connecting part in digital control system.
Timer counter 17, by numerical control software the job sequence analysis is generated the motion control data, carry out after the software interpolation timer being controlled the pulse that generation can be regulated variation, with 4-axle generic interface 25 and 26 collaborative works of 4-axle differential interface, the direction and the rate signal of output control servomotor, servomotor is controlled in real time, and producing regular look-at-me by timer and timer interrupt logic has the control of beat by digital control system to the motion control process, finishes the motion control task of digital control system in the production and processing.Counter is used for the pulse number that receives outside motor servo driver or the output of grating chi by encoder interfaces 24 is counted, and obtains the current location of servomotor motion in real time, feeds back to numerical control software, realizes high-precision production and processing control.
Timer interrupt logic 18 is used for control timer and how produces look-at-me, and proposes interrupt request by the central microprocessor of PC/104 bus interface 19 on embedded main board, requires it that break in service of response is provided.
IO interrupt logic 22, how the input signal that is used for the control linkage sensor produces the look-at-me with right of priority arrangement by its state, and interrupt request is proposed by the central microprocessor of PC/104 bus interface 19 on embedded main board, require its break in service that response is provided, the state of lathe is made correct processing in real time.
Buffer digital IO interface 23, wherein digital output interface is used for gauge tap, realizes that with numerical control software soft PLC controls the technology logical order of each parts in the lathe, finishes the control of process of manufacture.Digital input interface is used for the status information of receiving sensor and switch, and the real-time PC/104 bus interface 19 of passing through feeds back to system, and the status information of process and fault diagnosis is provided.
4-axle generic interface 25 and 4-axle differential interface 26 provide the interface that connects 4 servomotors, and the rotating speed and the rotation direction of control servomotor realize motion control.Generic interface provides different connected modes respectively with differential interface, has improved the adaptive faculty of digital interface plate.
PC/104 bus interface 19 is used for and being connected of embedded main board, and realizes data communication and control between them.
Clock 21, the timer that offers timer counter 17 carries out timing, produces accurate control beat with timer interrupt logic 18.
Fig. 3 has shown that the software of open type soft numerical control system of the present invention constitutes synoptic diagram:
System software is a reorganization development platform, is made up of system requirements describer/analyzer/automatic modeling device, functional block editing machine, functional block connector, functional block compiler, functional block storehouse, software motion control and PLC software module library, fault diagnosis module storehouse, human-computer interaction function module library, opc server module library and hardware drive program storehouse and embedded OS customizer.
Functional block storehouse, software motion control and PLC software module library, fault diagnosis module storehouse, human-computer interaction function module library, opc server module library and hardware drive program storehouse can be provided by third party manufacturer or company, for example the human-computer interaction module storehouse of Intellution and RedLion company can be adopted in the human-computer interaction function module library, the PLC module library of fault diagnosis module storehouse, the PLC software module library S7 of Siemens Company series, functional block storehouse, software motion control can be adopted the module library of ServoWorks company, and perhaps being created by user oneself provides.
The embedded OS customizer is the platform building device (Platform Builder) of MICROSOFT.The driving framework of every kind of hardware device has similar structure in the hardware drive program storehouse, comprises the unified function interface that provides upper level applications to call: XXX_Init, XXX_DeInit, XXX_Open, XXX_Close, XXX_Read, XXX_Write, XXX_Seek, XXX_PowerUp, XXX_PowerDown, XXX_IOControl.Wherein XXX is the title of hardware device driver, device name between each different hardware equipment can not be identical, can use call number to distinguish with a kind of a plurality of equipment, the XXX_Init function interface is responsible for the initialization of driver when system boot; The XXX_DeInit function interface then when driver does not re-use by application program or operating system is explicit unloads from internal memory; The XXX_Open function interface is opened the control handle of hardware device driver acquisition to hardware device by application program control; The XXX_Close function interface is closed the control handle of being opened by XXX_Open, but driver is not unloaded from internal memory; The XXX_Read function interface offers application program from the hardware device reading of data; The XXX_Write function interface is then by the past hardware device output data of application program; The XXX_Seek function interface allows application program to locate in device data; XXX_PowerUp and XXX_PowerDown function interface then provide the power supply control to equipment, to reach purpose of energy saving; The XXX_IOControl function interface offers the input and output of application program hardware equipment.
Each module library has comprised the realization of Processing Algorithm control in a certain respect respectively, the various functional blocks of digital control system have then been described in the functional block storehouse from user's angle---and the motion control function piece (is responsible for movement velocity, the position, the processing of precision and direction), PLC control function piece (being responsible for the control of process of manufacture logical order), the fault diagnosis functions piece (is responsible for signals collecting, monitoring, record, Treatment Analysis prediction and diagnosis and realize remote monitoring by opc server and network interface), man-machine interaction (HMI) functional block (being responsible for handling keyboard input and state shows), user's job sequence editting function piece (being responsible for editor and compiling user job sequence), database management function piece (storage and the data mining of being responsible for information are handled), offer the abundant and complete functional block storehouse of user and create application flexibly, realized user oriented opening.
Numerical control software and embedded real-time operating system reflection are generated and are downloaded on the target hardware platform by the needs of development platform according to user or system development merchant of recombinating and move, and realize digital control processing.