Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay in Function Activation Across Multiple ECUs Using LabVIEW VI via the NI-XNET USB-8502 (No Delay in CANoe)

Hello everyone,

I'm currently working with the LabVIEW  NI-XNET USB-8502 CAN module to establish communication between six ECUs. The goal is to trigger the same function simultaneously on all ECUs.

To achieve this, I'm sending:

  • Periodic frames to maintain communication.
  • Event-based frames triggered by user actions (e.g., button clicks).

However, I'm facing an issue:
When I trigger the function, there's a noticeable delay between activations across the ECUs. The function activates first on one ECU, then the next, and so on — instead of all ECUs responding simultaneously.

Interestingly, when I run the same test using CANoe, all ECUs respond at the same time, with no delay.

 

Has anyone experienced this kind of behavior with NI-XNET?
Could this be related to frame scheduling, buffering, or USB latency?
Any suggestions or solutions would be greatly appreciated!

Thanks in advance!

0 Kudos
Message 1 of 3
(108 Views)

I think more information is going to be needed.  CAN is a scheduled synchronous message protocol. You can't send two messages at the same time, the one with the higher priority will go out first, then the next. There is no working around this.  You can minimize the delay in a way that it is a small amount of time, but it cannot be at the same time.  You could get 6 CAN ports, then send a frame on each of them at the same time.  But it isn't clear from your setup if you have 6 ports, or 1.  It also isn't clear what the message you are sending is, and if it is unique for each device on the bus or not.  Does the frame have some kind of identifier for each DUT for instance.

 

If you have it working in Vector I'd suggest taking a log and seeing when those functions go out, and what is sent, then compare that to the log of when XNet does the same thing to see where the delays are coming from.  Oh and seeing some code would help.

0 Kudos
Message 2 of 3
(59 Views)

I'm currently using only one port from the NI USB-8502 module to send CAN FD frames. All my ECUs share the same identifiers.

Below is my code i used two NI-XNET sessions one is the Frame output single point to send  the Cyclic frame and the other is Frame output stream to send  the event Frames.
I've tried to take a log  with CANoe and i found that CANoe schedule the frames automatically and delay the frames automatically  , but i don't know how to make the same automatic scheduling using  the Labview and Ni-XNET. 
Do u have any  Method for that ? 

RayenDr_1-1757060945307.png

 

 

0 Kudos
Message 3 of 3
(22 Views)