09-03-2025 03:45 AM - edited 09-03-2025 03:50 AM
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:
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!
09-03-2025 09:11 AM - edited 09-03-2025 09:14 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-05-2025 03:35 AM
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 ?