Message delivery on to CAN bus

Forum for the PCANBasic .NET Assembly Beta-Package containing
the PCANBasic-Assembly developed in .NET-Standard.
Post Reply
Deepti Nimmagadda
Posts: 3
Joined: Sun 12. Dec 2021, 12:20

Message delivery on to CAN bus

Post by Deepti Nimmagadda » Sun 12. Dec 2021, 12:28

Hi.

We are making an application where we need to know whether a message we send ends up on the bus. The status err_ok means that the message has been placed in Transmit queue but not that it has been transmitted, or at least that's what we observed when we tried our code. We are currently using PCAN basic as our API.
Is knowing, if message has been transmitted on to the bus, possible? If not, is it possible to know if the transmit queue already has a message in it?

Thank you in advance.

M.Heidemann
Sales & Support
Sales & Support
Posts: 786
Joined: Fri 20. Sep 2019, 13:31

Re: Message delivery on to CAN bus

Post by M.Heidemann » Mon 13. Dec 2021, 09:19

Hello,

As PCANBasic does not feature a self-receive this
could be done by reading the traffic on the bus with a second channel, if the message is on the bus you will be able to read it.

"Is knowing, if message has been transmitted on to the bus, possible? If not, is it possible to know if the transmit queue already has a message in it? "

As mentioned before, you could readon the bus with a second channel, there is no way to query the queue for messages.

Best Regards

Marvin

Deepti Nimmagadda
Posts: 3
Joined: Sun 12. Dec 2021, 12:20

Re: Message delivery on to CAN bus

Post by Deepti Nimmagadda » Mon 13. Dec 2021, 10:09

Hello

Good morning!
Okay. Thank you for the response.

I know that PEAK also offers a PCAN developer API. Does this API contain the self-receive feature? I know this is a PCAN Basic forum but please share your thoughts.

Thanks and Regards
Deepti

M.Heidemann
Sales & Support
Sales & Support
Posts: 786
Joined: Fri 20. Sep 2019, 13:31

Re: Message delivery on to CAN bus

Post by M.Heidemann » Mon 13. Dec 2021, 11:16

Hello,

I have to correct myself, sorry.

The newest version of PCANBasic (4.6.0, released on 10/12/2021) includes the Parameter "PCAN_ALLOW_ ECHO_FRAMES",
which allows you to echo the transmit messages back onto your channel:

https://www.peak-system.com/fileadmin/m ... -basic.zip

See the parameter documentation regarding this:
Allow_Echo_Frames.png
Allow_Echo_Frames.png (184.34 KiB) Viewed 1448 times
Best Regards

Marvin

Deepti Nimmagadda
Posts: 3
Joined: Sun 12. Dec 2021, 12:20

Re: Message delivery on to CAN bus

Post by Deepti Nimmagadda » Mon 13. Dec 2021, 11:38

Hello Marvin,

Thank you for letting me know about the new version of PCAN Basic API (4.6.0). It is very fortunate that this new release coincided with what we needed.
I am going through the documentation now.

Thank you for your support!

Thanks and Regards
Deepti

Post Reply