From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronisation with RTSI between CAN-card and DAQ-card

Hello!

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
(2,471 Views)
Hi,

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.

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

TN
0 Kudos
Message 2 of 5
(2,462 Views)
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.

-B2k
0 Kudos
Message 3 of 5
(2,458 Views)
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
(2,458 Views)
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?
http://zone.ni.com/devzone/conceptd.nsf/webmain/A0EDFD55B4955EFD86256CAA007618D3

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.

-B2k
0 Kudos
Message 5 of 5
(2,452 Views)