CN101576742A - Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same - Google Patents

Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same Download PDF

Info

Publication number
CN101576742A
CN101576742A CNA2009100229984A CN200910022998A CN101576742A CN 101576742 A CN101576742 A CN 101576742A CN A2009100229984 A CNA2009100229984 A CN A2009100229984A CN 200910022998 A CN200910022998 A CN 200910022998A CN 101576742 A CN101576742 A CN 101576742A
Authority
CN
China
Prior art keywords
terminal
main control
long
control end
data
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.)
Granted
Application number
CNA2009100229984A
Other languages
Chinese (zh)
Other versions
CN101576742B (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.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
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 Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN2009100229984A priority Critical patent/CN101576742B/en
Publication of CN101576742A publication Critical patent/CN101576742A/en
Application granted granted Critical
Publication of CN101576742B publication Critical patent/CN101576742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a remote monitoring and fault diagnosing system for a numerically controlled slitter and a method for realizing the same. The system comprises a controlled end 1 of a numerical control system of the slitter, a transfer station 2 of a serial port server and a main control end 3 of a remote monitoring and fault diagnosing center server, wherein the controlled end 1 is controlled by an industrial computer PC/104 and communicated with the transfer station 2 through an RS-485 serial port; and the transfer station 2 is communicated with the remote main control end 3 through the Internet network. The realization method realizes functions of remotely monitoring and diagnosing faults of the numerical control slitter by formulating a remote monitoring control strategy and a communication protocol. The system and the method have the characteristics of lowering maintenance cost of machines, shortening downtime and improving production efficiency.

Description

A kind of numerical control slitter remote monitoring and fault diagnosis system and its implementation
Technical field
The present invention relates to remote monitoring and fault diagnosis technology, particularly a kind of numerical control slitter remote monitoring and fault diagnosis system and its implementation.
Background technology
Progress along with expanding economy and science and technology, nowadays at the various numerically controlled processing equipments of a large amount of appearance of medium-sized and small enterprises, this mainly is because the numerical control device flexibility (adaptability) of operation is wide, be fit to small batch production model by the customer demand customization, and can reduce working strength of workers greatly, enhance productivity, increase economic benefit.
Common numerical control device has all possessed a cover diagnostic routine, the status information that can check machine.This cover diagnostic routine has been arranged, and we just can in time find and get rid of various faults, and fault isolation to module or device one-level, is made to reach minimum stop time.But this cover diagnostic routine is a failure warning system in fact just, to fault diagnosis be positioned at the experience that depends on the people to a great extent, and can only be site operation personnel and maintainer's service.If we can long-rangely obtain status information of equipment, and can the Long-distance Control numerical control device, numerical control device is used enterprise and manufacturer, all be significant undoubtedly.
In addition, in informationalized society, networking manufacturing becomes a popular idea day by day, and it utilizes the infotech in the present age, shares the manufacturing resource in the whole world effectively, reduces production costs, and improves the agility of making.So just produce following demand: the equipment in enterprise may be formed manufacturing system with the equipment of strange land enterprise, perhaps comes control and management by strange land enterprise.Therefore, in networking was made, research equipment remote monitoring and diagnostic techniques realized commercial unit realization network management, are basic problems.
In the implementation method that with the numerical control slitter is object research remote monitoring and diagnostic system, the equipment user sometimes can delay normal use because of some very little problems, for example, in general digital control system, a be provided with parameter that is referred to as " error compensation " is arranged, equally, " location an is adjusted " parameter inside being provided with, the parameter of this numerical control slitter is also arranged, this parameter is used to adjust the positioning error that frequency converter response time-delay causes, if it is improper that this parameter is provided with, " locating overproof " then can often appear.And frequency converter response time-delay can be because of manufacturing firm's difference, or the variation of service time and changing, and therefore, will occur the inconsistent situation of feeder position display and target location when frequency converter response time-delay and " location is adjusted " parameter are provided with when different.If this problem of user report, the maintenance personal will allow user oneself debugging solve to the way of the clear solution of instruction manual or handle such minor matter to the doorstep, and this will waste time and energy very much.
Still do not have numerical control slitter remote monitoring and fault diagnosis system product at present both at home and abroad, the research document in this field also seldom.In the existing document, a kind of numerical control slitter remote monitoring and fault diagnosis system that people such as Ma Jun have proposed in a piece of " computer and infotech " second phase in 2003 " based on the research of the C++Builder implementation method of the Long-distance Control of Modem " by name paper.This system comprises Surveillance center's computing machine, 2 Modem and controlled terminal equipment, Surveillance center's computing machine links to each other with Modem by the RS-232C interface with remote equipment, insert public telephone network (PSTN) by Modem again, realize connecting of local Modem and remote equipment by public telephone network (PSTN), thus the both-way communication between realization Surveillance center's computing machine and remote equipment.The data acquistion and control system of remote equipment can be single-chip microcomputer or PC, so just can gather in real time and store the various operational factors and the data of remote equipment, by Modem data in real time is sent on the telephone network then.The PC of Surveillance center then utilizes the Modem bitcom based on C++Builder to receive the data that are sent on the telephone network.Equally, PC Surveillance center also can send number order to carry out corresponding action to remote equipment by Modem and telephone network.
But the communication that is based on the Modem of PTSN public telephone network is subjected to the channel disturbing effect big, loss of data, error code often appear because of channel disturbance, and often break, and the remote monitoring of numerical control slitter need be at long-range main control end and controlled terminal interaction data continually, in case loss of data or often produce error code, just can not realize remote monitoring, more impossible state of runtime machine information by this mistake is made science judgment in long-range main control end to the fault of paper cutter.Therefore this mode communication efficiency is low, a little less than the stability, can't satisfy numerical control slitter remote monitoring and fault diagnosis system to data correctness needs at all, does not reach the target of remote monitoring and fault diagnosis.
Summary of the invention
In order to overcome above-mentioned the deficiencies in the prior art; the object of the present invention is to provide a kind of numerical control slitter remote monitoring and fault diagnosis system and its implementation; operation conditions that can remote monitoring printing house numerical control slitter; and provide the remote technology support with this; the infer fault reason also provides diagnostic recommendations; have the machine maintenance of reduction maintenance cost, shorten stop time, the characteristics of enhancing productivity.
Above-mentioned purpose of the present invention is achieved by the following technical solution:
A kind of numerical control slitter remote monitoring and fault diagnosis system, the controlled terminal 1 that comprises the paper cutter digital control system, long-range main control end 3 three parts of the terminal 2 of serial server and remote monitoring and fault diagnosis central server, controlled terminal 1 is controlled by industrial computer PC/104, controlled terminal 1 passes through the RS-485 serial communication with terminal 2, and terminal 2 and long-range main control end 3 are by Internet network service.
Described industrial computer PC/104 carries out verification with the steering order of remote monitoring center, resolve, data processing is also carried out relevant operation, while sends to terminal with the information of controlled terminal in real time, and these information comprise: the running status of numerical control slitter, the parameter setting of paper cutter, the position that the program of current operation and program code execution row are carried out, the program error code, the program editing state, the position of feeder and the positional information of cutter, industrial computer PC/104 running status, the state of the button of man-machine interface that industrial computer PC/104 is current and digital control system input equipment; The technical specialist at remote monitoring and fault diagnosis center can judge the fault of paper cutter according to these information, and provides the scheme of diagnosis and maintenance, for the printing house provides the remote technology support.The half-duplex control strategy is taked in communication between industrial computer PC/104 and the serial server, promptly have only as industrial computer PC/104 to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just send the feedback information data to serial server.
Described terminal 2 temporarily stores and resolves these information with the information that above-mentioned industrial computer PC/104 sends to long-range main control end, do corresponding data processing, then these information are shown in this locality that with animation or textual form technology department provides monitor service for the printing house.After this locality was handled and shown data, terminal 2 sent to remote monitoring and fault diagnosis center with these status informations by network.Terminal 2 long-range relatively main control end 3 in C/S framework of the present invention is clients, when the communication beginning, at first to send the TCP connection request to long-range main control end 3, and wait for that long-range main control end 3 replys TCP connection request answer signals, the network communication link that shows 2 of long-range main control end 3 and terminals after terminal 2 receives this answer signal is set up, and can intercom mutually this moment.Another function of terminal 2 is to transmit the steering order of long-range main control end, and the Frame verification of just this instruction being correlated with after receiving long-range steering order just sends to industrial computer PC/104 with this instruction when verification is finished and be correct.The half-duplex control strategy is taked in communication between serial server and the industrial computer PC/104, promptly have only when serial server to receive when in the correct or data of the data of industrial computer PC/104 sexadecimal postamble end mark OXFF being arranged, just to industrial computer PC/104 sending controling instruction.
In addition, terminal 2 self also can be by sending the operation that paper cutter is controlled in instruction to industrial computer PC/104, but its steering order is low than the priority of remote control commands, at every turn when industrial computer PC/104 sending controling instruction, all need to judge whether remote control commands is arranged this moment, if have, then preferentially send remote control commands, shield and empty local steering order simultaneously, this realizes by two instruction queues are set at terminal 2, one is local instruction queue, is used to store local steering order; Another is the teleinstruction formation, is used to store the steering order of remote monitoring center.
For real-time that guarantees long-range main control end 3 and the integrality and the validity of communicating by letter beat, dispose two clock timer modules at terminal 2, one is used to regulate and the communicating by letter of industrial computer PC/104, one be used to guarantee network communication link unimpeded effectively, to realize always online function.
Described always online function refers to, as long as long-range main control end 3 is on line state, terminal 2 keeps communications status with eternal and long-range main control end 3, even because of a variety of causes communication is ended, terminal 2 also can rebulid communication link by communication protocol and control strategy, thereby guaranteed terminal 2 and long-range main control end 3 uninterrupted communications, provide possibility for long-range main control end 3 realizes uninterrupted monitoring numerical control slitter.
Described long-range main control end 3 is a server end for terminal 2 in C/S framework of the present invention, to intercept the TCP connection request of terminal 2 before the communication beginning earlier, behind the TCP connection request that listens to terminal 2, reply TCP connection request answer signal to terminal 2 immediately, show that the TCP communication link of terminal 2 and 3 of long-range main control end is set up and can be communicated by letter this moment.Long-range main control end 3 receives the data message that terminal 2 forwards, and data are resolved and handled, and then these information is presented at this locality with animation or textual form, for the usefulness of remote technology analysis expert fault.Simultaneously, long-range main control end 3 can send some steering orders to numerical control slitter according to the needs of fault diagnosis, comes the operation of on-line debugging machine, for final Analysis on Fault Diagnosis provides scientific basis.For the real-time of long-range main control end 3 and the integrality and the validity of communication beat, also dispose two clock timer modules in long-range main control end 3, one is used to regulate and the communicating by letter of terminal, a state that is used to detect the TCP link, with the unimpeded validity of assurance network service, thereby realize always online function.Always online herein function refers to, as long as terminal 2 is on line state, long-range main control end 3 will keep communicating by letter with terminal 2 forever, even because of a variety of causes communication is ended, long-range main control end 3 also can rebulid communication link by communication protocol and control strategy, thereby guarantee and terminal 2 uninterrupted communications, provide possibility for long-range main control end 3 realizes uninterrupted monitoring numerical control slitter.
The prerequisite that above-mentioned always online function realizes is that network system communication is normal.
Long-range main control end Control on Communication strategy is: the half-duplex control strategy is taked in communicating by letter between long-range main control end and the serial server, promptly have only when long-range main control end to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just to the serial server sending controling instruction.
The implementation method of a kind of numerical control slitter remote monitoring and fault diagnosis system may further comprise the steps:
The first step, industrial computer PC/104 monitors numerical control slitter, specifically may further comprise the steps again:
At first, start the master routine of numerical control slitter digital control system controlled terminal 1, master routine is done circulation and is run without interruption, and constitutes a major cycle, and detects whether interrupt identification is 0, if interrupt identification is 0, then continue to check whether the garble sign is 0,, then empty the garble sign if garble is masked as 0, this moment is if there is the shutdown operation order then to close industrial computer PC/104, if there is not shutdown operation then to turn back in the major cycle; If the garble sign is not 0, then continue to judge to have or not the shutdown operation order, then do not turn back in the major cycle, have and then close industrial computer PC/104; If interrupt identification is not 0, then continue to judge the interrupt type of this interruption;
Secondly, not the interruption of serial communication when interrupting type, then this interrupts interrupting for digital control system self, analyzes and respond the operation of this interruption;
At last, when the RS-485 serial ports interrupted, if read operation is interrupted, this moment was if there is write operation then at first to stop current write operation, and the steering order frame of receiving remote main control end 3 then is not if there is the then direct steering order frame of receiving remote main control end 3 of write operation; After receiving long-range main control end 3 steering order frames, then these frame data that comprise steering order are carried out frame head, postamble, and the Frame total bytes carries out verification respectively, in the verification if the Frame mistake occurs and do not find that hexadecimal postamble end mark OXFF then directly abandons this Frame and empties the write operation buffer zone; Find the frame mistake when verification but have hexadecimal postamble end mark also the current running state information of machine to be sent to serial server in the Frame; If verification is correct, then resolve instruction data division in the Frame is turned to corresponding data type, executable operations from the ASCII character reverse, operation empties the write operation buffer zone after finishing, and the result data of carrying out is mapped to the form of encapsulation framing sends after the ASCII character; If write operation interrupts, then utilize and write Interrupt Service Routine with every next byte form transmission, finish up to frame data transmission;
The half-duplex control strategy is taked in communication between industrial computer PC/104 and the serial server, promptly have only as industrial computer PC/104 to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just send the feedback information data to serial server;
In second step, the serial server of terminal 2 is as the communications intermediary of long-range main control end 3 with controlled terminal 1, and its implementation specifically comprises the steps:
At first, when terminal 2 and industrial computer PC/104 serial communication, guarantee the complete of beat of communicating by letter by clock timer 4, communication is started by clock timer 4, and when interrupting with industrial computer PC/104 serial communication, terminal 2 initiatively rebulids a new beat of communicating by letter to industrial computer PC/104 sending controling instruction, the real-time and the integrality of serial communication have been guaranteed, like this can be in time send the running status of numerical control slitter to long-range main control end all sidedly, reach effectively the purpose of monitoring, and provide the insufficient information foundation for remote fault analysis;
Secondly, terminal 2 has teleinstruction formation and two instruction queues of local instruction queue, all instructions all are stored in the instruction queue, terminal 2 is when industrial computer PC/104 sending controling instruction, at first to judge whether the steering order of long-range main control end 3 is arranged in the teleinstruction formation this moment, if have, then send the steering order of long-range main control end 3 to industrial computer PC/104, after finishing, transmission from the teleinstruction formation, removes remote control commands, remove local steering order in the local instruction queue simultaneously, if do not have, then send local steering order, empty local instruction after transmission finishes from local instruction queue, i.e. steering order in the teleinstruction formation is than steering order priority height in the local instruction queue;
Once more, when terminal 2 is communicated by letter with the fault diagnosis central server with remote monitoring, as the client in the C/S framework, at first to send the TCP connection request to long-range main control end 3, when terminal 2 receives the TCP connection request answer signal of long-range main control end 3, show that terminal 2 is connected foundation with the TCP of 3 of long-range main control end; After terminal 2 and long-range main control end 3 are set up TCP and are connected, start another one clock timer 5 and come periodic monitor TCP connection status, disconnect or be lower than just often because of other reason link communication efficient when the TCP link hinders for some reason, initiatively remove existing TCP link and this tear down message is notified to long-range main control end 3, make long-range main control end 3 also in time remove old TCP link, terminal 2 sends new TCP connection request to long-range main control end 3 again then, after long-range main control end 3 receives and replys connection request, new TCP connection has just been set up, and communication is transmitted on new link; As long as long-range main control end 3 is on line state, terminal 2 just can be communicated by letter with long-range main control end 3 incessantly like this, with the always online function of realization terminal 2;
At last, terminal 2 is after receiving the feedback information Frame of industrial computer PC/104, at first Frame is carried out verification, parsing, processing, if verification is correct, then show in this locality, simultaneously this Frame is stored in the transmission buffer zone, then detect terminal 2 and whether intactly be connected with the TCP of long-range main control end 3 with forms such as simulation animation or texts, if the TCP link is intact, then this Frame secondary is packaged into the form of TCP frame and sends to long-range main control end 3; If the TCP link disconnects, then do not send this Frame; Check when correct when Frame, no matter whether the TCP link is intact, all the steering order in this moment instruction queue will be sent to industrial computer PC/104 at last
The priority of instruction queue as mentioned above.If mistake appears in the Frame verification, if detect this moment the sexadecimal of data postamble sign OXFF is arranged in the data, also the steering order in the instruction queue is sent to industrial computer PC/104; If the Frame check errors does not simultaneously detect hexadecimal Frame tail tag will OXFF yet, do not deal with after then receiving industrial computer PC/104 Frame, promptly not to industrial computer PC/104 sending controling instruction;
The half-duplex control strategy is taked in communication between serial server and the industrial computer PC/104, promptly have only when serial server to receive when in the correct or data of the data of industrial computer PC/104 sexadecimal postamble end mark OXFF being arranged, just to industrial computer PC/104 sending controling instruction; Serial server then is the full duplex control strategy with communicating by letter of long-range main control end, promptly just sends to long-range main control end when serial server receives the correct data of industrial computer PC/104 immediately;
In the 3rd step, 3 pairs of numerical control slitters of long-range main control end are monitored and fault diagnosis, and its implementation specifically comprises the steps:
At first, long-range main control end 3 is a server end for terminal 2 in C/S framework of the present invention, to intercept the TCP connection request of terminal 2 before the communication beginning earlier, behind the TCP connection request that listens to terminal 2, reply TCP connection request answer signal to terminal 2 immediately, show that the TCP communication link of terminal 2 and 3 of long-range main control end is set up and can be communicated by letter this moment; After long-range main control end 3 receives the feedback information of industrial computer PC/104, Frame is carried out verification, parsing, processing, if verification is correct, then show in this locality with forms such as animation or texts, then steering order is mapped to ASCII character and is packaged into a complete data frame format form, whether then detect and is connected intactly with the TCP of terminal, intact as if the TCP connection, then the form that this Frame secondary is packaged into the TCP frame sends to terminal; If TCP connect to disconnect or link is congested because of other reason, then with this instruction storage in the steering order formation, wait for when the TCP link is intact that next communication beat sends to terminal 2 again; If Frame check errors, if detect the sexadecimal of data postamble sign OXFF is arranged in the data this moment, when the TCP link is intact, also the steering order in the instruction queue is sent to terminal 2, if the Frame check errors does not detect hexadecimal Frame tail tag will OXFF simultaneously yet, do not deal with, promptly not to terminal 2 sending controling instructions;
Secondly, the beat of communicating by letter of long-range main control end 3 and 2 of terminals is regulated by clock timer 6, the TCP link establishment initial stage, trigger the sending module sending controling instruction first by clock timer 6, and every triggering once, state counter adds 1 automatically, and long-range main control end receives at every turn and all state counter emptied after the data is 0; When the communication beat is normal, clock timer 6 is inoperative, in case communication link disconnects or when not receiving correct Frame, clock timer 6 just triggers sending module automatically, the steering order that is trapped in long-range main control end 3 instruction queues is sent to terminal 2, so that between long-range main control end 3 and terminal 2, adjust and set up new communication beat;
At last, the TCP Link State of long-range main control end 3 is by clock timer 7 periodic monitors, detect a state counter value every 2s and whether surpass 4, when surpassing, think that then the TCP link disconnects or link communication efficient is not high, the information of initiatively removing existing TCP connection this moment and will remove link is notified to terminal 2, empty status timer simultaneously, again intercept the TCP connection request of terminal 2 then, after listening to new TCP connection request, the TCP connection request of replying terminal 2 allows signal to set up new link, like this when network service is broken down, do not need artificial interference just can rebulid new communication link automatically, promptly realized the always online function of long-range main control end monitoring;
The half-duplex control strategy is taked in communicating by letter between long-range main control end and the serial server, promptly have only when long-range main control end to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just to the serial server sending controling instruction.
The invention has the beneficial effects as follows:
One, the present invention utilizes perfect network system and ripe serial port communication technology, has proposed the general frame pattern of a kind of numerical control slitter remote monitoring and fault diagnosis system, for remote monitoring and the fault diagnosis that realizes paper cutter provides the system architecture assurance.
Two, the present invention has realized remote monitoring and fault diagnosis functions to numerical control slitter by formulating the remote monitoring control strategy.
Three, the present invention is by formulating communication protocol efficiently, and the stability and the high efficiency of the tripartite data interaction that guaranteed to communicate by letter have realized the high efficiency of remote monitoring and fault diagnosis.
Four, the present invention passes through to adopt C/S model, and carries out the virtual point-to-point communication of TCP at serial server and remote monitoring center, makes that the real-time of data interaction is better, for the running status of monitoring the far-end paper cutter in real time provides prerequisite.
Five, the present invention is by the clock timer module in terminal and long-range main control end, realized always online function, made remote monitoring and fault diagnosis center continually to continue the far-end numerical control slitter is monitored in real time, for final fault diagnosis provides sufficient diagnostic message.
Six, the present invention provides the paper cutter duty has been monitored intuitively by the animation at remote monitoring and fault diagnosis center simulation paper pulling device of paper cutter track.
Seven, the present invention is by being provided with instruction control priority at terminal, realized that long-range main control end and printing house engineering department monitor the function of paper cutter running status simultaneously, even machine does not have fault like this, also can working environment relatively preferably office of technology department control paper cutter, needn't improve the working environment of workers at noisy machine execute-in-place.
Description of drawings
Fig. 1 is a general structure synoptic diagram of the present invention.
Fig. 2 is the process flow diagram that industrial computer PC/104 of the present invention realizes remote monitoring and fault diagnosis.
Fig. 3 is the process flow diagram that terminal 2 of the present invention is realized remote monitoring and fault diagnosis.
Fig. 4 is the process flow diagram that the long-range main control end 3 of the present invention realizes remote monitoring and fault diagnosis.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
Referring to Fig. 1, a kind of numerical control slitter remote monitoring and fault diagnosis system, the controlled terminal 1 that comprises the paper cutter digital control system, the terminal 2 of serial server, long-range main control end 3 three parts of remote monitoring and fault diagnosis central server, controlled terminal 1 is by industrial computer PC/104 control, and controlled terminal 1 passes through the RS-485 serial communication with terminal 2, and terminal 2 and long-range main control end 3 are by Internet network service.
Industrial computer PC/104 is controlling the operation of numerical control slitter, be responsible for resolving the steering order of remote monitoring center simultaneously, and execution associative operation, form with the frame of information packaging cost invention tailor-make such as state of runtime machine after executing associative operation sends to serial server, is forwarded to remote monitoring center by serial server.
Industrial computer PC/104 contains the digital control system of paper cutter, and the module of receiving remote instruction module and processing instruction, the steering order that receives from serial server at first produces serial ports and reads to interrupt, by read through model part receiving data frames in the serial ports Interrupt Service Routine, and do the data frame check, read message when verification correctly then sends serial ports to the digital control system master routine, in the next round circulation of numerical control master routine, inquire this message after, download message and carry out the dependent instruction operation from message queue.Industrial computer PC/104 to remote monitoring center send response message be by the serial ports Interrupt Service Routine in the writing module part send to the serial server terminal according to byte, send a byte at every turn, finish up to feedback data frame one whole frame is sent.Because the Computerized Numerical Control System Program major cycle is carried out the time of a cycling and is approximately 1ms, so the steering order of remote monitoring center or serial server obtains carrying out in case received by industrial computer PC/104 and verification when correct soon.In order to make remote monitoring center monitor the real-time information of paper cutter, a kind of control strategy has been taked in invention, promptly when the last round of feedback frame transmission of industrial computer PC/104 has received the steering order of remote monitoring center or serial server again when not finishing simultaneously, industrial computer PC/104 at first ends current transmission, the read through model of carrying out immediately in the serial ports Interrupt Service Routine receives new steering order, and empty and send buffer zone and abandon old industrial computer PC/104 feedback frame, enter the operation of a new round.The half-duplex control strategy is taked in communication between industrial computer PC/104 and the serial server, promptly has only when industrial computer PC/104 receives just to send the feedback information data to serial server when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged.
Serial server comprises serial communication modular and network communication module, serial communication modular is responsible for and industrial computer PC/104 data interaction, send remote monitoring center or local steering order to industrial computer PC/104, and reception industrial computer PC/104 sends to the Various types of data frame of remote monitoring center, this moment is as the terminal of communicating by letter of industrial computer PC/104 and remote monitoring center, certainly also can directly monitor the operation of paper cutter in technology department, and not be used in the abominable industry spot operation of environment.But to instruct authority to surmount in order preventing, promptly to prevent the execution of the steering order of the steering order interference remote monitoring center that serial server sends, the instruction priority that is provided with serial server is lower than the instruction of remote monitoring center.In order to guarantee that remote monitoring center monitors the running status of far-end numerical control slitter in real time effectively, the present invention has increased by two clock timer modules at the serial server terminal, has guaranteed the robustness and the stability of communication.Wherein clock timer 4 is responsible for starting and the communicating by letter of industrial computer PC/104, and restart communication when interrupting and regulate the beat of shaking hands of communication at communication beat mistake or communication abnormality, whether the TCP link channel of 5 periodic monitor serial servers of another clock timer and remote monitoring center is unimpeded, if when not smooth or channel congestion, then removing old TCP connects, and this dismounting information is notified to remote monitoring center, send new TCP connection request to the remote monitoring center server then, wait for that remote monitoring center answer connection request answer signal is to set up new communication link, thereby realize if remote monitoring center online just can be incessantly with the remote monitoring center real-time finish data interaction, promptly realized the function that serial server is always online.
The Control on Communication strategy of serial server is: the half-duplex control strategy is taked in the communication between serial server and the industrial computer PC/104, promptly have only when serial server to receive when in the correct or data of the data of industrial computer PC/104 sexadecimal postamble end mark OXFF being arranged, just to industrial computer PC/104 sending controling instruction; Serial server then is the full duplex control strategy with communicating by letter of long-range main control end, promptly just sends to long-range main control end when serial server receives the correct data of industrial computer PC/104 immediately.
Remote monitoring center comprises the network communication module and the beat monitoring module of communicating by letter.Network communication module is formed Data Receiving verification module and instruction sending module by two parts.Data Receiving verification module is responsible for receiving the industrial computer PC/104 various information that serial server forwards, and do verification, if verification the Frame mistake occurs and Frame does not have hexadecimal postamble end mark OXFF, then abandon the data that this time receive and empty send buffer; If but hexadecimal postamble end mark OXFF is arranged in the check errors data, then the status information with current machine run sends to serial server; If the checking data frame is correct, then instruction to be resolved, operations such as data conversion become the final data information simulation animation then or with the textual form demonstration, provide foundation for the remote port technical specialist diagnoses.Sending module is then at first with remote control operation, as the control informations such as button that start paper cutter transform the control code that is mapped to correspondence, and the steering order sign indicating number further is mapped to ASCII coding, be packaged into the complete Frame of a frame at last and send to serial server by network system, be transmitted to industrial computer PC/104 by serial server, thereby reach the target of control paper cutter.
The half-duplex control strategy is taked in communicating by letter between long-range main control end and the serial server, promptly have only when long-range main control end to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just to the serial server sending controling instruction.
Communication beat monitoring module has two clock timers, wherein clock timer 6 starts communication when remote monitoring center is communicated by letter beginning with serial server, and communicate by letter at both and to send when chaotic or wrong, adjust the communication beat, guarantee the validity and the stability of communication, each this clock timer triggers and has called sending module, and then counter Counter adds 1 automatically, and Counter is emptied when receiving frame data at every turn.
Whether clock timer 7 timing detection trigger Counter values are greater than a certain preset value, if greater than representing that then remote monitoring center does not receive correct Frame in a period of time, perhaps communication link disconnects, remove old TCP link this moment, and this dismounting information notice serial server, again intercept the new TCP connection request of serial server,, rebulid new TCP link in case receive the new TCP connection request of serial server then reply a connection request answer signal.As long as serial server is online, remote monitoring center just can be realized always online function, the running status of monitor full time paper cutter by this control strategy like this.
The following describes the present invention's three parts data processing policy and process flow diagram separately in numerical control slitter remote monitoring and fault diagnosis system.
Referring to Fig. 2, the flow process of industrial computer PC/104 deal with data is as follows:
From step 201, enter digital control system master routine step 202, then judge in step 203 whether interrupt identification is 0, if 0 expression is not interrupted taking place this moment, then in step 204, continue to judge whether communication mark is 0, if be not 0, execution in step 206; If 0, produced mistake in representing industrial computer PC/104 and serial server being communicated by letter, this moment, execution in step 205 emptied the garble sign to adjust the communication beat, made that new communication is normal.After execution of step 205, in step 206, judged whether shutdown operation again, if having, execution in step 207 end operations then; If there is not the shutdown operation sign, then continue working procedure and carry out the next round major cycle, continue to carry out the operations such as interrupt inquiry of next round.
If interrupt identification is not 0 in step 203, expression has interruption to produce this moment, continue in step 208 then to judge whether this interrupts is that serial ports interrupts, if not serial ports interrupts then representing that this interrupts producing for some interrupt sources of digital control system self, analyze this interrupt type in step 209 then, after having analyzed interrupt type, then execution in step 210 is called all kinds of Interrupt Service Routines and is finished each self-corresponding operation in this step.Execute and all will enter step 225 after the interrupt operation and empty interrupt identification, show that this interrupt event finishes dealing with, enter step 204 then, subsequent step as mentioned above.
If judge in the step 208 that serial ports interrupts, show that so this interrupts for serial ports interrupts, be the module of remote monitoring service, so invocation step 211 serial ports Interrupt Service Routines.To judge at first that in step 211 Interrupt Service Routine this time interrupting is that serial ports is read to interrupt or serial ports is write interruption, if serial ports is write interruption, show that this moment, industrial computer PC/104 sent all kinds of feedback of status Frames of paper cutter to serial server, then execution in step 221, in this step the feedback data of paper cutter organized and enter step 222, step 222 is mapped to ASCII character with feedback data.Execution in step 223 becomes complete frame with data encapsulation then, gives sending module and sends in step 224, changes step 225 over to after being sent completely, and subsequent step as mentioned above.
If step 211 is judged this interruption and is read to interrupt for serial ports, represent that then industrial computer PC/104 receives remote control commands, before this steering order is handled, whether must judge has the serial ports write operation this moment, if have, expression industrial computer PC/104 this moment is sending all kinds of feedback of status Frames of paper cutter to serial server, in order to make remote monitoring center monitor the feedback informations such as up-to-date running status of paper cutter in real time, control strategy at this time is to stop to send current feedback data frame, is transferred to immediately to handle current steering order operation.So, to judge currently when writing the serial ports write operation when step 212, execution in step 217 stops current write operation, promptly stops current process of transmitting.Receive serial data in step 213 then.If step 212 is judged the current serial ports write operation that do not have, the then directly operation of execution in step 213 reception data.
After receiving data, to carrying out verification in step 214 to Frame before the data processing, implementation method of the present invention is that checking data frame head, postamble, Frame total bytes, CRC are to whole frame data verification, frame head has defined the type of steering order, postamble is represented the normal termination of Frame, the total bytes of Frame is represented the total bytes of these frame data, CRC is a cyclic redundancy check (CRC), if all verifications are all correct, represent that then this steering order is correct, does not promptly make a mistake in transmission.So the correct back of verification execution in step 218, Frame is resolved, the analysis instruction type, execution in step 219 after the operation of having analyzed this steering order, finish the corresponding control operation of instruction, and enter step 220 and empty the transmission buffer zone after executing relevant operation, be about to current transmission buffer zone and empty, the operating result of carrying out for this steering order sends the feedback data reserved storage space.Empty and send execution in step 221 behind the buffer zone, subsequent step as mentioned above.
If step 214 is found the Frame check errors, show that steering order may make a mistake in transmission course, because the present invention adopts semiduplex control strategy promptly to receive correct steering order or receives that sexadecimal postamble end mark OXFF must call sending module to the remote monitoring center send state information, further judged whether OXFF so enter step 215 after the execution in step 214, if do not have, then execution in step 226 abandons this Frame and does not deal with, execution in step 216 empties the transmission buffer zone then, for next round sends the feedback data reserved storage space; If postamble end mark OXFF is arranged, then enter step 220, subsequent step is as mentioned above.
Referring to Fig. 3, the flow process of terminal 2 deal with data is as follows:
When terminal 2 is communicated by letter with the fault diagnosis central server with remote monitoring, as the client in the C/S framework, at first to send the TCP connection request to long-range main control end 3, when terminal 2 received the TCP connection request answer signal of long-range main control end 3, the TCP that shows terminal 2 and 3 of long-range main control end was connected and sets up and can intercom mutually.
Execution in step 302 receives the operation of data behind step 301 start-up routine, the data that this moment, serial server received may be the feedback information Frames of PC/104, it also may be steering order from remote monitoring center, so which class data must at first judge these frame data before data are dealt with is, in step 303, judge if Frame is the steering order from remote monitoring center, then execution in step 304, the steering order carry in the teleinstruction formation, is waited for that serial server sends to industrial computer PC/104.If the feedback information data that these data that receive are industrial computer PC/104, then execution in step 305, with the afterbody of data splicing at send buffer, on the address space that the data storage that soon this time receives begins to the next byte address from the send buffer data with existing, like this data and this data that receive that received last time in the send buffer are constituted an integral body, handle for the receiver module in the serial server.
Begin after data splicing is finished data are carried out verification, the data of verification this moment are the data of current whole send buffer, and verification is from the high byte of send buffer, and promptly the afterbody from data begins verification.Whether at first execution in step 306 verifications have postamble sign OXFF in the judgment data, if do not have, represent that then the data in the buffer zone still are not the complete data of a frame, need to wait for the splicing of secondary data down, so execution in step 307 does not deal with.If have, then continue execution in step 308, judge whether the send buffer data have the frame head sign, frame head has defined the type of instruction and the operation of this instruction representative, if having, then execution in step 309.Whether the total bytes at step 309 judgment data frame is correct, correctly then enters step 310, makes cyclic redundancy check.
Through behind above-mentioned several checking procedures, Frame is correct then execution in step 311, then data is dealt with.At first to be to show these information on the serial server in this locality, promptly also can monitor the operation of paper cutter in printing house office of technology department.Step 311 at first will empty long-range transmission buffer zone, the feedback data frame of long-range transmission buffer stores industrial computer PC/104, after serial server is done these data verification demonstration etc. and is handled in this locality, just storage is kept at long-range transmission buffer zone wait and sends to remote monitoring center, and promptly execution in step 312.Resolve in step 313 pair instruction then, analyze the action type of instruction.Because industrial computer PC/104 has carried out the ASCII character mapping to data when sending the feedback data frame, so before video data, must carry out inverse conversion to the data division in the Frame earlier, be about to ASCII character and reverse the data that turn to each data type, be reduced to the data of True Data type.Enter step 315 after executing this operation, these data are carried out animation simulation or text display, track animation as simulation paper pulling device of paper cutter in serial server, the error code that shows present procedure, information such as PLC running status, thus be implemented in the function that printing house technology department also can monitor the paper cutter operation.
After executing operation such as paper cutter state demonstration, deal with receiving buffer data, so that can receive new Frame.In step 316, all low byte data before the deletion OXFF address, no matter correctness behind these data checks, all to do this operation, guaranteed that like this data that at every turn receive all are up-to-date data, thereby guarantee to monitor the up-to-date running status of paper cutter, the current nearest running status of analytic engine more helps Fault Diagnosis in the fault diagnosis of paper cutter.Then the high byte data integral body behind the OXFF address is all moved forward, and begin storage from the first byte of send buffer, this operates in step 317 and finishes.In above-mentioned steps 308, step 309, step 310, when the frame mistake appears in verification, all directly change step 316 over to, subsequent operation is same as above.
After execution of step 317, the feedback data frame that is stored in the industrial computer PC/104 of long-range transmission buffer zone be sent to remote monitoring center, for remote fault diagnosis provides the data foundation.But sending prerequisite is that network communication channels is intact.So judge in step 319 whether current TCP connects intact, if current TCP connects disconnection or communication channel quality is not high, then execution in step 325, empty long-range transmission buffer data, because connecting, TCP disconnected, the data that show long-range transmission buffer zone this moment have not been the last states of paper cutter operation, empty so that receive new data.Emptied execution in step 326 behind the long-range transmission buffer zone, removing old TCP connects, the then TCP of the request again attended operation of execution in step 327, send new connection request to remote monitoring center, and wait for the TCP response of remote monitoring center server in step 328, after serial server received TCP request response, new communication link had just been set up.
In order to guarantee the unimpeded of communication channel and the real-time that the far-end paper cutter is monitored, adopted the strategy of clock timer periodic monitor TCP link.Clock timer 5 just triggers once automatically every 7S, enters step 323 after step 322 triggers, and judges whether current communication link is intact, if intact, then execution in step 324, and clock timer 5 is returned 0 back reclocking.Disconnect if monitor communication link, also will remove old TCP connection and ask new TCP connection request again, promptly execution in step 326, and subsequent step as mentioned above.
Judge that in above-mentioned steps 319 TCP connect when intact, execution in step 320 sends to remote monitoring center with the industrial computer PC/104 feedback data frame of long-range transmission buffer zone.
Serial server just will have been given industrial computer PC/104 sending controling instruction at this beat according to communication protocol after sending to remote monitoring center at the feedback data frame of handling industrial computer PC/104 transmission and with these frame data.Because serial server also can be monitored industrial computer PC/104, promptly also can be alone to industrial computer PC/104 sending controling instruction, so must judge at serial server whether teleinstruction formation this moment is empty before industrial computer PC/104 sends instruction, be the current remote control commands that whether has, this judgement is finished in step 329.Because the priority of remote control commands is higher than local serial ports steering order, so when the remote control commands formation is not sky, from the remote control commands formation, extract remote control commands in step 331, and command mappings is become ASCII character in step 332, enter step 333 encapsulation framing and send to industrial computer PC/104 from serial ports in step 335, and before sending, to close clock timer 4, prevent that clock timer 4 from regularly triggering the instruction that repeats to send same beat.The transmission execution in step 336 that finishes empties 2 and sends instruction queues, in time empties remote control commands formation and local steering order formation, is new steering order reserved storage space.Clock timer 4 is then opened in step 337 in execution of step 336 backs, to keep the stability of communication beat.
If the formation of step 329 teleinstruction is empty, then show to send local steering order this moment, promptly execution in step 330, then enter step 332, and subsequent step is as mentioned above.
For stability and the real-time that guarantees remote monitoring, serial server also has a strategy, promptly utilizes regularly detection trigger of clock timer 4 modules.The function of clock timer 4 has 2, its, the serial communication of startup serial server and industrial computer PC/104 when the communication beginning; They are two years old, when communication takes place chaotic or communicates by letter the beat mistake, initiatively adjust the communication beat in time, for example, in serial communication for a certain reason, the industrial computer PC/104 feedback data frame that receives on serial server continues to make a mistake, remote monitoring center and local steering order all can not in time send to industrial computer PC/104 like this, at this time clock timer 4 detects the sending module that initiatively calls serial server behind this state, steering order is sent to industrial computer PC/104, thereby set up new communication beat.The real-time and the validity of remote monitoring center and industrial computer PC/104 data interaction have been guaranteed like this.
Step 321 among Fig. 3, clock timer 4 triggers once every 4s, enters step 329 and judge whether current TCP link is intact, and subsequent step as mentioned above after triggering.
After execution of step 337, enter step 338 and judge this moment whether the operation of bolt down procedure is arranged, if having, then execution in step 339, termination routine; If no, then be transferred to step 302, enter the reception data of a new round.
Referring to Fig. 4, long-range main control end 3 flow chart of data processing are as follows:
Long-range main control end 3 is a server end for terminal 2 in C/S framework of the present invention, to intercept the TCP connection request of terminal 2 before the communication beginning earlier, behind the TCP connection request that listens to terminal 2, reply TCP connection request answer signal to terminal 2 immediately, show that the TCP communication link of terminal 2 and 3 of long-range main control end is set up and can be communicated by letter this moment.
Program enters step 402 after step 401 starts, want Initial Channel Assignment variable Counter=0 this moment, this variable is used for the number of times that recording clock timer 6 directly calls the network sending module, when its value was less than or equal to 4, the communication link between expression remote monitoring center and serial server was intact; When its value greater than 4 the time, the not high or communication disruption of expression communication channel quality will be removed old TCP this moment and be connected and set up new communication link.Execution in step 403 then, receive the data that serial server sends over by network, and clear channel variable Counter=0.Then change step 405 over to, finish the data splicing operation, the Frame that soon newly receives begins storage from the next idle address of the existing byte of send buffer, in the sequence of operations below, all is to be that object is operated with spliced whole send buffer data.
Spliced execution in step 406 after the data, whether postamble end mark OXFF has been arranged in the judgment data, judged and data check all is to carry out to low byte is byte-by-byte from high byte.If there is not end mark OXFF, show that the data of send buffer still are not complete Frames this moment, the remaining part data that need to wait for whole frame just can be spliced into a complete Frame, only receive a complete Frame, data processing module just extracts data and deals with from receiver module.If end mark is arranged, enter step 408 and continue to have judged whether the frame head sign, if having, then enter step 409, whether the data total bytes of verification frame is correct; Also will make cyclic redundancy check (CRC) in step 410 after verification is correct, verification does not have mistake, shows that then this Frame is right-on, can carry out data processing etc. and operate.
Through entirely true then execution in step 411 operations of Frame behind the data check of a series of strictnesses, steering order is resolved, the type of analysis instruction, execution in step 412 then, be converted into separately real data type data with the ASCII character data inverse in the Frame this moment, so that be shown as understandable information in this locality.
Through after the data conversion of step 412, data messages such as the state of paper cutter have been the real data of machine, then execution in step 413 operations, these digital simulations are become animation or are presented at local interface with textual form, analyze the foundation of paper cutter fault as remote monitoring center main control end technical specialist.
After paper cutter status information display process, the data of send buffer are done following processing, at first execution in step 414, all low byte data before the deletion OXFF address, then in step 415, the byte data behind the OXFF address moved front portion, and begin storage from the first byte of send buffer to send buffer.The purpose of moving data is the storage spaces that in time empty send buffer, also be to be the new Frame reserved storage space of next round, its essential meaning is to refresh the running status of paper cutter like this, communication beat in opinion once receives the new status information of paper cutter, thereby make remote monitoring center can obtain to real-time the last state of its current operation, so that analysis provides up-to-date authentic data to mechanical disorder.
Mistake all occurred at above-mentioned steps 408,409,410 checking data frames, occurred that mistake then directly changes step 414 over to, 415 pairs of send buffers are moved operation as data.Because in case mistake appears in data check, show that these frame data are imperfect, the reason of mistake may be the signal interference to take place or send preceding frame encapsulation to make mistakes or the like in data transmission procedure, no matter which kind of reason, the Frame of mistake all can not be as the information foundation of numerical control slitter fault analysis, so must empty erroneous frame, promptly move operation as data at send buffer.
After the data presentation processing, according to the regulation of communication protocol and communication beat, be to industrial computer PC/104 sending controling instruction behind this beat.The prerequisite of sending controling instruction is that the TCP connection is intact, judge whether current TCP link is intact so after execution of step 415, enter step 417, if the TCP link is bad, then change step 428 over to, close clock timer 6, prevent that clock timer 6 from calling sending module to the serial server sending controling instruction when the TCP link disconnects.Execution in step 429 then, and clear channel variable Counter=0 is as next round channel quality monitoring foundation.Then execution in step 430 is removed old TCP connection, and tear down message is notified to serial server, again intercept the TCP connection request of serial server in step 431, in step 432, if receive new TCP connection request, then reply the connection answer signal and set up new communication link to serial server, will open clock timer 6 this moment, so that guarantee the correctness of communication beat.
In order to guarantee the unimpeded of communication channel and the real-time that the far-end paper cutter is monitored, adopted the strategy of clock timer 7 periodic monitor TCP links.Clock timer 7 just triggers once automatically every 3s, and execution in step 418 when triggering then enters step 419 and judges that whether Counter is greater than certain default value 4 at this moment, if be not more than, then execution in step 420, and it is 0 reclocking that clock timer 7 is emptied; If 4 execution in step 428 of the value of being not more than, subsequent step as mentioned above.
Connect when intact when step 417 detects TCP, execution in step 421 is closed clock timer 6, repeats sending controling instructions in order to avoid clock timer 6 regularly triggers.Then the steering order data map is become ASCII character, and finally finish the encapsulation of Frame, give step 425 after encapsulation is finished and send to serial server by network by sending module in step 424 in step 423.Transmission finishes after the steering order, the flush instructions formation, and this operates in the step 426 and carries out, and opens the clock timer 6 of closing then in step 427, guarantees the stable of subsequent communications beat.
Then execution in step 433 judges whether this time send is that clock timer 6 triggerings are called, if not, then do not deal with.If, then channel variable Counter value is added 1, show and do not receive complete correct data frame in a period of time, clock timer 6 detects this situation, just trigger automatically and call sending module, steering order is in time sent to serial server, in case steering order is trapped in remote monitoring center.
Then judge the operation whether bolt down procedure is arranged this moment, if having, at the end operation of execution in step 437 in step 436; If do not have, then be transferred to step 403, receive the industrial computer PC/104 Frame that serial server is transmitted again, enter next round communication beat.
The function of clock timer 6 has two, one, be when long-range main control end 3 is communicated by letter beginning with serial server, to start communication, they are two years old, when communication sends chaotic or communicates by letter the beat mistake, regularly trigger also and initiatively call sending module, the steering order that is trapped in the instruction queue is in time sent to serial server.Just trigger once automatically every 5s, begin to carry out from step 416 when triggering, and enter the TCP link detecting of step 417, subsequent step as mentioned above.

Claims (8)

1, a kind of numerical control slitter remote monitoring and fault diagnosis system, it is characterized in that, the controlled terminal (1) that comprises the paper cutter digital control system, the terminal of serial server (2), long-range main control end (3) three parts of remote monitoring and fault diagnosis central server, controlled terminal (1) is by industrial computer PC/104 control, and controlled terminal (1) passes through the RS-485 serial communication with terminal (2), and terminal (2) and long-range main control end (3) are by Internet network service.
2, a kind of numerical control slitter remote monitoring according to claim 1 and fault diagnosis system is characterized in that, terminal (2) comprises two clock timer processing modules.
3, a kind of numerical control slitter remote monitoring according to claim 1 and fault diagnosis system is characterized in that, long-range main control end (3) comprises two clock timer processing modules.
4, a kind of numerical control slitter remote monitoring according to claim 1 and fault diagnosis system, it is characterized in that, it is customer end/server mode that long-range main control end (3) and terminal (2) constitute a C/S, this pattern medium-long range main control end (3) is a server end, and terminal (2) is a client.
5, the implementation method of a kind of numerical control slitter remote monitoring and fault diagnosis system is characterized in that, may further comprise the steps:
The first step, industrial computer PC/104 monitors numerical control slitter, specifically may further comprise the steps again:
At first, start the master routine of paper cutter digital control system controlled terminal (1), master routine is done circulation and is run without interruption, constitute a major cycle, and detect whether interrupt identification is 0, if interrupt identification is 0, then continue to check whether the garble sign is 0, if garble is masked as 0, then empty the garble sign, this moment is if there is the shutdown operation order then to close industrial computer PC/104, if there is not shutdown operation then to turn back in the major cycle, if garble is masked as 0, then continue to judge to have or not the shutdown operation order, then do not turn back in the major cycle, have and then close industrial computer PC/104, if interrupt identification is not 0, then continue to judge the interrupt type of this interruption;
Secondly, not the interruption of serial communication when interrupting type, then this interrupts interrupting for digital control system self, analyzes and respond the operation of this interruption;
At last, when the RS-485 serial ports interrupted, if read operation is interrupted, this moment was if there is write operation then at first to stop current write operation, and the steering order frame of receiving remote main control end (3) then is not if there is the then direct steering order frame of receiving remote main control end (3) of write operation; After receiving long-range main control end (3) steering order frame, then data are carried out frame head, postamble, and the verification respectively of Frame total byte, sexadecimal postamble end mark OXFF appears not having in Frame mistake and the data in verification, then directly abandon this Frame, and empty the write operation buffer zone; If check errors still has the OXFF sign is arranged in the data, then the status information with current machine run sends to serial server; If verification is correct, then resolve instruction data division in the frame is turned to corresponding data type, executable operations from the ASCII character reverse, after finishing, operation empties the write operation buffer zone, and the result data of carrying out is mapped to the form of encapsulation framing sends after the ASCII character, if write operation interrupts, then utilize and write Interrupt Service Routine, finish up to frame data transmission with every next byte form transmission;
In second step, the serial server of terminal (2) is realized communicating by letter of long-range main control end (3) and controlled terminal (1), specifically comprises the steps:
At first, when terminal (2) and industrial computer PC/104 serial communication, guarantee the complete of beat of communicating by letter by clock timer (4), communication is started by clock timer (4), and when interrupting with industrial computer PC/104 serial communication, terminal (2) initiatively rebulids a new beat of communicating by letter to industrial computer PC/104 sending controling instruction, the real-time and the integrality of serial communication have been guaranteed, like this can be in time send the running status of paper cutter to long-range main control end (3) all sidedly, reach monitoring effectively and provide the insufficient information foundation for fault analysis;
Secondly, terminal (2) has teleinstruction formation and two instruction queues of local instruction queue, all instructions all are stored in the instruction queue, terminal (2) is when industrial computer PC/104 sending controling instruction, to judge earlier whether the steering order of long-range main control end (3) is arranged in the teleinstruction formation this moment, if have, then send the steering order of long-range main control end (3) to industrial computer PC/104, from the teleinstruction formation, empty remote control commands after transmission finishes, empty local steering order in the local instruction queue simultaneously; If do not have, then send local steering order, send the back that finishes and from local instruction queue, empty local instruction;
Once more, the main control end (3) of terminal (2) and remote monitoring and fault diagnosis central server is when communicating by letter, terminal (2) long-range relatively main control end (3) in native system C/S framework is a client, when the communication beginning, at first to send the TCP connection request to long-range main control end (3), and wait for that long-range main control end (3) replys TCP connection request answer signal, show the network communication link foundation between long-range main control end (3) and terminal (2) after terminal (2) receives this answer signal, can intercom mutually this moment; After terminal (2) and long-range main control end (3) are set up TCP and are connected, start clock timer (5) and come periodic monitor TCP connection status, disconnect or be lower than just often because of other reason link communication efficient when the TCP link hinders for some reason, initiatively removing existing TCP link and this tear down message is notified to long-range main control end (3) makes it in time remove old TCP link, terminal (2) sends new TCP connection request to long-range main control end (3) again then, after long-range main control end (3) receives and replys connection request, new TCP connection has just been set up, communication is transmitted on new link, as long as long-range main control end (3) is on line state, terminal (2) just can be communicated by letter with long-range main control end (3) incessantly, to realize the always online function of terminal (2);
At last, terminal (2) is after receiving the feedback information Frame of industrial computer PC/104, earlier Frame is carried out verification, if verification is correct, then show in this locality with forms such as animation or texts, whether then detect terminal (2) is connected intact with the TCP of long-range main control end (3), if it is intact, then the form that this Frame secondary is packaged into the TCP frame sends to long-range main control end (3), if the TCP link disconnects or other reasons causes channel congestion then not send, the steering order of inciting somebody to action in instruction queue this moment sends to industrial computer PC/104 at last, if Frame check errors, if detect the sexadecimal of data postamble sign OXFF is arranged in the data this moment, also the steering order in the instruction queue is sent to industrial computer PC/104; If the Frame check errors does not simultaneously detect hexadecimal Frame tail tag will OXFF yet, do not deal with after then receiving industrial computer PC/104 Frame;
In the 3rd step, long-range main control end (3) is monitored and fault diagnosis numerical control slitter, and its implementation specifically comprises the steps:
At first, long-range main control end (3) is being a server end for terminal (2) in the native system C/S framework, to intercept the TCP connection request of terminal (2) before the communication beginning earlier, behind the TCP connection request that listens to terminal (2), reply TCP connection request answer signal to terminal (2) immediately, show that the TCP communication link foundation between terminal (2) and long-range main control end (3) can be communicated by letter this moment; After long-range main control end (3) receives the feedback information of industrial computer PC/104, Frame is carried out verification, resolve, handle, if verification is correct, then show in this locality with forms such as animation or texts, then the steering order data map is become ASCI I sign indicating number and be packaged into a complete data frame format form, then whether detection is connected intact with the TCP of terminal, if it is intact, then the form that this Frame secondary is packaged into the TCP frame sends to terminal, if the TCP link disconnects or other reasons cause channel congestion then with this instruction storage in the steering order formation, wait for when the TCP link is intact, send to terminal again at next one communication beat, if Frame check errors, if detect the sexadecimal of data postamble sign OXFF is arranged in the data this moment, when the TCP link is intact, also the steering order in the instruction queue is sent to terminal,, then do not deal with if the Frame check errors does not detect hexadecimal Frame tail tag will OXFF simultaneously yet;
Secondly, in long-range main control end (3) control, long-range main control end (3) is guaranteed by clock timer (6) with the beat of communicating by letter of terminal (2), the TCP link establishment initial stage, trigger sending module first to terminal (2) sending controling instruction by clock timer (6), and state counter of every triggering adds 1 automatically, and it is 0 that state counter just empties when long-range main control end (3) whenever receives a secondary data automatically.When the communication beat is normal, clock timer (6) is inoperative, when communication link communication channel congestion or communication beat mistake, this timer just triggers sending module automatically, adjusts and set up new communication beat between long-range main control end (3) and controlled terminal (1);
At last, long-range main control end (3) TCP Link State is monitored by clock timer (7), detect a state counter value every 3s and whether surpass preset value 4, when surpassing, think that then the TCP link disconnects or communication link is congested, the information of initiatively removing existing TCP connection this moment and will remove link is notified to terminal (2), empty status timer simultaneously, again intercept the TCP connection request of terminal (2) then, after listening to new TCP connection request, the TCP connection request of replying terminal (2) allows signal to set up new link.
6, method according to claim 5, it is characterized in that, the half-duplex control strategy is taked in communication between industrial computer PC/104 and the serial server, promptly have only as PC/104 to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just send the feedback information data to serial server.
7, method according to claim 5, it is characterized in that, the half-duplex control strategy is taked in communication between serial server and the industrial computer PC/104, promptly have only when serial server to receive when in the correct or data of the data of industrial computer PC/104 sexadecimal postamble end mark OXFF being arranged, just to industrial computer PC/104 sending controling instruction; Serial server then is the full duplex control strategy with communicating by letter of long-range main control end (3), promptly just sends to long-range main control end (3) when serial server receives the correct data of industrial computer PC/104 immediately.
8, method according to claim 5, it is characterized in that, the half-duplex control strategy is taked in communicating by letter between long-range main control end (3) and the serial server, promptly have only when long-range main control end (3) to receive when in the correct or data of the data of serial server sexadecimal postamble end mark OXFF being arranged, just to the serial server sending controling instruction.
CN2009100229984A 2009-06-19 2009-06-19 Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same Active CN101576742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100229984A CN101576742B (en) 2009-06-19 2009-06-19 Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100229984A CN101576742B (en) 2009-06-19 2009-06-19 Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same

Publications (2)

Publication Number Publication Date
CN101576742A true CN101576742A (en) 2009-11-11
CN101576742B CN101576742B (en) 2011-06-22

Family

ID=41271692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100229984A Active CN101576742B (en) 2009-06-19 2009-06-19 Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same

Country Status (1)

Country Link
CN (1) CN101576742B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866979A (en) * 2012-09-05 2013-01-09 四川省绵阳西南自动化研究所 Synchronous serial interface signal sensor data acquisition device
CN102970177A (en) * 2012-10-19 2013-03-13 深圳市计通智能技术有限公司 Method for analyzing and filtering communication data error codes of computer monitoring system
CN103595725A (en) * 2013-11-21 2014-02-19 国家电网公司 Screen cabinet resource control system and method
CN103901823A (en) * 2012-12-25 2014-07-02 联合汽车电子有限公司 Vehicle-mounted remote terminal
ITUB20169898A1 (en) * 2016-01-11 2017-07-11 Fotoba Int S R L METHOD AND AUTOMATIC SYSTEM FOR CUTTING SUBSTRATI WITH PRINTED IMAGES
CN108413922A (en) * 2018-05-10 2018-08-17 新疆维吾尔自治区地震局 A kind of fast detector for Borehole strain observation instrument
CN108508816A (en) * 2018-06-14 2018-09-07 上海汇焰智能科技有限公司 Distribution hanging weighing system and distributed hangar system
CN109286654A (en) * 2018-08-01 2019-01-29 深圳市德卡科技股份有限公司 Remote equipment debugging system and method based on serial ports
CN109510686A (en) * 2018-09-13 2019-03-22 红色江山(湖北)导航技术有限公司 A kind of general binary stream data conversion treatment method
CN110232038A (en) * 2019-05-20 2019-09-13 湖北三江航天红峰控制有限公司 A kind of industrial personal computer intelligent communication serial port device
CN112235827A (en) * 2020-09-15 2021-01-15 郑州景璇电子科技有限公司 Method for improving successful efficiency of wireless networking data communication
CN112365699A (en) * 2020-09-24 2021-02-12 青岛鼎信通讯股份有限公司 Meter reading method for solving problem of uplink communication timeout of water-gas-heat meter converter
CN112783735A (en) * 2021-02-03 2021-05-11 优顶特技术有限公司 Maintenance system and device for ERP server
CN113050533A (en) * 2021-03-15 2021-06-29 广西钢铁集团有限公司 Antenna controller and control method thereof
CN114101876A (en) * 2021-11-22 2022-03-01 常州九圣焊割设备股份有限公司 Intelligent plasma cutting method and system integrating arc voltage regulation and control
CN114488976A (en) * 2022-01-13 2022-05-13 吉林省电力科学研究院有限公司 Data receiving system for DCS

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866979A (en) * 2012-09-05 2013-01-09 四川省绵阳西南自动化研究所 Synchronous serial interface signal sensor data acquisition device
CN102866979B (en) * 2012-09-05 2015-07-15 四川省绵阳西南自动化研究所 Synchronous serial interface signal sensor data acquisition device
CN102970177A (en) * 2012-10-19 2013-03-13 深圳市计通智能技术有限公司 Method for analyzing and filtering communication data error codes of computer monitoring system
CN103901823A (en) * 2012-12-25 2014-07-02 联合汽车电子有限公司 Vehicle-mounted remote terminal
CN103595725A (en) * 2013-11-21 2014-02-19 国家电网公司 Screen cabinet resource control system and method
CN103595725B (en) * 2013-11-21 2018-05-18 国家电网公司 A kind of screen cabinet resource control system and method
ITUB20169898A1 (en) * 2016-01-11 2017-07-11 Fotoba Int S R L METHOD AND AUTOMATIC SYSTEM FOR CUTTING SUBSTRATI WITH PRINTED IMAGES
WO2017122067A1 (en) * 2016-01-11 2017-07-20 Fotoba International S.R.L. Automatic method and system for cutting substrates having printed images
CN108413922A (en) * 2018-05-10 2018-08-17 新疆维吾尔自治区地震局 A kind of fast detector for Borehole strain observation instrument
CN108508816A (en) * 2018-06-14 2018-09-07 上海汇焰智能科技有限公司 Distribution hanging weighing system and distributed hangar system
CN109286654A (en) * 2018-08-01 2019-01-29 深圳市德卡科技股份有限公司 Remote equipment debugging system and method based on serial ports
CN109286654B (en) * 2018-08-01 2021-08-06 深圳市德卡科技股份有限公司 Remote equipment debugging system and method based on serial port
CN109510686A (en) * 2018-09-13 2019-03-22 红色江山(湖北)导航技术有限公司 A kind of general binary stream data conversion treatment method
CN109510686B (en) * 2018-09-13 2022-05-31 红色江山(湖北)导航技术有限公司 Universal binary stream data conversion processing method
CN110232038A (en) * 2019-05-20 2019-09-13 湖北三江航天红峰控制有限公司 A kind of industrial personal computer intelligent communication serial port device
CN112235827A (en) * 2020-09-15 2021-01-15 郑州景璇电子科技有限公司 Method for improving successful efficiency of wireless networking data communication
CN112365699A (en) * 2020-09-24 2021-02-12 青岛鼎信通讯股份有限公司 Meter reading method for solving problem of uplink communication timeout of water-gas-heat meter converter
CN112783735A (en) * 2021-02-03 2021-05-11 优顶特技术有限公司 Maintenance system and device for ERP server
CN113050533A (en) * 2021-03-15 2021-06-29 广西钢铁集团有限公司 Antenna controller and control method thereof
CN114101876A (en) * 2021-11-22 2022-03-01 常州九圣焊割设备股份有限公司 Intelligent plasma cutting method and system integrating arc voltage regulation and control
CN114488976A (en) * 2022-01-13 2022-05-13 吉林省电力科学研究院有限公司 Data receiving system for DCS

Also Published As

Publication number Publication date
CN101576742B (en) 2011-06-22

Similar Documents

Publication Publication Date Title
CN101576742B (en) Remote monitoring and fault diagnosing system for numerical control slitter and method for realizing same
CN109597723B (en) Dual-machine hot standby redundancy implementation system and method for subway integrated monitoring system
CN106487589B (en) Terminal automatic access and configuration management method
CN105450489B (en) The preferential efficient field bus systems of HEBus and communication means for realizing most short message of output
CN105306272B (en) Information system fault scenes formation gathering method and system
CN109995675B (en) Self-adaptive industrial Ethernet gateway system and method based on software definition
CN111885150B (en) Ubiquitous power Internet of things multi-protocol adaptation system and method thereof
CN105262619B (en) Scheduled maintenance method and apparatus and system
CN105322660B (en) The long-range control method and device of distribution communication apparatus
CN106549967B (en) A kind of IEC104 specification analysis system and method based on event-driven mechanism
CN102984042A (en) Deterministic scheduling method and system for realizing bus communication
CN110794776B (en) Remote control method and remote control system for intelligent tea bag packaging machine
CN114363096B (en) Data access transmission system crossing safety partitions
CN102361355B (en) Cities and counties' scheduling data centralization collection of power equipment and the method for operation monitoring
CN109633345B (en) Secondary equipment on-line monitoring and analyzing device
CN107070728B (en) State monitoring system and diagnosis method of H1000 packaging machine control network
CN110187906A (en) Embedded device firmware update under multilayer heterogeneous network
CN102098174A (en) Safety communication method and system for power grid monitoring system
CN101587351B (en) Reliable communication method of intelligent electronic device
CN109871325B (en) KNX remote debugging method and system
CN101236429A (en) Universal monitoring system back-end machine control system
CN113381877B (en) Operation and maintenance method and system supporting cross-power security access area
CN104731071B (en) Master redundancy heat backup method in centralized control system
CN102523157B (en) Communication equipment, system and communication means
CN105045759B (en) Control communication method of financial self-service equipment

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