Abstract : Based on CAN-based DeviceNet technology, this paper designs a DeviceNet slave module for an intelligent motor protector using the DeviceNet slave protocol chip DN1022 and STMicroelectronics' 32-bit microcontroller STM32F051R8T6. The paper also introduces the construction method of DeviceNet network application system.
Keywords : Intelligent motor protector; DeviceNet; Networking
0 Introduction
With the increasing variety and powerful functions of industrial field devices, fieldbus technology has been widely used. DeviceNet technology based on CAN bus was proposed by Rockwell Automation in the United States and further developed and certified by ODVA (Open DeviceNet Vendors Association). It has been widely adopted internationally due to its excellent performance such as low cost, high performance and device-level diagnostics. The DeviceNet protocol is mainly used in the fields of automobiles, semiconductors, electrical machinery, transportation and transmission systems, food, water treatment, stamping and injection molding. [1]
Currently, the methods for developing this protocol include:
(1) Purchase the protocol specification from ODVA and complete the protocol development yourself. This method has high R&D requirements, the advantage is that the cost is low, and the disadvantage is that the development time is long.
(2) Purchase third-party protocol packages for development. Some large automation manufacturers (such as HERS in Germany) offer DeviceNet protocol packages, which suppliers can purchase for development. Protocol development packages are comprehensive in function, but they are expensive and technically challenging.
(3) Purchase protocol modules. Some automation manufacturers (such as ANYBUS and HRS) provide IC modules that integrate the DeviceNet protocol. Suppliers only need to design this IC into the product and make some simple settings using serial ports, etc. This method is simple and has a short development cycle, but the disadvantages are that the structure is fixed and the cost is high.
(4) Protocol chip. The DN1022 integrates the DeviceNet protocol slave function, which has high integration and simple packaging, meets the general DeviceNet slave node function requirements, and is low in cost, easy to develop, and not limited by structure. [2][3][4]
This paper introduces the development of a DeviceNet slave module for motor protection based on the DN1022 chip. It not only enables real-time monitoring of important motor parameters and operating status by the field control system, but also enables remote start/stop control of the motor via bus, bringing great convenience to industrial production.
1. Development of DeviceNet communication module for intelligent motor protector
1.1 Introduction to Main Chips
1.1.1 Controller
The MCU chip uses STMicroelectronics' STM32F051R8T6, a 32-bit processor with a Cortex™-M0 architecture core, with a clock frequency of up to 48MHz. It integrates 64Kb of Flash, 8K of RAM, a 12-bit D/A converter, 11 timers, a 5-channel DMA controller, 55 high-speed I/O ports, 2 I2C interfaces, 2 USARTs, clock management, and other resources, offering high cost-effectiveness.
1.1.2 DN1022 Protocol Chip
The DN1022 chip has a built-in DeviceNetGroup2OnlySlave slave protocol stack, a built-in CAN port and DeviceNet processing engine, a high-speed serial port, a parallel port and a configuration port. The user processor can communicate with the protocol chip through the high-speed serial port or the parallel port, and only a simple communication protocol needs to be implemented. [5]
DN1022 Technical Specifications:
◆Supports a maximum of 64 input bytes and 64 output bytes.
◆Supports three data triggering methods: POLL (polling), COS (state change), and CYCLIC (cycle).
◆ Built-in CAN controller
◆Chip power supply voltage: 3.0V-5.5V
1.2 Hardware Functional Block Diagram
The hardware functions of the DeviceNet slave module are shown in Figure 1. After the device is powered on, the user CPU reads the configuration data for DN1022 from the protector. After successful reading and configuration of DN1022, DN1022 is set to running state. In running state, the protector exchanges data with the DeviceNet master station. The working indicator light displays the module CPU configuration, DN1022 initialization, and the status of the CPU reading data from the protector, while the network indicator light displays the DeviceNet network status.
Figure 1 Hardware Functions of the DeviceNet Slave Module
1.3 Introduction to the working principle of DN1022
(1) Configuration: After the device is powered on, the user processor configures the DN1022, as shown in Figure 2. The parameters that need to be configured include address, baud rate, NetworkInput connection length, and NetworkOutput connection length.
Figure 2 DN1022 configuration
(2) I/O data exchange, the process is shown in Figure 3. There is an I/O data buffer inside the DN1022, and the data interaction between the DeviceNet master station and the DN1022 is asynchronous.
Figure 3 I/O data exchange between DeviceNet master station, DN1022, and user CPU.
1.4 Software Design
The software design was completed using the C programming language. It mainly includes CPU initialization, read protector configuration commands, DN1022 configuration, and data exchange between the protector and the DeviceNet master station.
Software main program:
int main(void)
{
CPU_INIT(); // CPU initialization
disp(1); // The CPU is working normally, and the indicator light flashes for the first time.
read_setting();
set_1022(); // Configure DN1022
while (1)
{
read_master(); // Read real-time parameters
PrepareIOrequest(); // Upload protector data to the DeviceNet main site
// Error and exception handling
}
}
The software flow is shown in Figure 4 .
Figure 4. DeviceNet module software flow
2DeviceNet networking
Currently, the most common DeviceNet networking method is a master/slave connection, relying on the master station for management to complete data exchange. The master station used can be a PLC with integrated DeviceNet master station functionality, or a computer card (USB card, PCI card), with PLCs being the most prevalent. These two networking methods will be described below.
2.1 Zhou Ligong's DeviceNet Main Site (Computer USB Card)
The Zhouligong USBCAN-ED master station card enables communication between DeviceNet master and slave stations. The host computer software CANManagerforDeviceNet is used to set parameters such as baud rate, communication address, scan time, delay time, and data triggering method (e.g., polling, status change). Figure 5 shows the software interface for exchanging I/O data between the Zhouligong master station and the Acrel electric motor protector (slave station). This method is simple to set up and easy to use, making it particularly suitable for production and debugging.
Figure 5 Zhou Ligong's USBCAN-ED master station monitoring
2.2 Delta DVPPLC
Delta Electronics' DVP series mini PLC, combined with its DeviceNet master scanning module DVPDNET_SL, can serve as a DeviceNet master station in industrial settings. The steps for building a master-slave network using Acrel's ARD motor protector with integrated DeviceNet slave functionality are as follows:
(1) Complete the hardware wiring of the master and slave stations as required.
(2) Configure the network using DeviceNet Builder 2.00 communication configuration software, as shown in Figure 6. After completing the network configuration, the master station is DNETScanner, and the others are motor protector slave stations.
(3) Use the programming software WPLSoft for data monitoring.
After configuring the communication network, the master station can manage and control the slave station by monitoring and setting the corresponding registers of the PLC, as shown in Figure 7. After starting the WPLSoft software, the starting address and number of registers for the corresponding registers can be set in the device monitoring window. Combined with the slave station's communication address table, the electrical parameters and other parameters of the slave station can be monitored in real time. Register values can also be set to send commands to the slave station, enabling remote control via the communication line.
Figure 6 DeviceNet communication configuration settings
Figure 7. Monitoring and setting PLC register values.
3. Conclusion
The intelligent motor protector based on DeviceNet fieldbus technology adopts the latest single-chip microcomputer technology, has a compact design, and realizes remote control and efficient management of motors in industrial process control.
Source : Automation Applications, Issue 2, 2014
References:
[1] Li Zhengjun, Fieldbus and Industrial Ethernet and Their Application Technology, Machinery Industry Press, 2013.
[2]ODVADeviceNetSpecification, 2013.
[3] Li Erqiang, Quan Huimin, Zhou Qin, Wang Xinggang, Design and Implementation of DeviceNet Communication Module for Intelligent Circuit Breaker, 2011.
[4] Zhang Ji, Cheng Min, Xie Jianying, A Guide to the Development of Intelligent Devices Based on DeviceNet Fieldbus, 2004.
[5] DN1022 User Manual, Shanghai Sibo Automation Technology Co., Ltd., 2013.