11-18-2008 06:18 PM
I am still learning the ropes of the PXI-8464 dual port card. I have a DUT that will receive a CAN message from interface CAN0. I need to monitor the bus using CAN1 and verify that I receive a response from the DUT within 10ms. I am working in a C++ environment.
Currently this is my process:
- Use nctCreateMessage to setup both CAN0 and CAN1
- Start both interfaces
- Use nctWrite to transmit data to the DUT
- ? ( this is where I am stuck )
I could use some help in understanding how to verify that I receive a response within 10 ms, specifically what commands to use.
Thanks in advance,
Mike
11-19-2008 09:02 AM
See the examples that ship with the NI-CAN driver. It has a "Transmit Receive same port" example that transmits and receives on the same port.
if you need a second port, just initialize another one and use this handle for the receive process.
DirkW
11-20-2008 10:30 AM
11-21-2008 04:24 PM
Hello,
We have a few options to measure time. If you use the example you can start a timer after the CAN send and stop it once the read was successful. This discussion forum (http://forums.ni.com/ni/board/message?board.id=170&message.id=263702&requireLogin=False) describes three ways to use a timer.
National Instruments
11-24-2008 08:26 AM
Mike,
You can enable the selfe reception feature and receive all your transmitted messages. Now that you have both the transmitted message and the received message, you could compare the timestamps.
You have to use the set attribute with self rception enable before you start communication.
Hope that helps.
Dirk W
11-24-2008 10:37 AM
11-25-2008 08:31 AM
Yes, that sounds right. Here is an example for a single filter.
DirkW