Journal of Electrical and Computer Engineering

Journal of Electrical and Computer Engineering / 2014 / Article

Research Article | Open Access

Volume 2014 |Article ID 651216 |

Li-guo Zhang, Man-feng Dou, "Multiprotocol Communication Interface PMSM Control on Account of Industrial Configuration Software", Journal of Electrical and Computer Engineering, vol. 2014, Article ID 651216, 6 pages, 2014.

Multiprotocol Communication Interface PMSM Control on Account of Industrial Configuration Software

Academic Editor: Weifeng Sun
Received21 Nov 2013
Accepted24 Dec 2013
Published10 Mar 2014


The purpose is to achieve drive controller of PMSM connect with industrial control configuration software seamless and to meet the industrial configuration software in the demand for motor to realize intelligent control. A software interface was designed and implemented about motor drive controller and the PC the industrial control configuration base on Modbus_RTU serial communication protocol of industrial control. One kind of design and implementation methods have been proposed in the communication interfaces for industrial applications scalable multiselectivity. Using the latest high-performance multiprotocol transceiver device pin programmable SP339 as the lower machine communications chip designed optional multi-interface hardware circuit with DSP TMS320F2812 as the processor. The interface program was studied with regard to C language software of lower machine and control configuration software of PC. Database creation, data acquisition, and animation links of PC configuration software are realized. Online debugging results meet the design requirements on account of PC control configuration software and the lower machine controller hardware and software.

1. Introduction

DSP with its powerful data processing capability becomes the first choice of motor control chip. If you want to reflect operating parameters and operating state of the motor intuitively, they must be achieved through feature-rich PC software. Currently, Labview virtual instrument is used as a PC software application research more widely. Its use RS232, RS485 serial communication user defined or Labview programming standard communication protocol from [1, 2] that is unable to adapt to industrial fields. In order to meet the needs of industrial serial communication field, the field of industrial design configuration software such as power control software, such as the hardware interface of group king software to meet to achieve control configuration software which controls the drive motor intelligent control.

Literature [3] describes the Modbus communication protocol which utilizes RS232 communication and development of software dedicated only for communication design and does not have popularity. Literature [4] introduces an InTouch configuration software of RS232 communication, the use of the third-party software, and programming complexity. Multiprotocol communication interface chip [5] is used to meet the requirements of a variety of hardware design. This paper will introduce programmable multiple communication interfaces to meet the majority of industrial configuration software communication protocol ports which have Modbus the hardware and software design interface technology. A design project for the needs of a variety of interfaces is solved, given multi-interface implementations.

2. Scalability Strategy and Implementation of Communication

2.1. Scalability Strategy of Communication

The main difference among RS-232, RS-485, and RS-422 communication interfaces of the three is(1)from the wires, RS232 is a three-wire, RS485 is a two-wire, and RS42 is a 4-wire;(2)from the transmission distance, RS232 can only transmit 15 meters; RS485 and RS422 can transmit 1200 meters in 19 kpbs;(3)on the rate, RS232 is full-duplex transmission, RS485 is half-duplex transmission, RS422 is full duplex transmission;(4)from the protocol layer, RS232 supports only point-to-point communication (1 : 1); RS485 and RS422 communications support bus in the form (1 : N).

The above distinction formulated the following scenarios.(1)RS232 interface is for close experimental communication; RS485/RS422 is suitable for practical engineering application of communication. Select the communication interface according to need.(2)As optional communication interface design, design of the hardware is provided. Single-chip multi-hardware [69] choices cannot only meet the design requirements but also reduce the burden of hardware design.(3)Hardware interfaces in the form of work are selected by software programming. Software design through the interface determines a corresponding program execution.

2.2. Hardware Implementation

Communications chip of motor control board using Exar Corporation latest single-chip SP339 with RS-232/RS-485/RS-422 multiprotocol serial transceiver. When the RS-232 and RS-485/422 protocols are shared between a connector, in order to be able to communicate properly, RS-232, RS-485 termination, and biasing resistors must be disconnected. SP339 integrated termination resistors and control switches, allow the system to enable or disable the termination resistor processor through a single pin. Simplifying the circuit design reduces costs. SP339 also bus pins with ±20 V fault tolerance capabilities that allow withstanding direct short circuit or signal voltage within this range is not compromised. The high speed drivers operate up to 20 Mbps in RS-485/422 modes, and up to 1 Mbps in RS-232 mode. All drivers can be limited to 250 kbps in any mode to minimize electromagnetic interference (EMI). On-board charge pumps only four external capacitors from a single 3.3 V or 5 V power supply needed to produce RS-232 bipolar voltage level and does not require any inductors or magnetic components.

The communication system has RS-232 interface and RS-485/422 interfaces. In the past, hardware design using multi-chip ASIC and the control circuit to complete, resulting in complex structure and poor stability. Using the SP339 and supplemented by small amounts of other circuit chip and simply through software programming to control the corresponding pin can be easily implemented through RS-232 and RS-485/422 interface combinations. The communication interface based DSPTMS320F2812 processor program is shown in Figure 1; SP339 has multiple ports to connect with the DSP that can realize data transmission and control. Use of this circuit may control SP339’s SLEW, DIR1, MODE0, MODE1, TERM, and ENABLE programmable pin by software that enables RS-232 or RS-485/422 asynchronous communications.

2.3. Modbus_RTU Serial Communication Protocol Design about Motor Drive Control [10]

Serial communication only defines the communication hardware specification; no specific software communication protocol is defined as so-called free agreement. Therefore, serial communication is often combined with software communication protocol. Modbus protocol supports traditional, RS-232, RS-485/422, and Ethernet devices; this agreement is an existing industrial control configuration software used by communications protocols.

This design uses RTU (Remote Terminal Unit) protocol of the Modbus communication protocol. RTU communication method uses 8-bit binary data transfer and CRC Cyclic redundancy check as data validation, so communication is faster. The data structures and data transmission of the interface technology communication protocol use the following specifications.(1)Data transfer format: asynchronous transmission, a start bit, 8 data bits, 2 stop bits, no parity, total 11; default baud rate of data transfer rate 9600 bps. Slave supports host machine modified transmission rate.(2)Packet format of data transceiver functions is shown in Table 1.

Sending contentByte countTransmitted information

Start frame4Pause time
Address code1XX
Function code1XX
Date area DATA1…DATA
End frame4Pause time

This design uses a set of register data read function code 03H and write function code 10H. Master and slave communication process to obtain data from master to slave, including analog data, digital data, and system parameters, are collected from the instrument of slave. Address written communication baud rate, switching output, analog output, and system parameters of slave are saved with the same function code. Each register corresponds to specific ports and each controlling the specified device, which can improve the reliability of control.

2.4. Software in C Language

DSP software use C language programming. Data transfer uses RS232 or RS485 line real-time communication. As the DSP internal programming approach is online waiting interrupts. The program of protocol and interface is completed in the main program. Next comes the holding register read and write subroutines and interrupt communication program flowchart.

The Figure 2 shows that lower computer literacy holds register for the PC to complete the execution of a request and response, respectively, through 03H and 10H function subroutines. They have a common implementation structure. Implementation structure helps simplify common programming structure, improve program scalability, and facilitate program implementation and modification.

RS232 supports only point-to-point communication; RS485 supports bus communication form. Therefore, two interfaces for data transmission control subroutine differ in the data reception and data transmission.

In addition, as shown in Figure 3 in order to improve the readability and reliability of operation, the functions of interrupt program use subroutine. Subroutine function code includes judgments, data transceiver, 10 mS timer soft reset interrupt (timeout), parity, data illegal judgment, register read and write, and function code that does not recognize the answer.

3. Industrial Control Configuration Software (ICCS) [11, 12] Interface

ICCS is special software to handle data acquisition and process control. Its outstanding feature is real-time multitasking; you can achieve data acquisition and output, data processing and algorithms, graphical display and interactive, real-time data storage, retrieve management, and real-time communications such as multitasking.

The ICCS selection Beijing Sunway force control configuration software is the test software. Software enables remote control operation, remote monitoring of the motor operating status and performance, timely data collection and analysis of data, generating dynamic data visualization, and generating a valid database.

3.1. The Establishment of a Database [13]

Define a series of data is used to reflect the software to monitor various parameters of the controlled motor; for example, real-time temperature control panel, bus current, motor temperature, motor speed, and other data collected by the control panel but also includes some necessary intermediate variables and indirect variables. Database is shown in Figure 4.

3.2. Movie Connection

Through the establishment of data in the database connection relationship with the graphics object, to make the picture vivid visual parameters reflect changes. You can set the over current alarm limit, if more than 30 A are shown in Algorithm 1 such as real-time monitoring bus current control panel.

FLAG_I = 1;/*Set intermediate variables, alarm flags*/
FLAG_I = 0;/*When the current is less than 30 A, the alarm flag is reset*/
 MSGBOX (“bus current over current alarm”);
/*Computer display a dialog box, “bus current over current alarm”*/
 BEEF (1);/*overvoltage, the computer sends the alarm sounds* Type I/
 FLAG_I = 0;/*alarm flag bit is reset*/

3.3. I/O Connections

Force control configuration software for the use of different communication protocols for I/O devices can provide targeted I/O drivers. Real-time database performs data acquisition and command control from I/O devices with the help of the I/O driver. As described in this paper belong to Modbus RTU communication protocol for industrial control configuration software common control communication protocol can be set via the configuration software is very easy to achieve I/O connections.

To achieve I/O connections of three hardware aspect is essential, PC serial port, serial cable (if the next bit machine as RS485 interface, where the need RS232 to RS485 interface), and lower machine interface. Three hardware conditions are met to ensure the premise in a certain lower machine address. Software setup is complete I/O connections through the configuration.

4. ICCS Combines Hardware Platform Debugging Results

4.1. ICCS and Motor Drive Control Seamless Connection

ICCS and motor drive control are met seamlessly through the following conditions.(1)Motor drive control communications hardware interface circuit; RS232 and RS485 communication can be realized.(2)With Provide the appropriate interface and software programming based Modbus_RTU communication protocol.(3)It requires a conversion device that can achive RS232/RS485 and PC connection [14].(4)ICCS PC programming in addition to the settings of low machine.

ICCS combines hardware platform debugging using the following measures. The lower machine controller communications hardware circuit connects with the PC communication interface hardware through the hardware adapter interfaces which carry lower computer software and PC software joint commissioning. Lower machine measure and record data in real time. Host request to send real-time data acquisition and through the control configuration software to analyze data in real time and thus depict the curve. Shown in Figure 5 is the PC Control Software collected data and real-time display.

4.2. ICCS for Intelligent Motor Control Experiment

ICCS for intelligent motor control is mainly reflected in; you can start and stop the motor, remote control, motor control parameter adjustment, electrical fault alarm, and motor run history parameter query.

Test conditions; the use of power control ICCS design PC control interface. Choose to use the PC and the control panel 485. Motor controller using DSP (MS320F2812) to control the core, IGBT three-phase full-bridge inverter drive motor. Motor with 18 kW PMSM.

Commissioning projects and results are as follows.(1)Motor start or stop and ICCS to send control commands to control the motor via the motor controller can start and stop normally.(2)ICCS to set the motor speed and to communicate motor controller. The controller controls the motor according to the set speed operation and motor speed to meet the preset value measured.(3)ICCS set the motor fault alarm limit and the data transmitted to the motor controller. The ICCS generates an alarm when the motor fault. The test set motor overheating alarm limit. When generating hardware alarm information at the same time the alarm data transmit to the ICCS.(4)ICCS establish a database. You can transfer the data of lower machine to the PC real-time storage and it can be viewed at any time through ICCS.

ICCS project tasks according to changing PC programming and interface settings, to complete real-time control of the motor and real-time data acquisition and to achieve real-time monitoring of the motor.

5. Conclusion

This paper designs the communication circuit of the motor controller and software programming, realized the interface technology and PC control software. Designing and debuging the results obtained the following conclusions.(1)DSP TMS320F2812 processor realizes the Modbus_RTU communication protocol by software. Software is able to adapt to the field of industrial configuration software which uses this protocol for communication.(2)Hardware communication scalability provided strong foundation for remote communication which includes network communication.(3)The perfect PC force control software and slave software are designed for the use of other configuration software to provide a reference.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.


  1. X.-F. Wan, J.-Y. Zhu, and J.-F. Ling, “Vehicle motor controller debugging system based on LabVIEW,” Small & Special Electrical Machines, vol. 40, no. 5, pp. 68–70, 2012. View at: Google Scholar
  2. L. Tianhai and W. Jian, “Design of real-time monitoring-survey system for motor power consumption based on LabVIEW,” Computer Measurement & Control, vol. 40, no. 5, pp. 580–582, 609, 2012. View at: Google Scholar
  3. Y. Cheng, X.-P. Liu, and T. Zhan, “Design of an industrial control system based on MODBUS protocol,” Machinery Design & Manufacture, no. 1, pp. 1–3, 2011. View at: Google Scholar
  4. X.-X. Liang and P.-N. Zhang, “Communication realization based on intouch and serial devices,” Instrument Technique and Sensor, no. 3, pp. 62–63, 66, 2012. View at: Google Scholar
  5. Z. Chen-he, W. Ping, and Z. Lin-hua, “Principle and application of multiprotocol transceiver MAX3160,” International Electronic Elements, no. 12, pp. 62–64, 2002. View at: Google Scholar
  6. Z. Liu, N. Li, and X. Peng, “A design of multiprotocol asynchronous serial communication based on M module,” in Proceedings of the 1st International Conference on Instrumentation and Measurement, Computer, Communication and Control (IMCCC '11), pp. 377–380, 2011. View at: Publisher Site | Google Scholar
  7. W. Li and G. Lou, “Design of programmable multi-protocol serial communication ports,” Chinese Journal of Electron Devices, vol. 30, no. 2, pp. 710–713, 2007. View at: Google Scholar
  8. R. Xuzhou, “Design of multi-protocol serial communication based on Z85C30,” Microcontrollers & Embedded Systems, no. 10, pp. 34–36, 66, 2003. View at: Google Scholar
  9. L. Zhong-hua, W. Zi-wei, Q. Chun-qing, and S. Ji, “Research of serial communication between PC and MCS-51 serial single chip,” Journal of Shenyang University of Technology, vol. 27, no. 3, pp. 302–307, 2005. View at: Google Scholar
  10. Z. Yong and H. Li-gan, “Development and design of real-time database system of industrial control configuration software,” Process Automation Instrumentation, vol. 32, no. 12, pp. 28–31, 35, 2011. View at: Google Scholar
  11. X. Chen, W. Chengshan, and K. W. E. Cheng, “PLC and configuration software based supervisory and control system for oil tanks area,” in Proceedings of the 3rd International Conference on Power Electronics Systems and Applications (PESA '09), pp. 1–4, 2009. View at: Google Scholar
  12. D. Li, W. Chengshan, and K. W. E. Cheng, “Application of ForceControl in the vehicle gasohol delivery system,” in Proceedings of the 3rd International Conference on Power Electronics Systems and Applications (PESA '09), pp. 1–4, 2009. View at: Google Scholar
  13. X. Wang, M. Zhang, and Y. Du, “Application of modbus RTU protocol in the communication between IPC and intelligent instrument,” Low Voltage Apparatus, no. 2, pp. 8–11, 2008. View at: Google Scholar
  14. S. Yan and Z. Shi-long, “The design points of RS232-RS422/RS485/TLL signal converter,” Journal of Shandong Institute of Commerce and Technology, vol. 12, no. 2, pp. 92–94, 2012. View at: Google Scholar

Copyright © 2014 Li-guo Zhang and Man-feng Dou. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

More related articles

 PDF Download Citation Citation
 Download other formatsMore
 Order printed copiesOrder

Related articles