CN102253657B - Implementation method for networked system structure of numerical control system - Google Patents

Implementation method for networked system structure of numerical control system Download PDF

Info

Publication number
CN102253657B
CN102253657B CN2010101765534A CN201010176553A CN102253657B CN 102253657 B CN102253657 B CN 102253657B CN 2010101765534 A CN2010101765534 A CN 2010101765534A CN 201010176553 A CN201010176553 A CN 201010176553A CN 102253657 B CN102253657 B CN 102253657B
Authority
CN
China
Prior art keywords
real
time
controller
task
control system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2010101765534A
Other languages
Chinese (zh)
Other versions
CN102253657A (en
Inventor
于东
高甜容
岳东峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang Zhongke CNC Technology Co.,Ltd.
Original Assignee
SHENYANG HIGH-END COMPUTER NUMERICAL CONTROL TECHNOLOGY Co Ltd
Shenyang Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENYANG HIGH-END COMPUTER NUMERICAL CONTROL TECHNOLOGY Co Ltd, Shenyang Institute of Computing Technology of CAS filed Critical SHENYANG HIGH-END COMPUTER NUMERICAL CONTROL TECHNOLOGY Co Ltd
Priority to CN2010101765534A priority Critical patent/CN102253657B/en
Publication of CN102253657A publication Critical patent/CN102253657A/en
Application granted granted Critical
Publication of CN102253657B publication Critical patent/CN102253657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Numerical Control (AREA)

Abstract

The invention discloses an implementation method for a networked system structure of a numerical control system. The implementation method comprises the following steps of: separating a human-computer interface controller from a numerical control machine to run in an industrial personal computer (PC), and making a task controller, a motion controller and a programmable logical controller (PLC) run in the numerical control machine; implementing real time data processing of the human-computer interface controller through a soft real-time mechanism on the industrial PC; implementing real time data processing of a server and the task controller through a soft real-time mechanism on the numerical control machine, and communicating the task controller with the motion controller by using a mixed interactive model; and connecting the industrial PC with the numerical control machine through a real-time Ethernet. By using the implementation method, the pressure of a processor can be relieved, the control performance of the numerical control system is improved, the real-time property of data transmission among cross-platform modules is ensured, and a speed of data processing of a user task, the data interactive performance among local modules and the stability of the system are improved.

Description

A kind of implementation method of digital control system networking architecture
Technical field
The present invention relates to control and the communications field, specifically a kind of implementation method of digital control system networking architecture.
Background technology
Along with the continuous lifting of the equipment manufacture market demand, high-grade digital control system becomes the assurance that realizes high-level digitizing equipment.But in the high-grade digital control system, the calculated amount of core algorithms such as nanoscale high accuracy interpolation, leading pre-service, hyperchannel control, multiaxis control is huge, and traditional digital control system software and hardware architecture structure and communications platform are proposed very big challenge.
The tradition digital control system adopts uniprocessor architecture, and core algorithm concentrates on the uniprocessor and carries out, and design of hardware and software is intensive, system-computed and traffic load height.In addition, usually adopt shared buffer to communicate between the controller, the read/write of himself multitask synchronously need solve synchronous/problem of mutual exclusion by semaphore.The problem that tradition digital control system architecture and communications platform exist is in particular in:
1. real-time is required harsh controller and the controller mutual restriction big to resource requirement.Except the support of operating system, resources such as processor do not have allocation strategy targetedly to each controller, system continues high capacity, be difficult to guarantee the timely response of real-time task, initiated core center algorithm starvation of data, problems such as the big but low un-real time job of priority of resource requirement waits as long for have influenced the control performance of digital control system;
2. processor computational load and traffic load mutual restriction.Though shared buffer can the direct read internal memory, but the characteristic of data interaction and exclusive reference frequently, cause the memory access time jitter violent, in addition, the operation of a large amount of polling signal amounts has taken the segment processor time, has increased the weight of computational load indirectly, cause periodic duty not finish on time, control command can't in time be assigned, and status information can't in time be fed back, and has influenced stability and the communication efficiency of system.
A kind of effective ways of dealing with problems are to use for reference open, networked Numeric Control Technology.At present, open, networked digital control system becomes development trend, and its modularization, distributed architecture make digital control system possess better generality, flexibility, adaptability, extendability.In recent years, both at home and abroad to open, the networking digital control system has been launched research widely, comprise OSACA (the Open SystemArchitecture for Control within Automation Systems) plan in Europe, the NGC of the U.S. (NextGeneration Controller) plan and OMAC (Open Modular Architecture Controller) plan, OSEC (the Open System Environment for Controller) plan of Japan, OCEAN (Open Controller Enabled by Advanced Real-time Network) plan, and THINC (The Intelligent Numerical Control) plan." high-grade, digitally controlled machine tools with basis make equipment " great special project of national science and technology to high-grade, digitally controlled machine tools propose efficient, compound, at a high speed, high-precision important indicator, domestic systematic study mechanism formulates and promulgates digital control system in open type technical manual national standard in succession, satisfies the demand of high speed, precision and hyperchannel processing.Satisfying the implementation method of the digital control system networking architecture of These parameters and national standard does not appear in the newspapers as yet.
Summary of the invention
Weak points such as, poor stability low at the digital control system control performance that exists in the prior art and communication efficiency are low, the technical problem to be solved in the present invention provide a kind of implementation method of the digital control system networking architecture based on high controlled, the high stability of having of high-grade, digitally controlled machine tools technical indicator and open cnc technology national standard and high communication efficiency.
For solving the problems of the technologies described above, the technical solution used in the present invention is:
The implementation method of a kind of digital control system networking of the present invention architecture may further comprise the steps:
The man-machine interface controller is separated from numerical control machine, run in the Industrial PC Computer, task controller, motion controller and PLC run in the numerical control machine;
Realize the real time data processing of man-machine interface controller by soft real-time mechanism in Industrial PC Computer;
Realize the real time data processing of server and task controller at numerical control machine by soft real-time mechanism, and adopt between task controller and the motion controller and mix interaction models and communicate;
Connect Industrial PC Computer and numerical control machine by real-time ethernet.
Described man-machine interface controller runs in the Industrial PC Computer as un-real time job, serves as the mutual platform of user and digital control system; Task controller runs in the numerical control machine as un-real time job, is responsible for the action of coordinates user instruction and system's key-course; Motion controller and PLC run in the numerical control machine as real-time task, finish motion control and logic control.
Realize that by soft real-time mechanism the real time data processing of man-machine interface controller, server and task controller may further comprise the steps:
The un-real time job initialization;
The real-time period task initialization;
Soft/hard real-time switches, and task enters kernel state;
Enter the major cycle cycle, the Core Feature of executing the task, real-time processing data;
Periodic duty finishes, and returns user's attitude;
Task discharges resource.
Described is on ethernet hardware by real-time ethernet connection Industrial PC Computer and numerical control machine, by real-time ethernet hard real-time network protocol stack and tdma, and the real time data between transmission Industrial PC Computer and the numerical control machine, it comprises following process:
Transmitting terminal is encapsulated into message in the UDP message, calls the real-time sockets interface of real-time ethernet, in the sending time slots of transmitting terminal, according to the real-time control system configuration file, message is sent to numerical control machine in real time;
The server listening port, the real-time sockets interface that calls real-time ethernet receives the UDP message in real time, according to the real-time control system configuration file, message extraction is come out to put into local buffer, continues listening port;
Receiving end reads message and processing according to the real-time control system configuration file from local buffer.
Described digital control system networking architecture adopts bus topolopy, by revising the real-time control system configuration file, and the replacement network structure, the corresponding correspondence between the change node is realized between Industrial PC Computer and the numerical control machine one to one or one-to-many is communicated by letter.
Adopt between the task controller that moves on the described numerical control machine and the motion controller and mix interaction models and communicate, namely use shared buffer storage interactive messages, use pipeline to transmit the status signal of shared buffer, and task controller and motion controller only could obtain the visit to shared buffer after receiving the signal of pipeline.
The communication process that mixes interaction models comprises:
After transmitting terminal write shared buffer with message, the pipeline that provides by the hard real-time multiple task operating system sent signal to receiving end, informed that the information updating of its shared buffer finishes;
After receiving end is received the signal of pipeline, from shared buffer, read message, message read the back that finishes by pipeline to the transmitting terminal return signal, inform that message in its shared buffer has read to finish.
The present invention has following beneficial effect and advantage:
1. alleviate processor pressure, improve the digital control system control performance.In the inventive method, man-machine interface controller and other controller degrees of coupling are low and resource consumption is big, with its isolated operation in Industrial PC Computer, not only can take full advantage of the PC resource, take processor alone, can also pass through standard ICP/IP protocol access the Internet, by WLAN agreement wireless connections portable terminal, be convenient to realize remote monitoring, fault detect, functions such as remote maintenance, avoided simultaneously with numerical control machine in real-time is required harsh controller competitive resource, guarantee the timely response of real-time task, thereby effectively alleviated processor pressure, improved the digital control system control performance.
2. guarantee real time of data transmission between the cross-platform module.The inventive method is introduced network in digital control system, bring the problem of propagation delay time, adopt real-time ethernet RTnet to connect man-machine interface controller and task controller, on ethernet hardware, by hard real-time network protocol stack and tdma with determinacy mode transmitting real-time data, effectively alleviate data packet collisions and network congestion, reduced network transfer delay, thereby guaranteed the real-time of data interaction between the cross-platform module.
3. improve the speed that the user task data are handled.The inventive method adopts soft real-time mechanism (LXRT; Linux Real Time); interrupt executing the task in real time at user's space by simple software; improve the priority of user task; and provide memory protect to it; thereby avoided user task to wait as long for, improved the speed that the user task data are handled.
4. improve performance and the system stability of data interaction between the local module.The inventive method adopts mixes interaction models, by pipeline realize to the shared buffer access synchronously, can give full play to the advantage of shared buffer direct read internal memory, can utilize the polling operation in the event driven characteristic minimizing of the pipeline communicating pair handshake procedure again, reduce the memory access time jitter, thereby improved data interaction performance and system stability between the local module.
Description of drawings
The cnc system software building-block of logic that Fig. 1 uses for the inventive method;
The digital control system communications platform synoptic diagram that Fig. 2 uses for the inventive method;
Fig. 3 is digital control system networking architectural schematic in the inventive method;
Fig. 4 is digital control system Principle of Communication figure in the inventive method;
Fig. 5 is the soft real time implementation process flow diagram of un-real time job in the inventive method;
Fig. 6 A is man-machine interface controller message process of transmitting synoptic diagram in the inventive method;
Fig. 6 B is server message receiving course synoptic diagram in the inventive method;
Fig. 6 C is that the task controller message reads the process synoptic diagram in the inventive method;
Fig. 7 is networked digital control system cross-platform interchange synoptic diagram in the inventive method;
Fig. 8 mixes the interaction models synoptic diagram in the inventive method;
Fig. 9 is networked digital control system telecommunication time-delay analysis figure in the inventive method;
Figure 10 A is the time interval figure of Ethernet packet in the inventive method;
Figure 10 B is the time interval figure of RTnet packet in the inventive method;
Figure 11 A is the memory access time delay figure that adopts the shared buffer model in the inventive method;
Figure 11 B adopts the memory access time delay figure that mixes interaction models in the inventive method.
Embodiment
As shown in Figure 1, the cnc system software building-block of logic of using for the inventive method.
Running software among this figure is in hard real-time multiple task operating system (RTAI, Real TimeApplication Interface for Linux) on the platform, adopt real-time control system (RCS, Real-timeControl System) stratification Reference Model Design also realizes based on the RCS storehouse, can be divided into three levels, four functional modules.Three levels are respectively: graphical user interface layer, task scheduling layer, system's key-course.Four functional modules are man-machine interfacial level controller, task controller, motion controller, programmable logic controller (PLC) (PLC, Programmable Logic Controller), finish following function respectively:
1. man-machine interface controller
Running on user's space as un-real time job, is the mutual platform of user and digital control system.Operating personnel can comprise: input, editor, demonstration and the management of nc program and PLC program at all operations of user interface realization to digital control system; With described program or start power on, operation such as automatic/hand pattern switching is corresponding becomes the interface control order to send to numerical control machine; The display system running status.
2. task controller
Running on user's space as un-real time job, is the hinge of total system, mainly is responsible for the action of coordinates user instruction and system's key-course.At first, receive operation and execution immediately that man-machine interfacial level controller sends, then, explain that the part program of " G code and M code " establishment is the RCS control command, the execution function that calls the corresponding command sends it to motion controller or PLC, the action of coordinated movement of various economic factors controller and PLC.Obtain current machining state from motion controller and PLC at last, be packaged into the RCS status message, send to the man-machine interface controller after the processing and show.In addition, task controller is also finished the initial work to system and lathe, to the functions such as conversion and control of operator scheme such as automatic, manual.
3. motion controller
Motion controller is the core of digital control system, mainly finishes the motion control to axle, comprises the shaft position sampling, calculates functions such as track value, interpolation and servocontrol, and then drive the servosystem operation.In addition, also comprise some compensating modules in the motion controller, nonlinear characteristic is carried out linear-apporximation and made compensation, for example backlash Compensation of Half and bi-directional axial compensation.Because the motion control controller is strict to travelling speed and sequential, so motion controller runs between the RTAI real-time empty as real-time task.
4.PLC
Run between the RTAI real-time empty, mainly be responsible for the I/O control that control and three subsystems of auxiliary control (for example suddenly stop, lubricate) were controlled, cooled off to main shaft.Digital information and the fine coordination of switching value information of numerically-controlled machine are got up, drive the operation of I/O equipment.
According to the rule of RCS configuration file, realize information interaction by intermediary message language (NML, Neutral Message Language) passage mechanism and shared buffer that RCS provides between above-mentioned four functional modules.The software configuration of this modularization, stratification makes digital control system in open type be easy to expansion, can satisfy the difference control requirement of all kinds of lathe hardware.Standardized user interface, unified user interface had both made things convenient for the maintenance of system, made things convenient for the user to realize requirement soft to system, that hardware exchanges again.
As shown in Figure 2, the digital control system communications platform synoptic diagram of using for the inventive method.
The digital control system communications platform is directly connected to the overall performance of digital control system for information interoperability between functional module and between field apparatus provides the basis.The information interoperability refers to the data interaction between digital control system self functional part between functional module, and it is mutual to be divided into the mutual and cross-platform intermodule of local intermodule.The information interoperability refers to realize the communication between the control system and relevant functional equipment such as servo, I/O, network analyzer in the control scene by field bus technique between field apparatus.The inventive method mainly is at the information interoperability between the digital control system functional module.
The implementation method of digital control system networking architecture of the present invention may further comprise the steps:
The man-machine interface controller is separated from numerical control machine, run in the Industrial PC Computer, task controller, motion controller and PLC run in the numerical control machine;
Realize the real time data processing of man-machine interface controller by soft real-time mechanism in Industrial PC Computer;
Realize the real time data processing of server and task controller at numerical control machine by soft real-time mechanism, and adopt between task controller and the motion controller and mix interaction models and communicate;
Connect Industrial PC Computer and numerical control machine by real-time ethernet (RTnet).
Described man-machine interface controller runs in the Industrial PC Computer as un-real time job, serves as the mutual platform of user and digital control system; Task controller runs in the numerical control machine as un-real time job, is responsible for the action of coordinates user instruction and system's key-course; Motion controller and PLC run in the numerical control machine as real-time task, finish motion control and logic control.
Described digital control system networking architecture adopts bus topolopy, by revising the real-time control system configuration file, and the replacement network structure, the corresponding correspondence between the change node is realized between Industrial PC Computer and the numerical control machine one to one or one-to-many is communicated by letter.
As shown in Figure 3, be digital control system networking architectural schematic in the inventive method.
RTnet network using bus topolopy among this figure comprises limited a plurality of node, wherein has a plurality of Industrial PC Computer and a plurality of numerical control machine.The man-machine interface controller independent operating of low coupling high flow rate in Industrial PC Computer wherein, other controllers, namely task controller, motion controller and PLC run on wherein in the numerical control machine.Industrial PC Computer can be passed through standard ICP/IP protocol access the Internet, by portable terminals such as WLAN agreement wireless connections mobile phone, individual palm PC, portable computers, is convenient to realize functions such as remote monitoring, fault detect, remote maintenance.Based on standard ethernet hardware, the Real-time UDP/IP protocol transmission real time data bag (as: command messages, status message, error message etc.) that uses RTnet to provide between Industrial PC Computer and the numerical control machine uses Tunneled ICP/IP protocol transmission non-real-time data bag.
Said process just is located at man-machine interface controller and other controllers respectively on Industrial PC Computer and the numerical control machine, digital control system after this separation can be taked one to one, the mode of operation of one-to-many, namely a personal-machine interfacial level controller can connect any one or more numerical control machine among the RTnet, only need to revise the rule of communication in the RCS configuration file, the network structure of can resetting, corresponding correspondence between the change node, the flexible configuration of realization network.
As shown in Figure 4, be digital control system Principle of Communication figure in the inventive method.
Networked architecture in the inventive method is based on that the network communicating function of RCS communications platform realizes, its core technology is NML passage mechanism.Wherein, the NML server is used for remote channel communication, and the RCS configuration file is used for the message communicating rule between each module of record and each buffer zone.
Because real-time requires the highest motion controller to operate on the numerical control machine, therefore enable server and create passage at numerical control machine, as: command channel, stator channel, mistake passage etc., open up buffer zone simultaneously.Task controller can the direct read local buffer.Long-range man-machine interfacial level controller connects the server of corresponding numerical control machine node in the RTnet network according to the rule of configuration file, and the dereference buffer zone comes and information such as task controller interactive command, state, mistake with this.Server generation carries out encoding and decoding for the man-machine interface controller to the message in the buffer zone, realizes the remote access to buffer zone, can avoid telecommunication to the influence of local intermodule communication.Run on man-machine interface controller, NML server and the task controller (be un-real time job, also can be described as user task) of user's space by the transformation of soft real-time mechanism, as soft real-time task real-time processing data.Adopt between improved task controller and the motion controller and mix interaction models and communicate by letter.
Based on Fig. 4 principle, described real time data processing by soft real-time mechanism realization man-machine interface controller, server and task controller as shown in Figure 5, is the soft real time implementation process flow diagram of un-real time job in the inventive method, may further comprise the steps:
The un-real time job initialization;
The real-time period task initialization;
Soft/hard real-time switches, and task enters kernel state;
Enter the major cycle cycle, the Core Feature of executing the task, real-time processing data;
Periodic duty finishes, and returns user's attitude;
Task discharges resource.
Un-real time job comprises man-machine interface controller, NML server and task controller.
The first step, the un-real time job initialization arranges basic configuration parameter and operational factor;
In second step, the function that uses LXRT to provide is initialized as the real-time period task with un-real time job, and locking task memory headroom prevents from being displaced internal memory, creates real-time proxy task at kernel spacing, and it is cyclic pattern that the timer pattern is set, and starts timer;
The 3rd step, realize that by soft interruption soft/hard real-time switches, task enters kernel state, and start-up time and the Cycle Length of real-time task is set;
The 4th step entered the major cycle cycle, the Core Feature of executing the task, and real-time processing data after this subtask is finished, is initiatively abandoned CPU, waits for scheduling next time, and loop cycle is carried out;
In the 5th step, after periodic duty is finished, return user's attitude;
The 6th step, delete real-time proxy task, the timeing closing device unlocks and the clean-up task space, discharges resource.
Based on Fig. 4 principle, described real-time ethernet RTnet connects Industrial PC Computer and numerical control machine, is on ethernet hardware, by RTnet hard real-time network protocol stack and tdma, real time data between transmission Industrial PC Computer and the numerical control machine, it comprises following process:
Transmitting terminal is encapsulated into message in the UDP message, calls the real-time sockets interface of real-time ethernet RTnet, in the sending time slots of transmitting terminal, according to the real-time control system configuration file, message is sent to numerical control machine in real time;
The server listening port, the real-time sockets interface that calls real-time ethernet RTnet receives the UDP message in real time, according to the real-time control system configuration file, message extraction is come out to put into local buffer, continues listening port;
Receiving end reads message and processing according to the real-time control system configuration file from local buffer.
Shown in Fig. 6 A, 6B and 6C, be respectively that man-machine interface controller message process of transmitting synoptic diagram, server message receiving course synoptic diagram and task controller message read the process synoptic diagram in the inventive method.Each module is used in the process of NML tunneling traffic, according to configuration file, if the buffer flag of visit be long-range (RTMOTE) or this as server, then need to call the web socket interface.The real-time sockets interface that the inventive method uses RTnet to provide is replaced RCS standard sockets interface, finishes telecommunication.Be example with the command messages among the figure, each module is described in detail.
As shown in Figure 6A, be man-machine interface controller message process of transmitting synoptic diagram in the inventive method.
The first step, initialization is connected with the command channel, creates passage object and UDPMEM object, is used for storage and the transmission of UDP bag;
Second step, call real-time ethernet RTnet interface, create Datagram Socket, the socket attribute is set, registered port numbers, the remote acknowledgement buffer zone, call server is replied;
The 3rd step was encapsulated into command messages in the UDP message, called real-time ethernet RTnet interface, in the sending time slots of Industrial PC Computer, according to the RCS configuration file, command message was sent to numerical control machine in real time;
In the 4th step, nullify port.
Shown in Fig. 6 B, be server message receiving course synoptic diagram in the inventive method.
The first step, initialization is connected with the command channel, creates the passage object, bind command buffer zone, and the match condition of each module and command buffer in the inquiry RCS configuration file;
Second step, call real-time ethernet RTnet interface, create Datagram Socket, the socket attribute is set, registered port numbers;
In the 3rd step, listening port calls real-time ethernet RTnet interface, real-time receiving remote command message, and according to the RCS configuration file, from message, extract command messages, put into the local command buffer zone;
In the 4th step, nullify port.
Shown in Fig. 6 C, for task controller message in the inventive method reads the process synoptic diagram.
The first step is created passage, opens up command buffer;
Second step is after waiting for server is put into command buffer with the long-range command messages that receives, according to the RCS configuration file, directly from command buffer reading order message.
As shown in Figure 7, be networked digital control system cross-platform interchange synoptic diagram in the inventive method.
Be example with the command messages among this figure, describe the cross-platform workflow of networked digital control system in detail.Wherein, the man-machine interface controller runs on the Industrial PC Computer as transmitting terminal, carries out write order message.Server, task controller run on the numerical control machine as receiving end, carry out remote agent write order message and read command message.1. be the execution in step sequence number 9. extremely among the figure.Each module is described as follows respectively:
1. man-machine interface controller
1. step is stated and being connected of command channel;
2. step locks the task memory headroom, and initialization real-time period task also arranges scheduling strategy, opens the cyclic pattern timer, and unit is nanosecond;
3. step switches to kernel spacing by soft interruption, enters the hard real-time state, and task start time and Cycle Length are set;
4. step enters the major cycle cycle, carries out man-machine interfacial level controller core missions, and real-time processing data is created real-time socket and registered port, according to RCS configuration file remote write data, command messages is sent to remote port in real time;
5. step judges whether task finishes, if finish, then changes step 9.; Otherwise change step 4., continue loop cycle and handle, finish until task;
9. step returns user's space, enters soft real-time status, timeing closing device and socket, clean-up task.
2. server
1. step is stated and being connected of command channel;
2. step locks the task memory headroom, and the initialization real-time task also arranges scheduling strategy;
3. step switches to kernel spacing by soft interruption, enters the hard real-time state, and the task start time is set, and changes step 6.;
6. step starts the NML server, creates real-time socket, registration and listening port, wait for real-time receiving remote data, according to the RCS configuration file, the command messages of receiving write corresponding command buffer in real time after, continue listening port, finish until server task, change step 9.;
9. step returns user's space, enters soft real-time status, stops the NML server.
3. task controller
1. step creates the command channel, opens up command buffer;
2. step locks the task memory headroom, and initialization real-time period task also arranges scheduling strategy, opens the cyclic pattern timer, and unit is nanosecond;
3. step switches to kernel spacing by soft interruption, enters the hard real-time state, and task start time and Cycle Length are set, and changes step 7..
7. step enters the major cycle cycle, the controller core task of executing the task, and according to the RCS configuration file, reading order message and processing in real time from command buffer;
8. step judges whether task finishes, if finish, then changes step 9.; Otherwise, change step 7., continue loop cycle and handle, finish until task;
9. step returns user's space, enters soft real-time status, timeing closing device and socket, clean-up task.
Based on Fig. 4 principle, in the inventive method, adopt between the task controller that moves on the numerical control machine and the motion controller and mix interaction models and communicate, namely use shared buffer storage interactive messages, use pipeline to transmit the status signal of shared buffer, and task controller and motion controller only could obtain the visit to shared buffer after receiving the signal of pipeline.
The communication process that mixes interaction models comprises:
After transmitting terminal write shared buffer with message, the pipeline that provides by hard real-time multiple task operating system RTAI sent signal to receiving end, informed that the information updating of its shared buffer finishes;
After receiving end is received the signal of pipeline, from shared buffer, read message, message read the back that finishes by pipeline to the transmitting terminal return signal, inform that message in its shared buffer has read to finish.
As shown in Figure 8, for mixing the interaction models synoptic diagram in the inventive method.
Adopt shared buffer interactive command, state, error message among the figure between task controller and the motion controller, use pipeline to transmit the status signal of shared buffer.
Be example with the command messages, the communication process between task controller and the motion controller is as follows:
1. data send: task controller writes command buffer with command messages, sends a signal by pipeline to motion controller, informs that message is updated in its command buffer, transfers the access right to command buffer simultaneously.
2. data receive: motion controller is received the signal of pipeline, acquisition is to the access right of command buffer, from command buffer reading order message, read the back that finishes and reply a signal by pipeline to task controller, inform that the data in its command buffer are read, task controller regains access right after receiving this signal.
RTAI is that pipeline is created the call back function handle, and when this pipeline during by read/write, call back function is called automatically by system.Therefore, communicating pair only just removes the read/write shared buffer after receiving signal, and other carry out the core code of oneself constantly, do not need the use state of poll check shared buffer, possess event driven characteristic.
Real-time and stability are the key factors that determines the digital control system overall performance, also are the performances that the inventive method is paid close attention to.
The test environment of the inventive method: the Industrial PC Computer hardware platform is 2.2GHz x86CPU, the 1Gb internal memory; The numerical control machine hardware platform is 800MHz x86CPU, the 512Mb internal memory; Operating system is RedHat Linux 9.0, kernel version 2 .6.19, RTAI version 3 .7; RTnet version 0.9.11; Network interface card is Realtek RTL 8139.
As shown in Figure 9, be networked digital control system telecommunication time-delay analysis figure in the inventive method.With the example that is transmitted as of 1Kb command messages, the real-time of test the inventive method.Among the figure communication delay is divided into T Hmi, T TaskAnd T Tran, represent man-machine interfacial level controller data processing delay, task controller data processing delay and RTnet propagation delay time respectively.
The data processing delay is defined as the transmission time of data between task buffer zone and local network interface card static memory.The data processing delay of man-machine interface controller and task controller contrasts with the digital control system of not using LXRT mechanism in test the inventive method.
Experimental result, the T of the inventive method HmiAverage out to 27.4 μ s, T TaskAverage out to 28.1 μ s are less than the digital control system of not using LXRT mechanism.The result shows that the inventive method is used LXRT mechanism, has improved the user task data processing speed, effectively reduces the data processing delay.
Network analysis instrument Wireshark sniffer is used in experiment, and at specific IP main frame, each intercepted data packet is apart from the time interval between the last time intercepted data packet, by computational grid data packet transmission frequency indirectly testing network transfer delay T in the record network Tran
Shown in Figure 10 A and 10B, be respectively the time interval figure of Ethernet and RTnet packet in the inventive method.Show 100 groups of test datas among the figure, wherein, in order to identify measured value clearly, the The data logarithmic plot that Ethernet measures.Because the RTnet packet sends frequent, per 200 bag time intervals of record of Wireshark.
Experimental result, the shake of the Ethernet data packet transmission time interval is very big, and sniffer on average just can be caught a packet every 2.44 seconds.And the packet of RTnet transmits steadily, significantly space jitter can not occur, and packet is littler at interval, every transmitting a packet 490 nanoseconds.The result shows, compares with Ethernet, and RTnet has effectively been alleviated data packet collisions, has reduced the propagation delay time T of cross-platform intermodule Tran
Though the inventive method has been introduced network factors, but it separates the man-machine interface controller, and the employing soft real-time mechanism of LXRT and RTnet real-time ethernet technology, effectively alleviated the pressure of uniprocessor, real-time and real time of data transmission that data are handled have been guaranteed preferably, and then improved the control performance of entire system, have an enormous advantage with respect to traditional digital control system.
Shown in Figure 11 A and 11B, be respectively and adopt shared buffer model and the memory access time delay figure that mixes interaction models in the inventive method.Experiment is example with the command messages, and message writes the time of command buffer between logger task controller and the motion controller.
Experimental result, mixing the average write time of interaction models is 20.742 μ s, is lower than 24.209 μ s of shared buffer model, and the time jitter of mixing interaction models is littler.The result shows, compares with shared buffer models, adopts between task controller and motion controller and mixes interaction models, and local intermodule communication time delay is littler, and the stability of system better.

Claims (6)

1. the implementation method of digital control system networking architecture is characterized in that may further comprise the steps:
The man-machine interface controller is separated from numerical control machine, run in the Industrial PC Computer, task controller, motion controller and PLC run in the numerical control machine;
Realize the real time data processing of man-machine interface controller by soft real-time mechanism in Industrial PC Computer;
Realize the real time data processing of NML server and task controller at numerical control machine by soft real-time mechanism, and adopt between task controller and the motion controller and mix interaction models and communicate;
Connect Industrial PC Computer and numerical control machine by real-time ethernet;
Adopt between the task controller that moves on the described numerical control machine and the motion controller and mix interaction models and communicate, namely use shared buffer storage interactive messages, use pipeline to transmit the status signal of shared buffer, and task controller and motion controller only could obtain the visit to shared buffer after receiving the signal of pipeline.
2. by the implementation method of the described digital control system networking of claim 1 architecture, it is characterized in that: described man-machine interface controller runs in the Industrial PC Computer as un-real time job, serves as the mutual platform of user and digital control system; Task controller runs in the numerical control machine as un-real time job, is responsible for the action of coordinates user instruction and system's key-course; Motion controller and PLC run in the numerical control machine as real-time task, finish motion control and logic control.
3. by the implementation method of the described digital control system networking of claim 1 architecture, it is characterized in that: realize that by soft real-time mechanism the real time data processing of man-machine interface controller, server and task controller may further comprise the steps:
The un-real time job initialization;
The real-time period task initialization;
Soft/hard real-time switches, and task enters kernel state;
Enter the major cycle cycle, the Core Feature of executing the task, real-time processing data;
Periodic duty finishes, and returns user's attitude;
Task discharges resource.
4. press the implementation method of the described digital control system networking of claim 1 architecture, it is characterized in that: described by real-time ethernet connection Industrial PC Computer and numerical control machine, be on ethernet hardware, by real-time ethernet hard real-time network protocol stack and tdma, real time data between transmission Industrial PC Computer and the numerical control machine, it comprises following process:
Transmitting terminal is encapsulated into message in the UDP message, calls the real-time sockets interface of real-time ethernet, in the sending time slots of transmitting terminal, according to the real-time control system configuration file, message is sent to numerical control machine in real time;
The server listening port, the real-time sockets interface that calls real-time ethernet receives the UDP message in real time, according to the real-time control system configuration file, message extraction is come out to put into local buffer, continues listening port;
Receiving end reads message and processing according to the real-time control system configuration file from local buffer.
5. press the implementation method of the described digital control system networking of claim 1 architecture, it is characterized in that: described digital control system networking architecture adopts bus topolopy, by revising the real-time control system configuration file, the replacement network structure, the corresponding correspondence of change between the node realized between Industrial PC Computer and the numerical control machine one to one or one-to-many is communicated by letter.
6. by the implementation method of the described digital control system networking of claim 1 architecture, it is characterized in that: the communication process that mixes interaction models comprises:
After transmitting terminal write shared buffer with message, the pipeline that provides by the hard real-time multiple task operating system sent signal to receiving end, informed that the information updating of its shared buffer finishes;
After receiving end is received the signal of pipeline, from shared buffer, read message, message read the back that finishes by pipeline to the transmitting terminal return signal, inform that message in its shared buffer has read to finish.
CN2010101765534A 2010-05-19 2010-05-19 Implementation method for networked system structure of numerical control system Active CN102253657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101765534A CN102253657B (en) 2010-05-19 2010-05-19 Implementation method for networked system structure of numerical control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101765534A CN102253657B (en) 2010-05-19 2010-05-19 Implementation method for networked system structure of numerical control system

Publications (2)

Publication Number Publication Date
CN102253657A CN102253657A (en) 2011-11-23
CN102253657B true CN102253657B (en) 2013-07-10

Family

ID=44980964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101765534A Active CN102253657B (en) 2010-05-19 2010-05-19 Implementation method for networked system structure of numerical control system

Country Status (1)

Country Link
CN (1) CN102253657B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176784A (en) * 2011-12-23 2013-06-26 中国科学院沈阳计算技术研究所有限公司 Reconfigurable open type numerical control system man-machine interface design method based on oriented object
US8943516B2 (en) * 2012-05-31 2015-01-27 International Business Machines Corporation Mechanism for optimized intra-die inter-nodelet messaging communication
CN103809523B (en) * 2012-11-08 2016-08-17 北京计算机技术及应用研究所 Multi-channel digital control system and multi-way contral method thereof
CN103439920A (en) * 2013-09-11 2013-12-11 中国二十二冶集团有限公司 Wireless control system for numerical control veneer reeling machine
RU2647659C2 (en) * 2013-11-26 2018-03-16 Сименс Акциенгезелльшафт Offloading human-machine-interaction tasks
CN104076777A (en) * 2014-06-27 2014-10-01 徐州徐工筑路机械有限公司 Asphalt mixing plant wireless scheduling system and method based on terminals
CN104536423A (en) * 2015-01-04 2015-04-22 北京数码大方科技股份有限公司 Auxiliary production device of numerical control machine tool and production data transmission method
CN104660384A (en) * 2015-02-02 2015-05-27 武汉爱科唯自动化科技有限公司 Network remote monitoring method for open numerical control system
CN104698978B (en) * 2015-03-17 2016-06-01 华中科技大学 A kind of remote monitor of NC system based on virtualization technology and adjustment method
CN107850883B (en) * 2015-12-31 2020-07-28 深圳配天智能技术研究院有限公司 System processing method and numerical control system
CN107888508B (en) * 2017-09-29 2021-07-20 广州奇芯机器人技术有限公司 PC-NC-based numerical control system and anti-interference weak real-time communication method thereof
CN111650886A (en) * 2019-03-04 2020-09-11 南京超颖新能源科技有限公司 Motion control system
CN111813052A (en) * 2020-08-06 2020-10-23 陕西开普欣信息科技有限公司 Numerical control system structure and general numerical control system
CN112015118A (en) * 2020-08-31 2020-12-01 浙江水晶光电科技股份有限公司 Method and device for controlling movement of automation equipment, controller and storage medium
CN113341885A (en) * 2021-01-20 2021-09-03 深圳渊联技术有限公司 Remote industrial control method and system based on edge cloud and readable storage medium

Also Published As

Publication number Publication date
CN102253657A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
CN102253657B (en) Implementation method for networked system structure of numerical control system
CN103425106B (en) The master/slave station control system of a kind of EtherCAT based on Linux and method
CN107505882A (en) A kind of multi-axis motion controller and control method
Sauter et al. The evolution of factory and building automation
TWI797369B (en) Intelligent Industrial Internet of Things System Using Bidirectional Channel-like Neural Network Architecture
CN100412736C (en) Edition-translation type numerical-control system and edition-translation and operation control method of same
CN106406227B (en) A kind of digital control system interpolating method and digital control system
CN103825883A (en) Multi-protocol conversion equipment based on wireless ZigBee, CAN bus and MODBUS/TCP and realization method thereof
CN103455463B (en) A kind of main control unit communication accesses and produces method
CN101420435A (en) Communication protocol conversion device and method based on embedded multiple MCU
CN103984275A (en) FPGA (Field Programmable Gate Array) based general industrial movement control system and control method based on movement control system
CN104317236A (en) Soft PLC technology-based wireless sensor network control terminal
CN115442202A (en) 5G network cloud-end cooperative virtual PLC control method and system
CN112995001A (en) Industrial communication network system
Suzuki et al. Cps-sim: Co-simulation for cyber-physical systems with accurate time synchronization
CN108345236A (en) A kind of control system based on EtherCAT
CN203537414U (en) Communication protocol conversion device based on embedded multi micro-control units
CN104932385A (en) Multi-axis control system and method for wave simulation
CN108062049A (en) A kind of embedded multi-shaft motion control system based on STM32
CN105373080A (en) Collaborative numerical control system based on soft bus
CN102540972B (en) Remote control method supporting multi-point cross-platform communication for numerical control machine
Moreno et al. Distributed implementation of discrete event control systems based on Petri nets
CN109507931B (en) Communication card based on CAN open communication protocol
CN201167335Y (en) Profibus-DP bus serial port server
CN202094918U (en) General servo pulse value interface module of ether CAT bus

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
ASS Succession or assignment of patent right

Free format text: FORMER OWNER: SHENYANG INSTITUTE OF COMPUTING TECHNOLOGY, CHINESE ACADEMY OF SCIENCES

Effective date: 20150812

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150812

Address after: 110171 Liaoning Province, Shenyang Hunnan New District Nanping Road No. 16

Patentee after: Shenyang High-End Computer Numerical Control Technology Co., Ltd.

Address before: 110171 Liaoning Province, Shenyang Hunnan New District Nanping Road No. 16

Patentee before: Shenyang High-End Computer Numerical Control Technology Co., Ltd.

Patentee before: Shenyang Institute of computing technology, Chinese Academy of Sciences

C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: Nanping Road in Dongling District of Shenyang city of Liaoning Province, No. 110171 16-2

Patentee after: SHENYANG GAOJING NUMERICAL CONTROL INTELLIGENT TECHNOLOGY CO., LTD.

Address before: 110171 Liaoning Province, Shenyang Hunnan New District Nanping Road No. 16

Patentee before: Shenyang High-End Computer Numerical Control Technology Co., Ltd.

CP01 Change in the name or title of a patent holder

Address after: Nanping Road in Dongling District of Shenyang city of Liaoning Province, No. 110171 16-2

Patentee after: Shenyang Zhongke CNC Technology Co.,Ltd.

Address before: Nanping Road in Dongling District of Shenyang city of Liaoning Province, No. 110171 16-2

Patentee before: SHENYANG GOLDING NC & INTELLIGENCE TECH. Co.,Ltd.

CP01 Change in the name or title of a patent holder