Hello,
I have used PCAN-UDS to read the Diagnostic messages from my PCAN-USB
I could see the CAN1 messages are read continuously in the PCAN-View without any request sent.
How to read these messages that are always sent from the ECU in my C# application. Which API to use ?
Thanks & Regards,
Kiran
Read CAN1 messages from ECU
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Read CAN1 messages from ECU
If you want to read RAW CAN Frames from the BUS, you should use the PCAN-Basic API. You could use the same Handle that you use for the UDS, but you should know that all Mesages Read by PCAN-Basic API will never be received in any other Higher Layer API. You need exact know when read and when not. If you end a UDS Session, you simply could use the API, when start a UDS Session - never read witth PCAN-Basic API because UDS will then not receive the needed Frames..
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Read CAN1 messages from ECU
Hello,
Thanks for the response.
Either use PCAN-Basic or UDS is ok at the moment.
But is there a way to do in parallel. ?
Like most of the time, I need the RAW CAN frames, at some intervals (random) I need to get / set the diagnostics data. Any workarounds for this ?
Thanks for the response.
Either use PCAN-Basic or UDS is ok at the moment.
But is there a way to do in parallel. ?
Like most of the time, I need the RAW CAN frames, at some intervals (random) I need to get / set the diagnostics data. Any workarounds for this ?
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Read CAN1 messages from ECU
You could run it side by side, but you must be sure that the UDS Session is closed, use RAW CAN Messages , after that start a new UDS Session again. Running at the same time a UDS Session and reading RAW CAN will not work for teh UDS Session (Packages will get lost) - for running both at the same time you need a second CAN Channel.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Read CAN1 messages from ECU
Hello,
Another "not trivial" possibility is to configure UDS to receive raw CAN (a.k.a. UUDT, unacknowledge unsegmened data transfer). For this, you need to know the IDs you want to read and configure address mappings for those. See the parameters PUDS_PARA_MAPPING_ADD and PUDS_PARAM_MAPPING_REMOVE on pages 35 and 36 of the documentation for PCAN-UDS. Also the chapter 4.3 on pages 338 to 334 give more information on this and you have an example of receiving UUDT messages.
The best is to have each API on different channels that are connected to the same . If you only have one device, then you need to do this as my colleague wrote, initialize and use UDS, disconnect it, and then initialize and use PCAN-basic and so on.KiranGS wrote:But is there a way to do in parallel. ?
Another "not trivial" possibility is to configure UDS to receive raw CAN (a.k.a. UUDT, unacknowledge unsegmened data transfer). For this, you need to know the IDs you want to read and configure address mappings for those. See the parameters PUDS_PARA_MAPPING_ADD and PUDS_PARAM_MAPPING_REMOVE on pages 35 and 36 of the documentation for PCAN-UDS. Also the chapter 4.3 on pages 338 to 334 give more information on this and you have an example of receiving UUDT messages.
Best regards,
Keneth
Keneth
Re: Read CAN1 messages from ECU
Thanks for the info. Will work on this.