Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

unwanted Delay between cyclic frames XNET

Solved!
Go to solution

Hello,

 

Im facing the following problem:

 

I made a Frame-Sigle-Point session with a dynamically created database but, there is always a delay between the 2nd and the 3rd frame and between the 3rd and 4th. The delay is always ~8ms. You can see the delay in the Imagen below (Timestamps in ms)

 

ypi_0-1614257113725.png

(The 0001 Frame is generated by other Hardware and and do not play any roll more than being the trigger for the Start of the session the first time it is recived).

sampel.png

Here is a Sample code

 

 

Any help?

 

 

-A

---------------------------------------------------

Projektingenieur
Restbust, Simulations and HiL development
Custom Device Developer
0 Kudos
Message 1 of 8
(2,845 Views)

I'd say you're doing it right.  CAN is by design not deterministic and as a result the exact timing of frames can't be reliable.  Is this delay causing you problems?

0 Kudos
Message 2 of 8
(2,815 Views)

Hi,

XNET performs some measures to prevent temporarily overloading the bus by distributing the start time offsets of frames in a session.

A solution would be this code between creating the session and starting it, which forces the start time offset of each frame in the session to be 0ms:

kayfh_0-1614263302977.png

Does this work for you?

You could set the start time offset also individually for each frame, e.g. in steps of 1 or more ms

Message 3 of 8
(2,799 Views)

Yes it is.

 

By experimenting a bit I just found out this delay is tied to the frame ID, the larger the ID, the larger the delay, I need to send all the frames one after the other, like a stream out session but especially for this application the timing is quite delicate, therefore my idea of using hardware timing. The thing is, that evey 20ms I have like 4ms to send all the configured frames. There is no more traffic in the Bus during this time window so it is enough.

 

aaa.png

I have being trying out with the StartTimeOff  but until now the problem is still there.

 

ypi_1-1614264423207.png

 

 

---------------------------------------------------

Projektingenieur
Restbust, Simulations and HiL development
Custom Device Developer
0 Kudos
Message 4 of 8
(2,789 Views)

Thanks for the answer.

 

I have been experimienting with this and well, maybe im doing it wrong, cause it really do not works for me.

ypi_0-1614264753754.png

 

aaa.png

 

Any Ideas? In my post up I posted too a try with the offset for each frame but it also does not work.

 

Thanks!

---------------------------------------------------

Projektingenieur
Restbust, Simulations and HiL development
Custom Device Developer
0 Kudos
Message 5 of 8
(2,782 Views)
Solution
Accepted by topic author ypi

Hi,

can you try to use both properties in the same property node like I did in the example code?

The XNET documentation says this is required:

kayfh_0-1614264883097.png

 

0 Kudos
Message 6 of 8
(2,780 Views)

Such dumb error! Thanks, that works!!!!

---------------------------------------------------

Projektingenieur
Restbust, Simulations and HiL development
Custom Device Developer
0 Kudos
Message 7 of 8
(2,771 Views)

Good to hear!

Message 8 of 8
(2,766 Views)