Application of RS422 Communication in DNC Control System

The development of mechanical manufacturing from single machine automation to distributed DNC control systems is the first to solve the problem of information exchange and interconnection of CNC machine tools (PCs). This is the core issue of DNC control. The author developed a PC-based RS422 communication board and defined a set of reliable and effective communication protocols. 1 Network structure of DNC system The topology structure of this DNC control system adopts two levels of master-slave bus type network structure, and the communication network adopts three-layer structure: physical layer, data link layer and application layer. The physical layer uses a balanced standard RS422 interface to improve the reliability of data transmission. In the new balanced standard RS422 (see the attached figure), both the transmitter and the receiver operate in a differential manner. Each signal is transmitted using two wires. The entire interface can operate normally without the need for a common signal line. The level of the signal is represented by the difference between the signals on the two conductors. The voltage range is -6 to +6V. For one of the conductors, the difference is +4 to +6V, which indicates a binary "0". , the difference is -4 ~ -6V represents a binary "1." For the new balanced standard RS422, when the transmission distance reaches 1000m, the signal transmission rate is below 100kb/s, and in the short-distance transmission within 10m, the rate can reach 10Mb/s. Since each signal is transmitted in two lines, this differential balanced structure can separate effective signals from the interference of the ground line. The differential receiver can distinguish the potential difference of more than 0.20V, so it can be free from the ground potential of the ground reference system. Fluctuations and the effects of common mode EMI. Link Layer This DNC system control system uses asynchronous serial communication. System convention: The transmission of data uses positive and negative code check: When the command word and the status word are sent, they must first send two BREAKs, then send the command word or status word, and then send their inverted code: when the file is transferred, 32 words Sections (positive and negative codes) make up a packet.
The application layer is user-oriented, mainly for the command input and transmission results. The input of the command includes the input of the real-time control command of the lower computer and the input of the file transfer command by the host computer. There are two explanations of the transmission result: When the command or file is correctly transmitted, the correct transmission flag is displayed on the screen: When the command or file is transmitted in error, an error transmission flag is displayed on the screen.

1
New Balanced RS422

2 The agreement of this DNC control system communication protocol In order to enable the data communication between the different nodes in the network, the communication parties must have a set of rules and conventions that mutual understanding and common compliance. These formats, conventions and response relations It is called the communication protocol. The DNC control system is a master-slave bus network structure, and the upper computer executes the organization and management of the entire system. Therefore, the communication protocol of the system is unbalanced: the host computer sends a command, receives a response, and is responsible for link-level error recovery: the lower computer sends a response and receives a command. The one-to-many communication of the RS422 bus in the coding system of the communication information and address is to connect the receivers of all the lower computers in parallel on the bus to the sending end of the upper computer, and to parallel the sending end of all the lower computers on the bus. , Connect to the receiving end of the upper computer. Therefore, the selection of the lower computer and the resolution of the lower computer determine the communication path is the first step to complete the communication. The system uses one byte to pass command information plus address information or status information plus address information, which are called command word and status word respectively. The command word is transmitted from the upper computer to the lower computer, and the status word is transmitted from the lower computer to the upper computer. The address information in the byte occupies the lower four bits of the byte and is coded as 1-3. Command information or status information occupies the upper four bits of the byte, and address information, command information, and status information should be independent and unique. For example, the emergency stop command information code 040, if the host computer wants to control the machine tool being processed that has an address code of 1 to stop, the command word for sending should be 041, and the machine tool will execute the corresponding action, and other machine tools will ignore it. For another example, if the host computer receives a status word of 02, since the edit status information is coded as 000, it can be determined that the status word is the edit status information of the machine tool whose address code is 2. Communication Conventions for Command Words, Status Words, and File Transfers In this DNC system communication, the content of the communication is in addition to commands and status, as well as the transmission of files. The characters in the file are random and may be misinterpreted by a machine tool. It is considered that a malfunction occurs in the command word of the machine tool. In addition, the received character may not be a transmitted character due to the presence of electromagnetic interference and network conflict. Therefore, in order to ensure the reliability and correctness of communication, some communication conventions should be adopted in the communication design. The DNC control system adopts the special characters of two-character start-up and forward and reverse code check technology to achieve the above-mentioned purpose. The forward and reverse code verification technology refers to sending the reverse code after sending the correct character of the character, so that the receiver can judge whether the receiving is correct or not according to whether the preceding and following characters are the opposite codes. The positive and negative code check technology checks each bit of each character, which is much more reliable than traditional parity check and accumulate sum check. The special start character BREAK is defined as 0x80 and the lower nibble is zero. Since the address code of the lower computer is 1 to 3, neither the command word nor the status word will appear the same character as the BREAK character. Code verification technology, so no two consecutive BREAK characters appear in the file transfer, ensuring correct start-up and no malfunction. The system stipulates that both the upper computer sends a command or the lower computer sends a state. Both must send two consecutive BREAKs first, then send a command word or a status word, and then send its inverted code, so that successive characters are called a frame. . Under such a communication convention, the lower computer determines that the correct command word has been received only after it receives a command frame that complies with the convention, and then determines whether the command is a command of the host computer to the local machine. If it is, return the correct response, otherwise ignore it. After the upper computer receives the correct response from the lower computer, it knows that the lower computer has correctly received: If the upper computer does not receive the correct response within the specified time (at least for the time it takes for the frame to travel to and from the bus for one week), the upper position will be weighed three times. Error correction. The same is true for the host computer, and it is considered that the correct status word is received only after it receives the status frame that meets the agreement. The author uses the Borland C++ 3.1 for DOS language and Z80 assembly language to write communication function modules and other functional modules of the DNC system. 3 Conclusion The DNC control system has been applied to the three side punching machine system of Zhejiang Huaneng Numerical Control Research Institute, and has been promoted at the Ningbo Metallurgical Machinery Spare Parts Factory. The system work is stable and reliable, and achieves the desired control purpose, which proves that RS422 communication is reliable.

Silicone /Back Scrubber & Massager All In One/Cleaning Feet Without Bending.Dual Sided Back Scrubber

Specifications:

1.Dual Sided Back Scrubber:Bristles and Nodules 
2.Comfort Grip Handles 
3.Over 1500 Massaging Cleaning Bristles 
4.Help Stimulate Circulatio

5.Cleaning Feet Without Bending

Back scrubber&massager all-in-one. Cleans and massages your entire body.Combo large and small bristles side cleans every inch of your body effortlessly. Stimulates circulation to sore,tired muscles. Comfort grip handles lets you reach every inch of your body with ease.Clean feet without bending. Treat yourself to a cleansing and relaxing bathin experience with our dual sided back scrubber.



Dual Sided Back Scrubber

Dual Sided Back Scrubber,Bath Cleaning Tools,Silicone Dual Sided Back Scrubber,Double Chopping Belt Scrubber Washer

NINGBO LUBAN ELECTRIC POWER TOOLS CO.,LTD. , https://www.aye-group.com