Application of the hottest ARM embedded controller

  • Detail

Application of ARM embedded controller in the monitoring of printing and dyeing equipment

Abstract: a distributed monitoring system based on 485 bus is designed for the stenter heat setting machine. ARM embedded controller is used to realize the synchronous operation of master and slave motors and the control of drying room temperature; Use VB6.0 to design the monitoring picture of speed and temperature on PC; Realize the data communication between arm, frequency converter and PC. The results show that the system is simple to implement, reliable in communication, strong in portability, and has a strong generalization in the monitoring of printing and dyeing equipment

Keywords: embedded; RS-485; Printing and dyeing equipment; uClinux; Monitoring


fanyu Zhang, Liwen Meng

(zhongyuaninstituteoftechnology, dep.automation, zhengzhou450007, China)

abstract:fortentringandthermo fixingmachine, Adistributedmonitoringsystembasedonthe485busisdesigned.weachievethecontrol of the master andslaveracmotorsynchronization andtemperatureofthedryingover fixed deformation force bythearmembeddedcontroller.wealsodesignthemonitoringpictureofofthespeedandtemperatureonthehostpcwithvb6.0andachievethedatacommunicationofarmcontrollerandinverterwithpc.theresultshowthatthesystemisimpleandcommunicationreliable, anditcaneasilytransplantandstronglyexpandtomonitoringsystemsofprintingequipment.

Keywords:embedded; RS-485; printingequipment; uClinux; Monitoring

1 Introduction

with the advancement of industrial automation process and the improvement of enterprise informatization, the use of remote intelligent modules and RS-485 network to build a distributed monitoring system with decentralized monitoring work and centralized monitoring results has been widely used in industrial control due to the advantages of low investment cost, simple structure, easy implementation, long communication distance, anti noise and so on. The development of microelectronics and automatic control technology. As well as the rapid penetration of computer technology into the non computer field, especially the wide application of 32-bit microprocessor arm at home and abroad, digitalization, networking and intelligent control have become the main development direction of the new generation of printing and dyeing control equipment

we monitor the synchronous operation of the master and slave motors of the tenter heat setting machine and the temperature control system of the drying room, and realize the station communication between the microcomputer (PC) and the micromaster440 frequency converter. With the Chinese pull-down menu and screen display, as well as the necessary operation prompts, we can complete the setting of frequency converter parameters, the monitoring of operation parameters, and the collection of operation data and fault data. In addition to controlling the synchronization of the master and slave motors of the stenter and the temperature of the drying room, the embedded controller arm also transmits the speed of the master and slave motors and the temperature data of the drying room to the upper computer through RS-485 network for real-time display

2 overall design of the system

Figure 1 is the overall block diagram of the system

arm controller collects the rotational speed of the master and slave motors M1 and M2 of the stenting heat setting machine at the same time through two photoelectric pulse generators PG1 and PG2, calculates the rotational speed deviation of the two motors, and then outputs the control quantity through intelligent algorithm to adjust the rotational speed of the slave machine to follow the driving machine. Because it is driven by frequency converter, the control quantity should be converted into the variation of frequency. According to the determined data structure, the arm controller sends the control quantity to the PC, which communicates with the frequency converter through the 485 interface to adjust the output frequency of the frequency converter 2, so as to control the speed of the driven machine m2 and make it run synchronously with the main motor

arm controller also collects the temperature of the drying room through the temperature detection and control circuit, and controls the temperature of the drying room through a suitable algorithm. This paper focuses on the design of RS-485 interface between PC and frequency converter and embedded controller. The whole system adopts RS-485 bus standard for data transmission. PC adopts Advantech's MOX acp-132ul card, which is a RS-422/485 two serial port card specially designed for industrial communication environment. It supports two independent RS-422 or RS-485 serial ports. In one to many application environment, each serial port can control up to 32 devices. Each card adopts the function of automatic data flow control ADDC (automaticdatadirectioncon tro1), which can easily manage the transmission and reception of RS-485 half duplex communication serial port data without additional programming. The frequency converter adopts Siemens' MM440, which has a unified and open USS communication protocol, which can easily communicate with PC and change the operating parameters of the frequency converter during operation

before the system runs, first set the internal parameters of the frequency converter, the rated value of the motor speed and temperature on the PC; At the same time, start the controller arm for data acquisition and operation control. Through 485 bus, PC can monitor the synchronization of master and slave motors of the main drive system and the control of drying room temperature in real time. Figure 1 is only for the synchronous system of the stenter heat setting machine, so only one arm controller is used. If it is necessary to expand to the synchronous control of multiple units and increase the monitored units and control quantities, 485 interface can be used to connect multiple arm controllers conveniently

3 the communication between PC and inverter adopts USS protocol. This protocol is defined by Siemens AG. It mainly uses RS-485 bus to connect several Siemens inverter, DC governor or PLC and other terminal equipment with industrial control computer to realize remote monitoring. The USS protocol is open, so it provides the feasibility for users to develop their own software products based on the protocol. This will not only help reduce the development cost, but also fully meet the needs of specific projects and facilitate the daily maintenance of industrial control network

uss protocol supports multipoint connection and master-slave access mode. It is used in single master station system and can link up to 32 stations. USS protocol supports variable and fixed message length. The message format is simple. The communication character format is: 1 start bit, 1 stop bit, 1 check bit, 8 data bits. The baud rate can reach 18715kbps at most

Figure 2 shows the communication message structure of frequency converter MM440. The specific character meaning of the message is not explained too much. See literature [1] for details. It is emphasized that MM440 supports BICO (binary interconnection connection) technology, so users can control its parameters more conveniently

before 485 communication between frequency converter and PC, parameter setting of MM440 is very important. First, reset all parameters to factory settings:

p0010 (debug parameter filter): 30

represents the factory set value

p970 (factory reset) =1

means that all parameters are reset to their default steel-making pig iron market, which continues to be weak and stable

setting parameters: p0700 (select command source) =5,

indicates the USS setting of c0m link

pio00 (selection of frequency setting value) =5,

means that the frequency converter can be controlled through USS

p2010 (USS baud rate) =6,

means that the communication baud rate is 9600

p2011 (USS address number) is equal to 1,

indicates that the address of frequency converter 1 is 1

p2009 (USS normalization) is equal to 1,

means that the value is sent in the form of absolute decimal number [that is, 4000 (decimal) (=0fa0hex) is equal to 40.00hz]

p2012 (PZD (process data) length of USS Protocol): 2,

indicates that PZD transmits control words and set values, a total of 2

p1013 (PKW length of USS Protocol) =4,

means reading and writing the value of each parameter with 4 bytes

p2014 (USS stop transmission time (MS)) =x,

means that the user is allowed to set a time X. after this time, if the USS channel cannot receive the message, the fault signal f07o will be generated

the communication between upper computer and frequency converter adopts VB6.0 programming [2], and the programming adopts event driven communication mode. Every 16 characters received by the serial port activates an oncomm() event, and the corresponding processing code is added to the on comm() message processing function to modify the parameters of the frequency converter [3]

4 upper computer and arm

embedded controller adopt Samsung's 32-bit microprocessor S3C44B0. The core of the chip is a 16/32-bit ARM7TDMI reduced instruction structure processor. It is a low-power, general-purpose microprocessor core, which is especially suitable for the design of price sensitive products [4]. S3C44B0 chip not only attracted a batch of polylactic acid product manufacturers such as Bing Kecheng and Leiguan to settle in the core, but also integrated many peripheral devices in the chip, such as 8-channel 10 bit ADC, an I2C bus controller, LCD controller, and 2-channel UART. The most important thing is that it can migrate the operating system uClinux for management. UClinux is an excellent embedded operating system, which is very suitable for processors without MMU (memorymanagementunit). Processors without MMU are widely used in embedded field. The binary code and source code for the uClinux kernel have been rewritten to compress and trim the basic code. This makes uClinux very small compared with the standard linux2.0 kernel, but it still retains the main advantages of the Linux operating system

in this system, we use the S3C44BOX controller with uClinux operating system and its own 10 bit ADC to conveniently collect high-precision data on the drying room temperature of the stenter heat setting machine; Through I2C bus and peripheral counting chip, the speed of two motors is collected. A UART is used as 485 bus interface to communicate with PC; An LCD controller is directly connected to a 3.5-inch STN LCD for easy observation. Because uClinux itself has done a good job of network transplantation, this system uses the network chip RTL8019AS to connect the embedded system to the Ethernet. Users can access the operation data of the control system through the browser to realize the remote monitoring of the system [5]

in the stretching heat setting machine, as the main drive, it drives the linear speed synchronization of the master and slave motors of the clip, which is the key to ensure the processing quality. The control algorithm is usually completed in the PC. because the 32-bit microprocessor is used in this system, it can be completed in the arm controller as the lower computer. PC is only used for monitoring and frequency converter communication, which greatly reduces the burden. Moreover, S3C44B0 has good portability and can be conveniently hung on 485 bus as a module. Between the embedded controller S3C44B0 and PC, we define the following transceiver protocol, as shown in Figure 3. The command includes reset command and send command. If the receiver does not receive the send command frame within the agreed time, the reset frame will be sent. Both parties return to the beginning of the communication program, empty the buffer, and then resynchronize. The specific process is shown in Figure 4

the following is the main program flow of the arm controller sending data:

while (1) {//main cycle

if (recv_cmd (type) ==0)//crc check frame error



case_ Addr://is the local address

send_ ack(_OK,0,dbuf);//Send the response message


case_ GETDATA_://Is to send command frame

len=strlen (DBUF)

send_ data(_DATA,len,dbuf);//Send collected data information

case_ Reset://is the reset frame



break;//The type of stealing order is wrong. After discarding the current frame, it returns the experimental results of




pc adopts VB6.0 as the upper computer monitoring screen, and uses its ActiveX control MSComm to conveniently realize the communication with multiple frequency converters and embedded controllers. In order to make the software more friendly, the multi document (MDI) windows interface is adopted, and the pull-down menu is supported

Copyright © 2011 JIN SHI