04-22-2021 05:12 PM
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.
Solved! Go to Solution.
04-23-2021 10:13 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-25-2021 09:14 AM
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
04-27-2021 10:18 PM
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."
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
04-28-2021 05:12 PM
Really unfortunate that we can't get a generic input with the same timestamp as the CAN communication