Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

bus

I need to transmit a CAN message a user definable amount of time (x msec) after sending out a free running analog pulse from my multifunction DAQ.  I am using DAQmx to define the timing signal.  Does anyone have a suggestion on how to go about doing this?  I am using a PXI CAN card and a PXI mulifunction DAQ card with LabVIEW.
0 Kudos
Message 1 of 4
(3,921 Views)

There are shipping examples that demonatrate DAQ and CAN synchroniztion, including DAQ analog output with CAN transmit:

http://digital.ni.com/public.nsf/websearch/D6D0B423D6CA969986256F23007B7C69?OpenDocument

This document talks about RTSI synchronization, which is a separate cable when used with PCI cards, but is built into the backplane of PXI systems.

0 Kudos
Message 2 of 4
(3,907 Views)
Thanks Mike... I may be missing something here but I am somewhat aware of the synchronization capabilities (all PXI card clocks synched to within 10 microsec through the backplane).  What I need to do is start a an analog DAQmx output waveform that is a periodic "pulse" and let it run.  Then each time the pulse is generated, I need to wait several milliseconds then send a specific CAN message.  My problem is I don't think I have access to the output signal to know when it actually generates the pulse unless I loop the signal back into an analog input.  For example, if I have a one volt pp  50% duty cycle 1 Hz square wave and I want to generate a CAN message each time the output reaches 0 volts how do I know when this actually occurs?  Depending on how I defined the signal, it should go zero every half second after it is started.  Is it sufficient to simply start the signal and monitor the clock and wait for 500 msec to transmit the CAN message?  I am concerned that there may be a tendency for error to accumulate and ultimately end up with a significant phase shift. 
0 Kudos
Message 3 of 4
(3,902 Views)
There is a way to ensure hardware timing for this operation.  Since you are generating the output waveform, you should know how many samples into the waveform the signal goes low.  If you have a multi-function DAQ card, you can use this information along with the AO Sample  Clock Timebase and a counter to generate a pulse after a number of ticks of the output sample clock.  You can use this pulse to trigger your CAN write.  This method counts actual clock ticks rather that using software timing to guess when the signal goes low.
 
In fact, depending on your waveform, you may be able to use this counter output to generate your analog pulse as well.

Message Edited by Michael C on 10-18-2005 03:01 PM

0 Kudos
Message 4 of 4
(3,885 Views)