Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing CAN to external power

Solved!
Go to solution

I am using the USB-8502 to handle CAN communication with some test devices. The devices are run off a separate external power supply and unfortunately we cannot control the timing of it through software.

 

I want to start sending CAN messages about a second after I apply power. Can I send a 5V trigger to the Trigger input on the USB-8502, and use that signal to control the message timing?

 

How can I read the Trigger input level through nixnet, so I can wait in a loop looking for the line to go high? I am only worried about timing to within 10s of milliseconds.

 

This system is being implemented as a DLL through LabWindows/CVI.

0 Kudos
Message 1 of 5
(1,793 Views)
Solution
Accepted by topic author pscheidler

Intrepid makes an RadIO device which might be helpful.  It is a CAN device that turns on and off relays based on CAN messages.  You can of course make your own stand alone thing, or write software that controls both CAN and the PSU separately.

0 Kudos
Message 2 of 5
(1,746 Views)

Thanks, that looks like an interesting device.

I am still curious, is there any way for the software to see if the USB-8502 has received a trigger? Or for it to check what level the trigger input is at?

 

There does not seem to be a lot of documentation on the trigger inputs

0 Kudos
Message 3 of 5
(1,729 Views)

Unlike Programmable Function Interface (PFI) on NI DAQ device, user cannot access the trigger port on XNET device programmatically. It is handled by driver at hardware level.

You can connect the trigger signal to a scope simultaneously, or monitor the CAN port to see if there is any frame transmitted.

 

Or you can just ignore the trigger and let CAN device retransmits the frame until it is acknowledged when the DUT is powered on. As long Interface:CAN:Single Shot Transmit? is not enabled:

"Failed transmissions retry as specified by the CAN protocol (ISO 11898–1, 6.11 Automatic Retransmission). If a CAN frame is not transmitted successfully, the interface attempts to retransmit the frame as soon as the bus is idle again. This retransmit process continues until the frame is successfully transmitted."

Senior Technical Support Engineer | CLD CTA | NI


DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

0 Kudos
Message 4 of 5
(1,710 Views)

Really unfortunate that we can't get a generic input with the same timestamp as the CAN communication

0 Kudos
Message 5 of 5
(1,699 Views)