Design of DeviceNet Bus Product Based on DN1022

Publisher:第二眼帅哥Latest update time:2014-04-29 Source: 互联网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

        As the types of low-level equipment in industrial fields increase and their functions become more powerful, fieldbus technology has been widely used. DeviceNet technology based on the CAN bus was proposed by Rockwell 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 diagnosis. 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]

The current ways to develop this protocol are:

      (1) Purchase the protocol specifications from ODVA and complete the protocol development yourself. This method has high requirements for R&D. The advantage is low cost, but the disadvantage is long development time.

      (2) Purchase third-party protocol packages for development. Some large automation manufacturers in the market (such as Germany's Hilscher) now provide DeviceNet protocol packages, which suppliers can purchase and develop from them. The protocol development package has comprehensive functions, but it is expensive and has certain technical difficulties.

      (3) Purchase a protocol module. Some automation manufacturers (such as ANYBUS and Hilscher) provide IC modules that integrate the DeviceNet protocol. The supplier only needs to design this IC into the product and perform some simple settings using the serial port. This method is simple and has a short development cycle. The disadvantage is that the structure is fixed and the cost is high.

      (4) Protocol chip. DN1022 integrates the DeviceNet protocol slave function internally. It has high integration and simple packaging, meets the general DeviceNet slave node function requirements, and is low-cost, easy to develop, and not restricted by structure. [2][3][4]

        This paper introduces the development of a DeviceNet slave function module for motor protector based on DN1022 chip. It not only realizes the real-time monitoring of important parameters and operating status of the motor by the field control system, but also completes the remote start/stop control of the motor by the bus, which brings great convenience to industrial production.

1 Development of DeviceNet communication module for intelligent motor protector

        Ankerui Electric Co., Ltd. developed a DeviceNet slave communication module for the company's motor protector and integrated it into the product, realizing the integrated structure of the instrument and the communication module, which is very convenient for the networking and installation of industrial field control systems. The development of this module is based on the DeviceNet slave protocol chip DN1022 and the CPU chip STM32F051 of STMicroelectronics.

1.1 Introduction to main chips

1.1.1 Controller

         The MCU chip adopts STMicroelectronics' Cortex™-M0 architecture core 32-bit processor STM32F051R8T6, with a clock frequency of up to 48MHz, built-in 64 Kb Flash, 8K RAM, 1 12-bit D/A converter, 11 timers, 5-channel DMA controller, 55 high-speed I/O ports, 2 I2C interfaces, 2 USARTs, clock management and other resources, with a high cost performance.

1.1.2 DN1022 protocol chip

        The DN1022 chip has a built-in DeviceNet Group2 Only 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 a high-speed serial port or parallel port, and only needs to implement a simple communication protocol. [5]

        DN1022 technical indicators:

       ◆Supports a maximum of 64 input bytes and 64 output bytes

       ◆Support three data triggering modes: POLL (polling), COS (state change), and CYCLIC (cycle)

       ◆Built-in CAN controller

       ◆Chip power supply voltage 3.0V-5.5V

1.2 Hardware Function 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 of DN1022 from the protector. After reading successfully and configuring DN1022, set DN1022 to the running state. In the running state, the protector and the DeviceNet master station exchange data. The working indicator shows the configuration of the module CPU, the initialization of DN1022 and the status of the CPU reading the protector data, and the network indicator shows the network status of DeviceNet.

      

                              Figure 1 Hardware functions of DeviceNet slave module

1.3 DN1022 working principle introduction

   (1) Configuration: After the device is powered on, the user processor configures DN1022, as shown in Figure 2. The parameters that need to be configured include address, baud rate, Network Input connection length, Network output connection length, etc.

                                   

                                                             Figure 2 DN1022 configuration


(2) I/O data exchange , the process is shown in Figure 3. DN1022 has an internal I/O data buffer, and the data exchange between the DeviceNet master station and DN1022 is asynchronous.


Figure 3 I/O data exchange between DeviceNet master, DN1022, and user CPU

1.4 Software Design

      The software design is completed in C language, which mainly includes CPU initialization, read protector configuration command, DN1022 configuration, and interactive data between protector and DeviceNet master station.


   Main software program:


int main(void)

{

CPU_INIT(); //CUP initialization

disp(1); //CUP is working normally, 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 DeviceNet master station


; //Error exception handling

       }

}

   The software flow is shown in Figure 4.

                           

                                         Figure 4 DeviceNet module software flow 2 DeviceNet networking

       The most common DeviceNet networking method is master/slave connection, which relies on the management of the master station to complete data exchange. The master stations used include PLCs with integrated DeviceNet master station functions, computer plug-in cards (USB cards, PCI cards), etc. PLCs are the most commonly used. The following introduces these two networking methods respectively.

2.1 Zhou Ligong DeviceNet Master Station (Computer USB Card)

       The Zhou Ligong USBCAN-ED master card can realize the communication between the DeviceNet master and slave stations. Use the host computer software CANManager for DeviceNet to set the master and slave station's baud rate, communication address, scan time, delay time, data trigger mode (such as polling, state change) and other parameters. The software interface of the Zhou Ligong master station and the Ankerui Electric motor protector (slave station) for interactive I/O data is shown in Figure 5. This method is simple to network and easy to use, especially suitable for production and debugging.

               

                                             Figure 5 Zhou Ligong USBCAN-ED master station monitoring

2.2 Delta DVP PLC

        Delta Electronics' DVP series small PLC, combined with its DeviceNet master scanning module DVPDNET_SL, can be used as the DeviceNet master in industrial sites. Combined with Ankerui's ARD motor protector with integrated DeviceNet slave function, the master-slave network is built in the following steps:

   (1) Complete the hardware wiring of the master and slave stations as required.

   (2) Use DeviceNet Builder 2.00, a DeviceNet communication configuration software, to configure, as shown in Figure 6. After completing the network configuration, the master station is DNET Scanner, and the rest are motor protector slave stations.

   (3) Use the programming software WPLSoft to monitor data.

        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, set the starting address and number of registers of the corresponding registers in the device monitoring window. Combined with the communication address table of the slave station, the electrical parameters and other parameters of the slave station can be monitored in real time. You can also set the value of the register and send commands to the slave station to achieve remote control of the communication line.

                  

                                          Figure 6 DeviceNet communication configuration

                   

                                              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 and has a compact design, realizing remote control and efficient management of motors for 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] ODVA DeviceNet Specification, 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, Intelligent Equipment Development Guide Based on Fieldbus DeviceNet 2004.

[5] DN1022 User Manual, Shanghai Sibo Automation Technology Co., Ltd., 2013.

Reference address:Design of DeviceNet Bus Product Based on DN1022

Previous article:Brief Analysis of Harmonic Hazards and Active Filtering
Next article:Design and application of medical isolated power supply in a hospital

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号