12
CAN COMMUNICATION USING LABVIEW Eeshan Bashir Kalyani Shirole

Can communication using labview

Embed Size (px)

DESCRIPTION

Basic Introductions

Citation preview

Page 1: Can communication using labview

CAN COMMUNICATION USING LABVIEW

Eeshan BashirKalyani Shirole

Page 2: Can communication using labview

HARDWARE FOR COMMUNICATION??

• CAN Bus with a Second CAN receiver to analyze messages.

• LABVIEW CAN HARDWARE.– NI-XNET PCI, PXI, and C Series CAN: Onboard,

software-selectable– NI USB CAN: Onboard– CompactRIO CAN: Onboard

Page 3: Can communication using labview

CAN Transceiver Type?

The portion of a CAN interface that connects a CAN controller to the network is called a transceiver. E.g– High-Speed/FD CAN Overview– Low-Speed/Fault-Tolerant CAN– Single-Wire CAN Overview

Page 4: Can communication using labview

NI-XNET 

NI-XNET interfaces helps us to develop applications for prototyping, simulating, and testing CAN, LIN, and FlexRay networks faster and more easily in NI LabVIEW• Prerequisite:– CAN Hardware– LABVIEW RT – XNET drivers

Page 5: Can communication using labview

Basic Programming model

Page 6: Can communication using labview

Steps to create this block diagram

• Create an NI-XNET session in a LabVIEW project. The session name is MyInputSession, and the mode is Signal input-Single-Point.

• Create a new VI in the project and open the block diagram.

• Drag a while loop to the block diagram. Right-click the loop condition (the stop sign) and create a control (stop button).

Page 7: Can communication using labview

Cont.

• Drag the NI-XNET session from a LabVIEW project to the while loop. This creates the

• XNET session wired to the corresponding XNET Read.vi.

• Right-click the data output from XNET Read.vi and create an indicator.

• Run the VI. View the received signal values. Stop the VI when you are done.

Page 8: Can communication using labview

NI-XNET functions

• The NI-XNET functions palette includes nodes that extend this programming model to perform tasks such as:– Creating a session at run time (instead of a Lab VIEW

project).– Controlling the configuration and state of a session.– Browsing and selecting a hardware interface.– Managing and browsing database files.– Creating frames or signals at run time (instead of

using a database file).

Page 9: Can communication using labview

Sessions

• Each session configuration includes:– Interface: This specifies the National Instruments

hardware to use.– Database objects: These describe how external

hardware communicates.– Mode: This specifies the direction and

representation of I/O data.

Page 10: Can communication using labview

Session Modes• Signal Input Single-Point Mode• Signal Input Waveform Mode • Signal Input XY Mode• Signal Output Single-Point Mode• Signal Output Waveform Mode• Signal Output XY Mode• Frame Input Stream Mode• Frame Input Queued Mode• Frame Input Single-Point Mode• Frame Output Stream Mode• Frame Output Queued Mode• Frame Output Single-Point Mode

Page 11: Can communication using labview

Configuring Frame I/O Stream Sessions

Page 12: Can communication using labview

THANK YOU