PUDS_PARAM_SEPERATION_TIME parameter

A free API for the communication with control devices according to UDS (ISO 14229-1)
Post Reply
A.Julin
Posts: 6
Joined: Fri 30. Jun 2017, 13:57

PUDS_PARAM_SEPERATION_TIME parameter

Post by A.Julin » Fri 30. Jun 2017, 14:13

Hello,

I'm working on a project using UDS protocol. I have a problem with the PUDS_PARAM_SEPERATION_TIME parameter. When I use PCAN-View to see CAN frames send by the Peak UDS library during a download sequence, I can see the time between two consecutive frames is inferior to the default value 10 ms.
33) 32193.6 Rx 07E0 8 22 00 00 00 00 00 00 00
34) 32194.2 Rx 07E0 8 23 00 00 00 00 00 00 00
35) 32194.5 Rx 07E0 8 24 00 00 00 00 00 00 00
36) 32194.7 Rx 07E0 8 25 00 00 00 00 00 00 00
37) 32195.2 Rx 07E0 8 26 00 00 00 00 00 00 00
38) 32195.5 Rx 07E0 8 27 00 00 00 00 00 00 00
39) 32195.7 Rx 07E0 8 28 00 00 00 00 00 00 00
40) 32196.2 Rx 07E0 8 29 00 00 00 00 00 00 00
41) 32196.5 Rx 07E0 8 2A 00 00 00 00 00 00 00
42) 32196.7 Rx 07E0 8 2B 00 00 00 00 00 00 00
43) 32197.2 Rx 07E0 8 2C 00 00 00 00 00 00 00
44) 32197.5 Rx 07E0 8 2D 00 00 00 00 00 00 00
45) 32197.8 Rx 07E0 8 2E 00 00 00 00 00 00 00
46) 32198.2 Rx 07E0 8 2F 00 00 00 00 00 00 00
47) 32198.5 Rx 07E0 8 20 00 00 00 00 00 00 00
In this sample (part of a TransfertData request 0x36) coming from PC-View output , the time between two frames is sometime inferior to 0.2 ms. The target cannot handle this gap between two frames, it's too short.
Even if I try to increase the PUDS_PARAM_SEPERATION_TIME parameter, I get, more or less, the same result.

For changing this parameter I use the following code :

Code: Select all

    TPUDSStatus error = UDS_Initialize( PUDS_USBBUS1, PUDS_BAUD_500K, 0,0,0 );
    if( PUDS_ERROR_OK ==  error)
    {
        qDebug()<<"Init Ok";

        BYTE * pTime = new BYTE[1];
        pTime[0] = 0x64;

        TPUDSStatus status = UDS_SetValue( PUDS_USBBUS1,PUDS_PARAM_SEPERATION_TIME, pTime, 1 );

        if( PUDS_ERROR_OK != status )
        {
            qDebug()<<"Error for setting time "<<QString("0x%1").arg( QString::number(status,16 ).toUpper() );
        }
    }
    else
    {
        qDebug()<<"Init Failed";
    }
I get no error when I execute this code.

I don't understand why the min time between 2 consecutive frames is not 10 ms (or more when I changed it)

Thank in advance for any information.
Alexis

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by K.Wagner » Fri 30. Jun 2017, 14:48

Hello,

please check that you have the last versions of the libraries:
  • PCAN-Basic (PCANBasic.dll): v4.1.0
  • PCAN-ISO-TP (PCAN-ISO-TP.dll): v2.0.0
  • PCAN-UDS (PCAN-UDS.dll): v1.3.0
Best regards,
Keneth

A.Julin
Posts: 6
Joined: Fri 30. Jun 2017, 13:57

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by A.Julin » Fri 30. Jun 2017, 15:02

Yes my configuration is up to date, it matches with the version you sent.
Thank for the help
Alexis

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by K.Wagner » Fri 30. Jun 2017, 15:31

Hello,

this problem as you discribe was fixed since version 1.4.2 of PCAN-ISO-TP.dll. Here the history:
2016-04-21 - Version 1.4.2
Improvements:

- Added parameter PCANTP_PARAM_PADDING_VALUE to change CAN data padding value
- Added support for additional PCAN-Basic channels (PCAN-Basic 4.x)
- Updated N_As, N_Ar, N_Cr timeouts computing
- Improved calculation of separation time between packages to take arbitration delays into account

Bug fixes:

- Fixed timeout deadlock when calling PCANTP_Uninitialize with value PCANTP_NONEBUS
- Fixed timeout computing of Seperation Time Min.
It may be possible that you still have some old DLLs in your system that are being loaded instead of the new versions.

You can use our SystemTool to check your system for old files. For this, please download and extarct this file Download LINK and follow the instructions of the wizard. Check that at the page "Features" at least the options "Files" and "Registry" are checked.

The tool will ask you for save the results to a XML file at the last step. Please save the results and send us that file for analysis to support[at]peak-system.com.
Best regards,
Keneth

A.Julin
Posts: 6
Joined: Fri 30. Jun 2017, 13:57

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by A.Julin » Fri 30. Jun 2017, 16:08

Done

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by PEAK-Support » Sat 1. Jul 2017, 12:42

Thank you - we received the file and will answer directly by e-mail soon as possible.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

F.Vergnaud
Software Development
Software Development
Posts: 305
Joined: Mon 9. Sep 2013, 12:21

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by F.Vergnaud » Mon 3. Jul 2017, 10:50

Hello Alexis,

Actually your result are consistent: with ISO-TP (and therefore UDS) it is the receiver (i.e. the ECU) that defines the value of the SEPERATION_TIME and BLOCK_SIZE to use. Here is a small description of the communication:

Code: Select all

      
1  169.417 07E0  10 34 36 01 41 42 43 44  <-- UDS Tester Client, requesting a transfert data
2  170.415 07E8  30 0A 0A 55 55 55 55 55  <-- ECU responding with STMin=0x0A, Block Size=0x0A
3  182.172 07E0  21 45 46 47 48 49 4A 4B 
4  192.874 07E0  22 4C 4D 4E 4F 50 51 52  <-- Tester Client uses the values given by the ECU
5  203.633 07E0  23 53 54 55 56 57 58 59 
Check the configuration of your ECU or post your CAN trace of the beginning of the communication so that we can tell you what its configuration is.
Best regards,
Fabrice

A.Julin
Posts: 6
Joined: Fri 30. Jun 2017, 13:57

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by A.Julin » Tue 4. Jul 2017, 09:20

OK thank you for the answer

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: PUDS_PARAM_SEPERATION_TIME parameter

Post by K.Wagner » Tue 4. Jul 2017, 10:19

Other important things,

analyzing the file you sent us we find the following:
  • Your drivers are not up to date. The stand of your drivers is from year 2011, version v3.7.2. The current version is v4.1.2
  • In the folder C:\Windows\SysWOW64 lies an older version of PCAN-Basic (v1.2.1, year 2012). If you start any 32-bit PCAN-Basic application that has no PCANBasic.dll near to it, then this old version will be used, which can ends in malfunctions.
  • In the PATH environment variable of your computer is a PCAN-Basic registered. This should not be done. Doing so, then always the same DLL will be used, no matter if you copy a newer version near to your application.
These issues may cause failures in your programs that will be first difficult to find. We recommend to fix them.
Best regards,
Keneth

Post Reply