Read sent frames
Read sent frames
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.
I would be grateful if you could help me to solve this problem.
Re: Read sent frames
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.
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
Keneth
Re: Read sent frames
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.
Re: Read sent frames
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):
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.
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):
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
Keneth
Re: Read sent frames
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).
Re: Read sent frames
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.
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
Keneth
Re: Read sent frames
Ok, thank you very much for your help. Now I know everything.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Read sent frames
closed
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------