Knowing the status of transmitted messages

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
MrSingh
Posts: 13
Joined: Tue 7. May 2019, 12:00

Knowing the status of transmitted messages

Post by MrSingh » Mon 13. May 2019, 18:13

Hi!

I am transmitting the messages using my PCAN-USB. And looking at the CAN-BUS signal on my YOKOGAWA DLM2054 MSO Osciiloscope.
But it only shows the first CAN message as being transmitted. No matter how I send another message, on different ID or with a different data, unless I reset the bus, the scope does not show the next message. I have to transmit almost 50 messages on different ID, with updating data on each message, in a loop.

Is there a way to know what messages are being transmitted by my PCAN-USB so I can figure out if its the issue of my scope or my code.

Best Regards
Akash

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

Re: Knowing the status of transmitted messages

Post by PEAK-Support » Mon 13. May 2019, 20:29

If you do not have a second active CAN node, no ACK is done for the MSG you send.
And what happened? :arrow: The CAN USB resend the frame again and again and again and again... :idea:
Before your try to debug CAN Layer 1, please read some starter CAN Documents to understand the Basics of CAN.

1. a CAN Network need minimum 2 active CAN Nodes with the same timings.
2. a CAN Network need to be terminated with 120 Ohm on each end of the Network (ISO 11898-2)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

MrSingh
Posts: 13
Joined: Tue 7. May 2019, 12:00

Re: Knowing the status of transmitted messages

Post by MrSingh » Tue 14. May 2019, 00:27

Aha! Thanks a lot!
I did read up on the basics of CAN, but there's not much implementation notes available. Or I may have missed a few important details. Nonetheless, that's how beginners learn.

Although I did terminate the Peak_USB with a 120ohm resistance on an additional breakout board, but as you said the other node needs to be active.

I'm just trying to get the data from CAN on an oscilloscope,but I can only do that by tapping a bus between 2 active nodes? And no other way, right?

MrSingh
Posts: 13
Joined: Tue 7. May 2019, 12:00

Re: Knowing the status of transmitted messages

Post by MrSingh » Tue 14. May 2019, 03:44

The loopback should work for me.

From a post in 2016, https://www.peak-system.com/forum/viewt ... =59&t=1604 loopback functionality was not supported by the PCAN-USB device through the linux-can interface. Is it supported now?

Would you suggest some other way?

Best Regards
Akash

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

Re: Knowing the status of transmitted messages

Post by PEAK-Support » Tue 14. May 2019, 08:27

Without a second real CAN Node , the CAN Controller could not see any ACK of the sended frame.
If you do not want to "simulate" only Software sending, and want to send real CAN Fames (that you could see on the scope), you need a second CAN Channel.
There are thousends of Beginners Tutorials available on the WEB which explain in the first 2 lines that a CAN Network need 2 active nodes. Befoe you try to understand evry Bit on the physical layer, you maybe better read the CAN Basics.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

MrSingh
Posts: 13
Joined: Tue 7. May 2019, 12:00

Re: Knowing the status of transmitted messages

Post by MrSingh » Tue 14. May 2019, 16:31

Got it.
Thanks for your kind words.

MrSingh
Posts: 13
Joined: Tue 7. May 2019, 12:00

Re: Knowing the status of transmitted messages

Post by MrSingh » Tue 14. May 2019, 16:47

Hey Wilhelm

Is it not possible to configure the PCAN for single-shot operation, and disregard the ACK bit completely(Let's say if I can handle to lose the robustness of the bus)?
That's what I keep reading on the other forums.

And any comments on this:
From a post in 2016, https://www.peak-system.com/forum/viewt ... =59&t=1604 loopback functionality was not supported by the PCAN-USB device through the linux-can interface. Is it supported now?

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

Re: Knowing the status of transmitted messages

Post by PEAK-Support » Fri 17. May 2019, 10:02

Loopback mode is not supported - only software loopback - read SocketCAN manual
Single Shot is possible if you change the code in the Linux driver / Firmware - the SJA1000 could handle this (PeliCAN mode) and you find all needed infos in the SJA1000 Data Sheet. Bbut no one use this feature in any real environment - it simple make no sense...
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply