RS422 communication controls the application in the system in DNC

  • Time:
  • Click:32
  • source:NODIE CNC Machining
Summary: The PC that introduced to control a system to develop with DNC for 3 hole puncher corresponds with RS422 board, and its communication agreement. This DNC system has applied at Zhejiang China can in 3 hole puncher of numerical control institute, be in factory of spare parts of machinery of Han Dan metallurgy to get popularizing. Mechanical manufacturing industry controls a system to distributed DNC from stand-alone automation development, what should solve above all on the technology is computer of numerical control machine tool (go up a machine) information exchange and interconnection problem, this is problem of core of implementation DNC pilot. The author developed a PC to correspond with RS422 board, and defined by oneself reliable and the communication agreement of effective. This DNC controls the network structure of 1 DNC system systematic develop attacks the structure uses structure of bus line of two class principal and subordinate network, communication network uses three-layer structure: Physical layer, data link layer and applied layer. Physical layer uses interface of balance standard RS422, in order to raise the dependability that data transmits. In RS422 of new balance standard (see attached drawing) , transmitter and receiver all work with needing minute of kind, every signal is transmitted with two lead, whole interface need not common line can work normally. The n of signal is guided by two the poor value of on-line signal will express, voltage limits is - 6 ~ + 6V, to an among them lead, poor value is + 4 ~ + 6V represents a binary system " 0 " , poor value is - 4 ~ - 6V represents a binary system " 1 " . To RS422 of new balance standard, when transmission distance achieves 1000m, signal transmits rate to be under 100kb/s, transmit in the close quarters of 10m less than in, rate can amount to 10Mb/s. Because every signal all is transmitted with crewel, this differentia cent balances a structure to be able to give effective signal from the depart in the interference of ground wire, the receiver that need branch can distinguish 0.

The voltage of 20V above, accordingly, the wave motion of the ground potential that can not get right referenced system and in all the influence that modular electromagnetism disturbs. System of this DNC system control uses link layer asynchronous is serial communication means. Systematic agreement: The transmission of data uses positive and negative to pile up desired result: Command word and condition word are in when sending, must send two BREAK first, send command word or condition word next, reappearance sends his to turn over a code: When the file is transmitted, 32 byte (positive and negative is piled up) comprise an information package. Layer of application of graph new balance RS422 faces an user one layer this, basically be jussive input and the specification of transmission result. Among them jussive input includes to go up to issueing a machine to be controlled in real time jussive is inputted and file transmission jussive inputs a machine. The specification of transmission result has two kinds: When command or file are transmitted correctly, show on screen transmit a mark correctly: When command or file mistake are transmitted, on screen indication mistake transmits a mark. The agreement of regulations of communication of system of 2 DNC control to make differ inside the network between node can undertake data corresponds correctly, communication both sides must have one to cover each other can understand one another and the regulation that abide by jointly and agreement, these formats, agreement and respondent relation are wraparound rise to call communication regulations. This DNC controls a system to be structure of bus line of principal and subordinate network, go up the organization that implementing whole system mixes a machine management. Accordingly communication regulations of the system is lopsided model: Go up hair get killed makes a machine, receive the accident that answer and is in charge of link class to restore: Issue a machine to send answer, receive an order. The communication of a bit pairs of dotty of bus line of the RS422 in the coding system of communication information and address is will all the sink paralell connection that leaves an opportunity is on bus line, receive consummate of a machine send end: And will all those who leave an opportunity send upright paralell connection to be on bus line, receive consummate a sink of machine. Accordingly, the choice issues a machine and resolution to leave an opportunity, affirmatory communication method is the first pace of the communication that finish. This system uses a byte to deliver order information to add address information or state information to add address information, call command word, condition word respectively. From go up a machine be down a machine to be command word deferently, from leave an opportunity up machine is deferent for condition word. Information of the address in byte takes up of byte low 4, encode is 1 ~ 3. Order information or state information take up of byte 4 tall, address information, order information, state information should be to be mixed independently exclusive. For example, stop command imformation encoding urgently 040, if go up a machine want to control address encode to stop urgently for the machining machine tool of 1, send command word to should be 041, this machine tool can carry out corresponding movement, other machine tool does not grant to pay attention to. For example, if go up a machine receive to be the condition word of 02, as a result of the editor condition imformation encoding is 000, reason but the editor state information that corresponding differentiate gives this condition word to be the machine tool of 2 for address encode. The communication agreement that commands word, condition word and file are transmitted is in this DNC system communication, the content of communication besides have command and state, still have the transmission of the file, and the character in the file is random, can be considered as this pair of machine tools probably by accident by some machine tool command a word and produce misoperation: Additional, because electromagnetism disturbs the existence that conflicts with the network, received character also may not be sent character. Accordingly, to assure the dependability of communication and validity, certain communication agreement should be accepted in communication design. The double character that this DNC controlled a system to use special character is started and technology of desired result of code of positive and negative achieves afore-mentioned goals. Technology of desired result of code of positive and negative is to point to piling up in what send character hind, send its to turn over a code then, receive debit so but whether two character are according to around turn over a code to judge receive correct. Technology of desired result of code of positive and negative is right of each character each have desired result, the odd even desired result that compares a tradition and cumulative should get reliably with desired result much. Regulation of BREAK of the special character that start is 080, low quartet is 0, because leave the address of a machine,encode is 1 ~ 3, reason command word and condition word won't appear as identical as BREAK character: The file is transmitted in also use positive and negative to pile up desired result technology, successive two BREAK character also won't appear in be being transmitted because of this file, assured to be started correctly, won't cause misoperation. The agreement in the system is to go up no matter hair get killed makes a machine, still issue a machine to deliver state, must send two successive BREAK first, send command word or condition word next, send its to turn over a code then again, so successive a few character call one frame. In such communication the agreement falls, to leaving an opportunity for, after the command frame that receives accord with agreement to decide in it only, ability judgement received right command word, judge this command to whether be then go up an engine order to this machine. If be, return correct response, do not grant otherwise pay attention to. Go up a machine receiving after closing to be answered correctly to what leave an opportunity, arrive with respect to understanding issue a machine to receive already correctly: If go up a machine inside the time in the regulation (go back and forth between place of bus line a week to use time for frame at least) do not receive answer correctly, go up 3 times heavy hair comes to an opportunity error correction. To going up a machine also be such, after the condition frame that receives accord with agreement to decide in it only, just thought to receive right condition word. The author uses Borland C++ 3.

Language of 1 For DOS and Z80 assembly language wrote the other function module of communication function module and DNC system. System of this DNC control has applied 3 epilogue at Zhejiang China can in the system of 3 hole puncher of numerical control institute, be in factory of spare parts of machinery of Han Dan metallurgy to get popularizing. Systematic work is stable, reliable, achieve expectant control goal, prove RS422 communication is reliable. CNC Milling