CNC system based on CAN bus Remote Input Output Module Design and Implementation

This paper describes the numerical control system based on CAN bus Remote Input Output Module Design and Implementation

1 Introduction

CAN or Controller Area Network, and his communications with outstanding reliability, real-time and flexibility. His application is no longer limited to the automotive industry, which CAN achieve in the CNC system features include: program management; machine diagnosis input and output parameters, parameters of communication; machine status collection; machine mode of acquisition; database management.

Currently, the major share of domestic CNC system is economical CNC system. Economical CNC and Machine Tool Interface De Shu Liang Shu Chu basic input is limited, Jingchangbuneng Manzushiji operation of the demand, while in the actual workshop, Jichuang and numerical control system may Juli far, input and output Xinhao in remote Zhuanshuguocheng in Fei Chang susceptible to interference errors, while the CAN bus Zai for transmit long-distance signal transmission Shi Jian short time, by Ganraogaishuai Di, also 具有 higher transfer speeds, based on Zhexieyuanyin this paper, the numerical control system based on CAN bus input and output modules Yuan Cheng the design.

2 Module Design

The composition of the module design is as follows: CANIN, CANOUT is the CAN bus input and output interfaces. DI, DO is the interface module with the machine, DI: Tool information input interface; DO: The information output from the CNC to machine interface. And D1, DO interface, the information received is binary information.

CNC system based on CAN bus Remote Input Output Module Design and Implementation

3 module hardware design

The input and output modules use a microprocessor macro crystal company SCM STC89C516RD. In the CAN bus communication interface, CAN communications controller used SJA1000, CAN bus driver using PCA82C250. Figure 2 CAN remote from the input and output module hardware schematic diagram can be seen, the circuit mainly from 6 components: micro-controller STC89C516RD, independent CAN controllers, electrical isolation device 6N137, CAN bus driver PCA82C250, output module and input module. Microprocessor STC89C516RD responsible for the output module to output outgoing data, the input module to scan the input point input, and initialization SJA1000, SJA1000 achieved by controlling the data communications tasks such as receiving and sending.


SJA1000, AD0 ~ AD7 connected to STC89C516RD the P0 port, chip select signal CS * controlled by the P2.7, which is 0, CPU chip memory address optional in the SJA1000, SJA1000 can then perform the appropriate read / write operations. SJA1000, RD * WR * ALE pins are connected to corresponding with STC89C516RD, INT * then STC89C516RD the INT0 *, so that SCM can interrupt real-time access to the SJA1000. P1 port 3-port add another wave of code switching, to determine their own module identification number that the module ID, the values of DIP switches for the 000 to 111, so the value of the ID number from 0 to 7.

CNC system based on CAN bus Remote Input Output Module Design and Implementation

CAN bus nodes in order to enhance anti-interference ability, SJA1000 of TX0 and RX0 not directly connected PCA82C250 the TXD and RXD, but in the middle of a high-speed optocoupler 6N137, so very well for the CAN bus electrical isolation between nodes, but only part of the circuit used optocoupler two power VCC and VDD must be completely isolated, otherwise just use the speed of its response with a low pass filter. Completely isolated power supply can use a low-power DC-DC, or with more than 5 V isolated output switching power supply module. Although this increases the complexity of the interface circuit and costs, but improve the stability and security of the node.

Each output point output module latch 74ALS273 and STC89C516RD through the P0 port phase, the address translated by the P2 and the write signal WR * to latch control. The input module in the input buffer 74ABT245 by bus connected with the P0 port, 74ABT245 P2 translated from the address and the read signal RD * to strobe control. This can easily STC89C516RD external I / O to access the hardware and software without other additional costs, greatly improve the efficiency of the implementation of STC89C516RD.

4 Module Software Design

CAN bus system, remote input and output CNC software design includes 6 most: STC89C516RD initialization, CAN controller initialization, message sent, message received, the output of the output point of access and input scanning input. The design of the application of pelic CAN standard frame format mode.

Program flow shown in Figure 3. SJA1000 initialization only be carried out in the reset mode, initialization mainly by regulating the DIP switch settings of the module identifier, work settings, receive filter mode set to receive mask register (AMR) and register to receive code (ACR) settings, baud rate and interrupt allows register (IER) of the settings.

Information reached the CNC machine tool: When scanning the input signals to the machine-level changes, the module to its own ID information and the input signal into a standard frame with the package sent to the CNC system.

CNC machine tool orders reached: real-time monitoring module bus, when the bus information from the CNC system, start the CAN receive, according to AMR and ACR to determine whether the frame to receive the instruction, if not should receive, the information is discarded, if should receive, the command output to the machine.

CNC system based on CAN bus Remote Input Output Module Design and Implementation

5 Module Applications

In practice, multi-block input-output module connected to a network composed of CAN, multi-block input-output module of the host computer are CNC system, the module's input and output interfaces and tools Xianglian are shown in Figure 4.

CNC system based on CAN bus Remote Input Output Module Design and Implementation

Note that in the network, the two ends of the bus should have a termination of all access, the role of termination is to absorb excess electrical pulse signal line energy, prevent the formation of the signal reflected confusion, but confusion will result in signal communication error.

As a result of the values of the module ID number from 0 to 7, so the design of NC system scalability eight external input and output modules, including modules settings can not be the same ID number, and the smaller station number, the higher the priority. Each module in the design of the input point 64, the output point 64, the total can be extended to 512 (64 * 8), input output points.

6 Concluding Remarks

CNC system based on CAN bus is not only the remote input and output module extends the economic numerical input and output nodes, but also improve the remote input and output signal transmission accuracy. The system passed the experimental test site, the bus one by one module; take two modules; series with eight modules, each module were the work of testing, machine tools and CNC systems can correct the information transmission, communication rate the system can meet the requirements of real-time performance, reliable operation. Ji Tong has a simple structure, integration, intelligence Gao, structure and function expansion is good, safe and reliable, great De Zengjia the CNC system and Jichuang communication of input and output nodes. With the future development of factory automation, CAN bus will have broad application prospects.

Declined comment

<蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <文本链> <文本链> <文本链> <文本链> <文本链> <文本链>