Page 1 of 3
PCAN ISO-TP Multi-Frame Example
Posted: Mon 7. Mar 2022, 13:23
by K1890350
Hi,
I've been unsuccessful in sending multi-frame messages. I'm aware of relevant parameters like FlowControl, BlockSize and STMin, as well as MsgAlloc/Init. I'm in search of an example that has contains and uses multi-frame messages so that I may see the changes and implement accordingly.
Best,
K1890350
Re: PCAN ISO-TP Multi-Frame Example
Posted: Mon 7. Mar 2022, 13:30
by F.Vergnaud
Hello,
You can find several examples in the PCAN-ISO-TP package, take a lookt at "PCAN-ISO-TP\Samples\C++\06_isotp_segmented_read_write\".
It presents the transmission and reception of a segmented (multiframes) PCAN-ISO-TP message of ~8KB.
Re: PCAN ISO-TP Multi-Frame Example
Posted: Wed 9. Mar 2022, 11:25
by K1890350
Hi,
Thank you for your prompt reply. How do I add more consecutive frames to this example? Currently, its two frames on two different CAN-IDs.
Best,
K1890350
Re: PCAN ISO-TP Multi-Frame Example
Posted: Wed 9. Mar 2022, 11:43
by K.Wagner
Hello,
The amount of consecutive frames sent by the transmission of an ISO-TP message depends on the amount of data to be sent. Please check the ISO-TP protocol specification for more information.
Within the example #6 an ISO-TP message with a length of 8936 data bytes is sent. This generates over 1000 consecutive frames in the transmission.
We encourage our customers to first read and understand the ISO-TP protocol before starting a project from scracht using our APIs. Note that we do not offer support for the protocol itself but for the use of the API.
Thanks for your understanding
Re: PCAN ISO-TP Multi-Frame Example
Posted: Wed 9. Mar 2022, 11:58
by K1890350
Hi,
Thank you for your reply. Should all these consecutive frames be visible in PCAN View? Would you please help me understand why I can only see the first 8 Bytes when I execute the ISO-TP example-6?
Re: PCAN ISO-TP Multi-Frame Example
Posted: Wed 9. Mar 2022, 12:21
by K.Wagner
Hello,
K1890350 wrote: ↑Wed 9. Mar 2022, 11:58
Should all these consecutive frames be visible in PCAN View?
Yes. Note that the example needs two different channels for send and receive the data, as stated in the code of it:

- PCAN channels configuration
- Channels.PNG (6.61 KiB) Viewed 6295 times
In order to see the data using a PCAN-View, you need to connect the PCAN-View to one of the two channels, using the same bitrate as in the example (500 kBit/s).
K1890350 wrote: ↑Wed 9. Mar 2022, 11:58
Would you please help me understand why I can only see the first 8 Bytes when I execute the ISO-TP example-6?
More likely you have connected the PCAN_View using a wrong bitrate (there are different configurations for 500 kBit/s). If you are using default bitrates of PCAN-View, then check please that you are using a clock frequency of 24 MHz for your connection. Here how it looks in PCAN-View v4 and v5:
Version 4:

- Birtate configuration in PCAN-View 4
- PCAN-View4.PNG (3.01 KiB) Viewed 6295 times
Version 5:

- Birtate configuration in PCAN-View 5
- PCAN-View5.PNG (8.08 KiB) Viewed 6295 times
Re: PCAN ISO-TP Multi-Frame Example
Posted: Wed 9. Mar 2022, 14:07
by K1890350
Hi,
Thank you for your reply. I'm running PCAN View version 5. My PCAN USB is running driver version 4.3.0. I'm unable to change the CLK Frequency or select another database entry. Hence, I'm unable to replicate your setup. Can I get some help on this?
Best,
K1890350

- MicrosoftTeams-image.png (231.81 KiB) Viewed 6292 times
Re: PCAN ISO-TP Multi-Frame Example
Posted: Wed 9. Mar 2022, 14:21
by K.Wagner
Hello,
This is because you are using classic PCAN-USB devices. In this case your picture is showing the right configuration. The 500 kBit @ 8MHz are compatible with the values I said before.
Please check that you are using a well terminated CAN cable between the two PCAN-USB devices, this is, 120 Ohm Resistor between CAN-High and CAN-Low on both bus-ends. With only one device, the example will not work
Re: PCAN ISO-TP Multi-Frame Example
Posted: Mon 14. Mar 2022, 11:00
by K1890350
Hi,
I've connected two PCAN USBs with the CAN-HIGH and CAN LOW connected via a 120 ohm on a twisted pair. I've run the 06_segmented messages ISO-TP example and my output is as below.

- MicrosoftTeams-image (1).png (69.03 KiB) Viewed 6226 times
The configuration of both these devices are as follows:

- MicrosoftTeams-image.png (231.81 KiB) Viewed 6226 times
Is there any reason why I'm still not receiving all the data in the heavy.data class?
Best,
K1890350
Re: PCAN ISO-TP Multi-Frame Example
Posted: Mon 14. Mar 2022, 11:08
by F.Vergnaud
Please make sure you are using latest available version of PCAN-ISO-TP API: v3.2.0.