Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize CAN read, CAN write and DAQmx

Solved!
Go to solution

Hi All,

 

I have setup an application with a cDAQ 9178.  I have several digital and analog I/O cards and a CAN card in the chassis. 

The unit is used in a hydraulic test bench.  I am reading and writing my analog and digital I/O hardware timed and synchronized.

I also managed to synchronize my CAN read waveforms with my daqmx analog input and thus synchronizing CAN read with DAQMX.  I used one of the examples in the example finder to manage that.  Now I would like to synchronize my CAN write waveforms with my CAN read waveforms and thus also with the DAQmx analog and digital tasks.

Is there any example out there using the NI-XNET API that shows how to synchronize the CAN read waveform and CAN write waveform on the same interface?

I have tried reading my output signals by adding them in the signal list of the CAN read waveforms but they were not showing.

 

Thanks & regards,

 

Lieven

0 Kudos
Message 1 of 3
(7,270 Views)

Greetings, LievenD;

 

First and foremost, the card that you are using in the chassis for the CAN part is the 9861 or 9862, correct? How many of them are you attempting to synchronize?

 

If I understand correctly, you are both reading and writing frames with the modules and attempting to synchronize the matter with DAQmx, correct? With the XNET API you can route the start trigger between multiple DAQmx and XNET Modules, as per the section 4 in the manual:

http://www.ni.com/pdf/manuals/372840c.pdf

 

Or would you be interested in synchronizing each particular frame that you are reading with a frame that you are writing?

 

Cordially;

Simon P.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(7,257 Views)
Solution
Accepted by topic author LievenD

Hi Simon,

 

I have the 9862 module in my chassis and have managed to use the start trigger of my analog input card NI9205 to synchronize my CAN readings with all my other analog I/O.

Now I just wanted to see my CAN output waveforms synchronized with the rest of the signals.  At first I tried to use the same trigger for my CAN output on the card but somehow it did not work properly.  After looking a bit on the forum and in the examples I found an XNET SESSION property node called EchoTX and used that on my CAN output session.  I then added my output signals to my input signal list and was able to read back my output signals.

This is what I was looking for.

 

Thanks

 

Lieven

 

0 Kudos
Message 3 of 3
(7,252 Views)