Read sent frames

CAN Software API for Windows®. REGARD! This API is out-dated. Please use PCAN-Basic for new software developments.
Locked
XYZABC
Posts: 4
Joined: Wed 16. Aug 2017, 09:19

Read sent frames

Post by XYZABC » Wed 16. Aug 2017, 10:30

Hi, I'm using PCAN-Light API and PCAN-USB interface and I have a problem. I would like to read messages which i will send using my app. Read() function doesn't read it. If I use my app to send message and run parallel PCAN-View, I'll see that message in Receive/Transmit window. I would like to read it also in my app but totally I don't know how to do that (there is no different function other than Read() & ReadEx()). Of course i could redirect it directly by variable but i would like to do this by PCAN-USB interface. I think there are two different buffers - one for read and another one for write messages - so i couldn't read that messages, but if it's true, why your app PCAN-View can see this?

I would be grateful if you could help me to solve this problem.

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

Re: Read sent frames

Post by K.Wagner » Wed 16. Aug 2017, 11:04

Hello,

this is not possible. PCAN-Light and also PCAN-View do not support self-reception, i.e. receiving messages that they self have sent.
Best regards,
Keneth

XYZABC
Posts: 4
Joined: Wed 16. Aug 2017, 09:19

Re: Read sent frames

Post by XYZABC » Wed 16. Aug 2017, 11:12

ok, so how is it possible situation that I see in PCAN-View message which I sent by my app even if I'm not connected to CAN-network - i just have plugged PCAN-USB with terminator to avoid bus heavy error.

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

Re: Read sent frames

Post by K.Wagner » Wed 16. Aug 2017, 11:29

Hello,

because your application and PCAN-View represent each a PCAN client. Since both of them are connected to the same device, then they are in the same CAN network (even if you have no CAN cable connected to the device). IN this way, PCAN-View will read messages that you are sending from your application, and your application should read the messages you send using PCAN-View. Here an extract of the help (Additional Information/PCAN Basics):
Clients connection
Clients connection
Net.PNG (21.91 KiB) Viewed 9335 times
With the red line I want to highlight the "implicit" CAN connection between the applications.

By the way, PCAN-Light is actually a deprecated API. You should upgrade your project(s) to PCAN-Basic, if possible.
Best regards,
Keneth

XYZABC
Posts: 4
Joined: Wed 16. Aug 2017, 09:19

Re: Read sent frames

Post by XYZABC » Wed 16. Aug 2017, 11:44

Ok, I understand. But do you can tell me does it is possible to create two different clients using one app? I'm using a different thread to read and different to write so maybe I could do this? I wrote my app in c++ with wxwidgets gui. About upgrading to PCAN-Basic - i'll have to do this but it's not my priority right now (if this will be necessary to add features then I'll do this).

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

Re: Read sent frames

Post by K.Wagner » Wed 16. Aug 2017, 11:59

No. This is a limitation of the "fee free" APIs.

You can connect a device only once at a time using PCAN-Light, no matter if this is tried from one or from several applications.

If you want to connect several applications/clients to the same hardware, or if you want to receive your own sent messages, then you have to acquire the PCAN-Developer package.
Best regards,
Keneth

XYZABC
Posts: 4
Joined: Wed 16. Aug 2017, 09:19

Re: Read sent frames

Post by XYZABC » Wed 16. Aug 2017, 12:05

Ok, thank you very much for your help. Now I know everything.

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

Re: Read sent frames

Post by PEAK-Support » Fri 18. Aug 2017, 16:41

closed
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Locked