Showing results for 
Search instead for 
Did you mean: 

Synchronisation with RTSI between CAN-card and DAQ-card


We have two PCI-CAN/XS2-card with 2 ports and one DAQ-card, PCI-6259 M SERIES Multifunction DAQ. We have a program that measure signals from CAN-bus with the PCI-CAN-card and one program that measure signals with the DAQ-card. We have a RTSI BUS cable for 2 PCI devices. We now want to use the RTSI cable to synchronize theese programs to one program, so that we can measure the same signals on the DAQ and CAN-card to compare them. In the CAN-program we use the FRAME API-s.

Does anyone have a tip for us how to do this? Thank you and best regards.
0 Kudos
Message 1 of 5

You can find some examples in Lv example finder>> HW input and output>>CAN>>advanced or synchronizing.

There is also a link which discuses this task.

0 Kudos
Message 2 of 5
Hello Ex-jobb,

What exactly do you want your CAN and DAQ card to perform? There are multiple options (transmit a Frame when the DAQ card starts sampling, etc.).

In general:
The examples of the Frame API listed in the example finder (Hardware Input and Output » CAN » Frame API » Synchronizing CAN with DAQ) only take the synchronization capabilities of Series 1 CAN hardware into account (which your Series 2 card can still do). However as your Series 2 PCI-CAN/XS2-card has more advanced (better) synchronization abilities you might want to consider them too.
Specifically, as of NI-CAN 2.2, there are two now VIs (or function calls) for the Frame API: ncConnectTerminals and ncDisconnectTerminals
Using those VIs enables the card to share clock signals (e.g. for timestamping incoming CAN frames).

For more details on how to use those VIs, take a look at the functional description in the NI-CAN Hardware and Software manual for a full description. It might also be helpful to take a look at some of the Channel API synchronization examples.

0 Kudos
Message 3 of 5
Hello! Thank you for your help!

What we want the CAN and DAQ-cards to do is that we want to measure the same signals but from different sources of course. Then we want to compare them in a chart. So we only want to listen with the CAN-card... so then we need to synchronize theese cards. Thank you again for your help ! Best regards.
0 Kudos
Message 4 of 5
Hello Ex-jobb

Just to make sure that I understand you right: You have DAQ signals and CAN signals where both should represent the same data (or indicate the same event)?
Does this article somehow describe your setup?

Basically, a common clock signal is used across the CAN and the DAQ card to avoid drift and another signal is used as a start signal to avaoid latency.
Of course the article uses the Channel API, but one can do the same with the Frame API.

0 Kudos
Message 5 of 5