


Summary:The batching system is implemented by calling the CAN batching function library.The controller in 87C591 provides the physical layer and data link layer.Effectively assign ID numbers to ensure the priority of various data.
Overview of the CAN dosage bus
CAN dosage is designed to communicate as a microcontroller in a control environment, exchanging information between the ECUs of each electronic control device to form an electronic control network. For example: engine management systems, transmission controllers, instrumentation equipment, electronic backbone systems, are embedded in the CAN system control device is a multi-master mode of serial communication bus, the basic design specifications require a high bit rate, high resistance to electromagnetic interference, and the ability to detect any errors generated. When signaling over distances of up to 10Km, the CAN system can still provide data transfer rates of up to 50Kbit/s.
General description of the dosing system
This dosing system consists of three parts: the touch control panel, the metering module and the CAN dosing bus. Among them, the touch screen mainly accomplishes the setting of process parameters, such as the temperature of the rolls, the system's going cloth rate, etc.; displays the tension of each roll as well as the historical parameters, and shows the system's operation status. Including inverter current, fault code, etc.. Touch screen RS232 port and CAS RS232 to establish point to point communication. By CAS has the original FARAME-DRIVE function. Therefore, it can communicate with almost all RS232 devices.CAS is the control core of the production process. The main function is to complete the scanning of each CAN dosage bus module to obtain the temperature and tension roll position signals on site. And according to the requirements of the process parameters of various PID operation after the output control signal to the CAV bus output function block.
Synchronization control principle
(1) The system transmission line: dosage unwinding and winding with torque motors controlled separately. The speed of the whole dosage follows the movement of the main coagulator. The main solidifying machine is driven by a 5.7KW vector-type frequency converter. The feed signal is taken from the touch screen setting. The other zappers are driven by 31 main frequency converters. The speed of each zapper is synchronized with the main coagulator. In the case of ensuring constant tension can ensure that the system speed synchronization. In order to speed up the adjustment time to join the feed-forward control amount of speed setting, so that the system in the starting and speed up and down process of tension fluctuations to reduce the tension in the tension control process once the tension overload, CAS output control valve lifted the pressure roller. Tension returns to normal and then automatically presses the pressure roller, its control strategy using two-position control.
(2) temperature control: temperature using C language using PID function, can control the infinite road temperature regulation. In this dosage system, generally control 8 to 10 road temperature control. Due to the use of C language, you can dynamically define the current several ways of temperature control, ordinary temperature control table or PID regulator is difficult to carry out accurate temperature control; and B&R intelligent temperature PID software can automatically calculate the PID parameters required for different temperature control, so that the temperature control is accurate to ± 1 ℃.
The characteristics of the device's CAN dosage bus and the communication of the lower CAN system module
(1) Use of CAN dosage bus of CAS
The CAN dosage frame of the dosage device can be read and written with up to 8 bytes of information. This from is realized by calling the CAN dosage function library. These include CONOPEN, CAN dosage WRITE, CAN system READ, as well as SANTAB and CAN dosage RWTAB. the CAN dosage system OPEN function consists of completing the initialization of the CAN dosage, it should be noted that the initialization of the CAN dosage system bus has to be included in the initialization routine INTISP. CAN dosage OPEN(1. BAND-RATE, COB-ANT, ADR(ERRO-ADR), 0., 0US-IDENT, STAFUS) where BAND-RATE=25, that is, on behalf of the baud power of 250K. US-IDENT is the call to the CAN feed initialization to get to the CAS CAN dosage ID, in the CAN system bus read and write process will use this parameter. This parameter will be used in the read/write process of the CAN system bus. CAN dosage bus write information by using the CAN dosage system 2WRITE function in the higher priority process, and its function parameters are defined as follows
(2) CASCAN dosage bus read data
Set a higher priority task in the device to handle the data from the round-trip acquisition module. In order to reduce the system cost and improve the sampling rate. The dosage system according to the distribution of rolls using 8 blocks of tension, 2 thermocouple acquisition module. Each module can collect 6-channel signals. The actual use of 4-way input, the other 2-way as a backup. The sampling accuracy is 10 bits. This requires 20 CAN ingredient-id. its sampling week T = 20 × task (time slice = 1ms). Its initialization, and function parameter table with CAN dosage write its read process should be limited to space is also omitted.
(3) the composition of the field acquisition module
As mentioned above, wet leather automatic dosage site environment is harsh, the design of highly reliable CAN dosage bus module is the normal operation of the automatic feeding system necessary to protect. Circuit used in the 89C51 chip. The chip integrated mcs-51 core. With circuit 10-bit A/D. Built-in CAN dosage bus controller compatible with CAN dosage 2.0B. Replaces the decentralized components of the system and improves the reliability of the dosage system. Considering the interference of the site and the safety of CAS equipment, the CAN dosage bus and CAN dosage control outputs between the use of optoelectronic isolation. For the CAN dosage bus driver P82C250. P82C250 is specially used for CAN dosage bus transceiver driver 8-pin chip, TxD and RxD pins respectively send after driving the transmit and receive signals; twisted-pair medium respectively accept CAN dosage H, CAN dosage L pins. Care should be taken to add 120 terminal matching resistors at the end of the network. Prevent the influence of reflected signals on the communication process. The field controller field module mainly completes the acquisition of 0 ~ 5V tension signal, the acquisition of thermocouple mV signal, the acquisition of field temperature. mV letter and 0 ~ 5V signal switching. 0 ~ 5V voltage signal output by D / A conversion to control the frequency converter. 87C591 contains a SJ1000 CAN dosage controller, so that the module to reduce the number of peripheral devices, but also to avoid the SJ1000 and MCS clock synchronization problems. MCS clock synchronization problems. CAN dosage system driver using the P82C520 dedicated chip, and to achieve optoelectronic isolation of the controller and the network. 87C591 is a monolithic 8-bit microcontroller with an on-chip CAN dosage controller SJ1000A. fully static core provides an extended power-saving, oscillator can be stopped and restore data in the RM external clock rate of the actual 500ns instruction cycle, on-chip ordering 6-way 10-bit AD and other properties.
CAN dosage communication software design
(1) CAN dosage communication protocol determination
By the controller in 87C591 provides the physical layer, data link layer. The design of the communication protocol is mainly based on the application layer to carry out, through the effective allocation of CAN dosage protocol ID resources so as to complete the correct and reliable transmission of each control residence and data.
(2) Determination of sampling program
Weighing and dosage system through the effective allocation of ID number to ensure that a variety of data priority, due to the temperature process time constant is large can be used lower priority, tension sampling needs real-time sampling, so the use of higher priority, and in the master CAN dosage data polling to arrange for a different sampling period, the sampling period can be set in the CAS by setting up a different time slice of the TASK to control. The temperature sampling control process uses the TASK of IS, while the tension sampling uses the TASK of HS level of MS.
(3) Field collection module CAN dosage bus pass program flow
The field metering module collects and receives information by interrupting, and sends the collection information by querying according to the data request signal. In the CAN dosage communication process interrupt should also determine the type of interrupt, and accordingly make some troubleshooting, here omitted, need to explain the field acquisition module to make full use of CAN dosage controller four receiving screen acceptance filter flexible configuration, to simplify the classification of information according to the ID.
Conclusion
This feeding system synthesizes the advantages of programming, high reliability and CAN dosage bus distribution system in terms of price and reliability. The application of equipment to enhance the flexibility and reliability of automatic leather dosage. Reduced costs, this system applies the 2003CAS series host, on the power system, to other needs of high-speed data collection distribution system has a certain borrowed sign.