- Open Access
- Total Downloads : 519
- Authors : Grishma Bhatt
- Paper ID : IJERTV3IS030544
- Volume & Issue : Volume 03, Issue 03 (March 2014)
- Published (First Online): 18-03-2014
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Data Transfer between Two Nodes Using NI-CAN Interface
Grishma Bhatt
Electronics & communication engineering SALITER
Ahemdabad, India
Abstract- This paper presents the approach for using CAN communication protocol, so that we can successfully transfer data between TMS320F28335 and LabVIEW. Also using CAN protocol, we can measure, control and change the data between TMS320F28335 and LabVIEW.
Keywords- CAN(controller area network),LabVIEW,TMS320F28335(DSC).
-
INTRODUCTION
This paper provides an approach for CAN communication between TMS320F28335 and LabVIEW GUI. We can make a GUI easily in LabVIEW. Using CAN communication, we can measure this data by the C program written in CCS (code composer studio v4) for TMS320F28335. We can also control and change the data in LabVIEW GUI using CAN protocol.
For CAN communication, we have to use both nodes (TMS320F28335 and LabVIEW) which can fully support this CAN protocol. TMS320F28335 has in-built CAN protocol while for LabVIEW, we have to install CAN driver in LabVIEW. Thus, we can sucessfully transfer data between these two nodes.
-
CAN COMMUNICATION BETWEEN TMS320F28335 and LabVIEW
-
CAN protocal
To eliminate point-to-point wiring, automotive manufacturers replaced dedicated wiring with in-vehicle networks, which reduced wiring cost, complexity, and weight. In 1983, Robert Bosch GmbH started the development of the Controller Area Network (CAN), which has emerged as the standard in-vehicle network as in Figure 1.
Because CAN has high and reliable data rates, built-in failure detection and cost-effective prices for controllers, nowadays it is widely used outside automotive electronics. It is a serial communication network, in which
the information is transmitted over 1 (fault tolerant low speed) or 2 (high speed differential) physical signal lines.
The receivers are able to re-synchronize themselves based on a non return to zero (NRZ) modulation technique and an additional stuff bit rule, which forces the transmitter to include a stuff bit after 5 consecutive bits of 0 or 1. In CAN, each message is sent with an identifier that is recognized by the different nodes.
CAN network has advantages such as multi master bus access, random access with collision avoidance (CSMA
/ CA), short message length , at max. 8 Bytes per message, data rates 100KBPS to 1MBPS, short bus length, physical length depends on data rate, self-synchronised bit coding technology, Robust EMC behaviour, built in fault tolerance. Advantages of CAN are Low-Cost, Lightweight Network, Broadcast Communication, Priority and Error Handling Capabilities.
Figure 1. CAN networks significantly reduce wiring.
-
Digital signal controller – TMS320F28335
Digital signal controller TMS320F28335 is capable of executing six basic operations in a single instruction cycle.It has features like Thirty-two bit controller and Thirty-two bit mailboxes, In-built flash memory (256KB), Integrated peripherals- SPI, CAN, I2C, UART etc., In-built 64KB RAM, In-built DSP for signal processing, Integrated
12-bit ADC, Fast interrupt response manager, Up to 88 shared GPIO pins for full remote control parameter implementation, 3-timers with 32-bit each for implementing timing applications like time-stamping application for event management. The TMS320F28335 CAN unit is a full CAN Controller. It contains a message handler for transmission, reception management and frame storage which is shown in below Figure 2.
Figure 2 TMS320C28335 DSC Block Diagram
-
LabVIEW
Laboratory Virtual Instrument Engineering Workbench (LabVIEW) is created by National Instrument Company. Labview is a Graphical program language which does not need any text to create the program and it does not look like the text programming languages such as C/C++, Java, Basic, Fortarn, etc. Therefore it is called G (Graphical programming language). LabVIEW program are created by using graphical notations which are made by connecting functional nodes and wiring them together in order for the data to flow. It also has continuous Auto compiling, i.e. when ever an error happens, it immediately informs the user.
For data communication between LabVIEW and TMS320F28335, we have to install CAN driver in it which allow LabVIEW to send and receive data/CAN packets. It is defined in CAN database directly from LabVIEW application. The CAN driver can access the CAN signal via symbolic names. The raw CAN data is converted automatically into physical values using conversion rules from the CAN database.
CAN is peer to peer communication. So no master is required that control individual nodes to have access to read and write data on CAN bus. So when one node is ready to transmit data, it will check if bus is busy or not. If bus is not busy then it will write the data. CAN network will work on random access with collision avoidance (CSMA / CA ) .It means that if miltiple nodes try to transmit the data on the CAN bus at a same time,the node which has lowest
arbitration ID will be consider as highest priority, so that it will be automatically provided the access. The lowest priority node will wait for bus to be free, after that it will send the data. In this way, you can implement CAN networks to ensure deterministic communication among CAN nodes. The NI-CAN driver provides high-level, easy- to-use functions to help you develop entire CAN applications quickly, saving you both time and money.
Figure 3 project flow
As in figure 3 the project flow is based on CAN protocol and LabVIEW GUI. Using CCS (Code composer studio) for CAN programming on TMS320F28335, we can transmit and receive the CAN data packet.With help of this program, we can measure the value of data from GUI for any analog
module like gain, offset calibration, filter bandwidth, test mode on/off, etc. If this value is not desired for our experimental use, we can change it.
-
-
CONCLUSION
In this paper, we propose that the data transfer can be successfully completed between LabVIEW GUI and TMS320F28335 using CAN protocol. So in the project, we can measure, control and change the value of parameters like gain, offset calibration, test mode on/off, filter cutoff, etc. as required.
REFERENCES
-
TMS320F28335 Data menual. Texas instrument.
-
System Document C2000.Texas instruments.
-
TMS320x2833x, 2823x Enhanced Pulse Width Modulator (epwm)
Module Reference Guide. Texas instruments
-
Wang Ruoping, Yang Yuzhu, Gao Haiyu, Jiao Xianzheng On-line Tuning Algorithms Design and Validation for MCU Based on TMS320F28335 (EMEIT-2012).
-
Controller Aera Network (CAN) Basics, AN713: Microchip Technology, Inc.
-
Steve Corrigan, Introduction to the Controller Area Network (CAN) Texas Instruments Application Report, SLOA 101, 2002.
-
Wang JJ, Hong TS. Design and implementation of LabVIEW-based CAN bus communication system [J] Computer Applications and Software [ISSN 1000-386X], 2010, 27(8): 235-237,262.
-
Hanxing Chen and Jun Tian, Research on the Controller Area Network, Intenational Conference on Networking and Digital Society 2009.
-
PIAO Chang-haol,2 , CHEN LUI, CAO A Design for Controller Area Network Bus Real-time Monitoring System Jul 978-1-4577- 1587-7/ 1 2011 IEEE.