Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Send CAN remote frames periodic on RTSI pulse

Hi. I'm trying to send a remote frame (with the RTR bit set) on receipt of a RTSI pulse from a PXI 6602 timer card. I then need to receive CAN data frames at the CAN card from the instruments with the arbitration ID of the remote frame sent.
I can do this using CAN object transmits period using RTSI example vi and Cont pulse train vi to provide the RTSI pulse. However this can only send CAN data frames, not remote frames. Grateful for any help on this.

VIV
0 Kudos
Message 1 of 2
(3,583 Views)
Hi VIV

Instead of using a CAN Object you can use a Network Interface Object for that. There is already an example that just needs minimal modification.

If you are using LabVIEW:
Open the NI ExampleFinder and navigate to the Network Interface transmits CAN frame on RTSI example (Hardware Input and Output » CAN » Frame API » Synchronizing CAN with DAQ » DAQ Card Controls RTSI » Network Interface Objects). Modify the example by wiring a '1' (numeric value) to the currently open 'IsRemote' terminal of the ncWriteNet.vi.

If you are using C:
Navigate to the …\National Instruments\NI-CAN\MS Visual C\Frame API examples folder and open the Network Interface transmits CAN frame on RTSI example. Locate the line
Transmit.IsRemote=NC_FALSE;
And change it to
Transmit.IsRemote=1;

Now, you’re transmitting a remote frame with every RTSI pulse.

-B2k
0 Kudos
Message 2 of 2
(3,561 Views)