02-25-2021 06:53 AM - edited 02-25-2021 07:17 AM
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)
(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).
Here is a Sample code
Any help?
-A
Solved! Go to Solution.
02-25-2021 07:47 AM
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?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-25-2021 08:30 AM - edited 02-25-2021 08:36 AM
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:
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
02-25-2021 08:47 AM
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.
I have being trying out with the StartTimeOff but until now the problem is still there.
02-25-2021 08:53 AM
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.
Any Ideas? In my post up I posted too a try with the offset for each frame but it also does not work.
Thanks!
02-25-2021 08:55 AM
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:
02-25-2021 09:19 AM
Such dumb error! Thanks, that works!!!!
02-25-2021 09:27 AM
Good to hear!