Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Dec 18, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

DSA CAN Synchronization

1 ratings | 5.00 out of 5
Print

Overview

This example program demonstrates how an analog signal being measured on both a CAN and DSA device can be synchronized.

Table of Contents

  1. DSA CAN Synchronization
  2. Setup Instructions
  3. Links

Downloads

Filename: dsacandemo1.zip
Requirements: View

DSA CAN Synchronization

Dynamic Signal Acquisition (DSA) devices can be used to acquire Analog Input signals. These signal acquisitons can be synchronized with data being collected on a CAN interface. This example shows how the analog input on both a DSA device and a CAN port can be synchronized.

CAN Demo Box

The CAN Demo Box has an analog to digital converter that takes in an Analog Input and converts it to digital CAN packets. These packets are sent over a CAN port and can be read by a High Speed CAN card. The Demo box also has programmable function generator that can output a Sine, Square or Triangle wave at a specified frequency. For more information on the CAN Demo Box please refer to the CAN Demo box help.

PXI backplane 10Mhz clock

In order to synchronize the DSA and CAN cards together, the clocks being used for any process on each system need to be synchronized. The DSA's clock can not be exported on to a line on the PXI chassis' backplane, so the 10MHz clock on the pXI chassis' back plane is used instead. The DSA's reference clock is phse locked to the 10MHz clock. The CAN device's Master Timebase is imported from the 10MHz clock.

Sample Trigger

Since both the DSA and CAN cards are measuring the same signal it is important only for the two devices to be operating off the same clock, they also need to acquire samples at the same time. The DSA device's Start Trigger line is exported to the PXI Trigger Line to synchronize the acquisition on the DSA and the decoding of CAN packets on the CAN card.

Setup Instructions

Harware Required

  • Can Demo Box
  • PXI-4462 (DSA card) - Only the 446X series can be used with this example
  • PXI-8461 (High Speed Series 2 CAN card)
  • PXI-1010 (PXI-chassis with a 10MHz backplane clock is required)
  • PXI controller / MXI card connected to a computer
  • CAN cable
  • BNC to aligator clips connector
  • 3 pieces of stripped wire

Hardware Setup

  • Place PXI-4462 in slot 3 of PXI chassis
  • Place PXI-8461 in slot 4
  • Connect power to the CAN Demo Box
  • Jumper Gen terminal under Function Generator to Ch0 under Analog In To CAN
  • Also connect wire from Gen and GND under Function Generator to the alligator clips on the BNC cable
  • Connect the BNC cable to AI0 on the DSA board
  • Connect the CAN cable from the terminal labeled CAN to PORT 1 on the CAN card
  • Press Menu Select on the CAN card until you reach the Frequency menu
  • Press + until the output frequency is set to 100Hz
  • Ensure Baud rate matches that set in Measurement and Automation Explorer

Software Setup

  • Install latest CAN and DAQmx drivers
  • Open Measurement and Austomation Explorer and right click on Data Neighborhood. Select CAN channels and go to Import from CANdb file
  • Select the CAN Demo Box.dbc file attached to this email and click ok
  • Open WaveformwOptional Sync DSA.vi
  • Change the CAN DB Filepath to the filepath to where CAN Demo Box.dbc is located
  • Type in AnalogInToCANCh0 for the CAN Channel
  • Select the correct DAQ Physical Channel
  • Set the Sample Trigger Channel to be the DSA's PXI_Trig0 line
  • Also change the tab control to Sync (or leave it as No Sync if you want to demo the two signals not synchronized)
  • Run the VI

Links

 

Requirements


Filename: dsacandemo1.zip

Software Requirements


Application Software: LabVIEW Base Development System 8.2

Hardware Requirements


Hardware Group: CAN, Dynamic Signal Analyzers (DSA)
Driver: NI-DAQmx 8.3, NI-CAN 2.3.2

 
1 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).