Only one CAN frame in each UDP packet
Re: Only one CAN frame in each UDP packet
Earlier it has been said that the UDP timeout value cannot be changed.
What is the (hardcoded) timeout value?
I.e. after how many ms or us a UDP packet will be send even though the 'frames per packet' number is not yet reached?
What is the (hardcoded) timeout value?
I.e. after how many ms or us a UDP packet will be send even though the 'frames per packet' number is not yet reached?
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: Only one CAN frame in each UDP packet
Hi,
the value set as 'fpp' is only the upper limit for the number of CAN frames that is sent in one UDP packet. There is no timeout. When there is a lot of traffic on CAN bus or bursts with many Frames up to 'fpp' frames might be sent in one packet but only if ther have already arrived at the time when the UDP packet is buit.
BR,
Stephan
the value set as 'fpp' is only the upper limit for the number of CAN frames that is sent in one UDP packet. There is no timeout. When there is a lot of traffic on CAN bus or bursts with many Frames up to 'fpp' frames might be sent in one packet but only if ther have already arrived at the time when the UDP packet is buit.
BR,
Stephan
Re: Only one CAN frame in each UDP packet
Hi Stephan,
thanks for the answer.
How is the "time when the UDP packet is built" defined? If it's periodic, what's the periodicity?
Also, the manual implies a different behavior: "Frames per Packet: This value specifies how many CAN frames are
transmitted per IP packet. The higher the value, the greater the delay in the transmission of CAN messages."
Best
Thomas
thanks for the answer.
How is the "time when the UDP packet is built" defined? If it's periodic, what's the periodicity?
Also, the manual implies a different behavior: "Frames per Packet: This value specifies how many CAN frames are
transmitted per IP packet. The higher the value, the greater the delay in the transmission of CAN messages."
Best
Thomas
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: Only one CAN frame in each UDP packet
Hi,
the text in the documentation will be changed in future versions. The packages are build event based - triggered by incoming messages - not periodic thus there is no fixed period.
Regards,
Stephan
the text in the documentation will be changed in future versions. The packages are build event based - triggered by incoming messages - not periodic thus there is no fixed period.
Regards,
Stephan
-
- Posts: 8
- Joined: Wed 21. Sep 2022, 17:40
Re: Only one CAN frame in each UDP packet
Hi Stepan,
I just read FD DR developer manual section 2.1.1 'Configuring CAN IRQ Limits'...
Do I understand correctly, this (new?) feature enables me to have a new (then larger) UDP packet being sent only every 3 CAN packets?
Best Regards
Thomas
I just read FD DR developer manual section 2.1.1 'Configuring CAN IRQ Limits'...
Do I understand correctly, this (new?) feature enables me to have a new (then larger) UDP packet being sent only every 3 CAN packets?
Best Regards
Thomas
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Only one CAN frame in each UDP packet
This is a PCAN-Ethernet Gateway FD feature only.
There is a other Setting that you also could use (also with the normal Gateway):
part of the Route definition sinse Info Version "v1.3.0". But this makes only sensce with a very High CAN Bus Load, or Burst of CAN Frames.
Otherwise you will stock by 3 - 4 CAN Frames per packet.
All is depending on how many CAN Frames are received within a time ....Do I understand correctly, this (new?) feature enables me to have a new (then larger) UDP packet being sent only every 3 CAN packets?
There is a other Setting that you also could use (also with the normal Gateway):
Code: Select all
FPP 15 max. CAN frames per IP packet
Otherwise you will stock by 3 - 4 CAN Frames per packet.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 8
- Joined: Wed 21. Sep 2022, 17:40
Re: Only one CAN frame in each UDP packet
Thanks, I'll try with the PCAN-Ethernet Gateways FD.
For the normal Gateway:
As my goal is to always aggregate 3 consecutive CAN frames into 1 IP packet, it seems I would rather need a 'min. CAN frames per IP packet'.
Do I understand correct that there is still no way to achieve this in the 'normal' Gateway?
Best
Thomas
For the normal Gateway:
As my goal is to always aggregate 3 consecutive CAN frames into 1 IP packet, it seems I would rather need a 'min. CAN frames per IP packet'.
Do I understand correct that there is still no way to achieve this in the 'normal' Gateway?
Best
Thomas
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Only one CAN frame in each UDP packet
You could not set "fix" 3 CAN Frames per IP Packet. That can not work , because there is a timeout, and if this is reached the packege will be send.
And if the CAN packages comes slower as the time out it, will send the package that are arrived until this moment.
If you want to send 3 CAN Frames per packat they need to come very close - otherwise the Ethernet dataflow would "stock" because of waiting for the CAN Frames.
And if the CAN packages comes slower as the time out it, will send the package that are arrived until this moment.
If you want to send 3 CAN Frames per packat they need to come very close - otherwise the Ethernet dataflow would "stock" because of waiting for the CAN Frames.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 8
- Joined: Wed 21. Sep 2022, 17:40
Re: Only one CAN frame in each UDP packet
In my application, every 20ms, 3 CAN packets are coming very close (<1ms).
Thus, if there is way to 'play' with this timeout also with the 'normal' GW, that would be apprecicated very much!
Thus, if there is way to 'play' with this timeout also with the 'normal' GW, that would be apprecicated very much!
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Only one CAN frame in each UDP packet
As this Timeout is part of the Network Stack, we could not change it.
For example, if the device receive the 2nd CAN Frame of your 3 Frame Burst .. the device need the timeout, otherwise it need to wait until your 1st Frame from the next Burst is received (20ms).
For example, if the device receive the 2nd CAN Frame of your 3 Frame Burst .. the device need the timeout, otherwise it need to wait until your 1st Frame from the next Burst is received (20ms).
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------