Page 1 of 1

Loopback between 2 PCAN-LIN adapters

Posted: Mon 31. Jan 2022, 09:30
by ag1132
Hi,

I am beginner in CAN/LIN communication.
I would like to establish connection between CAN and LIN in Loopback in this way:
1. Send CAN frames from an external device
2. Receive it via PCAN-LIN adapter and then convert it to LIN frames and send to second PCAN-LIN adapter
3. Receive LIN frames with second PCAN-LIN adapter, convert it to CAN frames and send it to external CAN device

Basically I want to receive what I send via CAN frames, but that in between LIN frames are exchanged between two PCAN-LIN adapters.
In this way I can see how your adapter works. I saw that everything is done in "Profile manager" and that I have to set Forward Mask to what I want to use, but
still don't know how to parametrize first PCAN-LIN and how to parametrize second CAN-LIN.

Thank you for support.

Br

Re: Loopback between 2 PCAN-LIN adapters

Posted: Mon 31. Jan 2022, 10:00
by M.Heidemann
Hello,

Have you taken a look at the following thread yet?

viewtopic.php?f=22&t=6457

Also, what's the purpose of your proposed setup?

Best Regards

Marvin

Re: Loopback between 2 PCAN-LIN adapters

Posted: Mon 31. Jan 2022, 10:43
by ag1132
Hi Marvin,

yes, I already look in the file and based on it I parametrize PCAN-LIN CT to see the CAN frames in "Messages and Schedular".
I am not quite sure what of this two PCAN-LIN adapters should be parametrized as master (I assume the fist one) or slave (I assume second one).
I know how to setup slave/master and how to change LIN frames (publisher, subscriber etc.) but don't know how to send exactly the same data which is send from external CAN device.
Actually, I parametrized first PCAN-LIN adapter as a LIN master and set the schedular and was able to see the some default values in "Messages and Schedular" of that first adapter.

I would like to establish loopback connection just to see how this PCAN-LIN CT works, how to parametrize it, to learn about it.

My final goal is to use this adapter to communicate with LIN device using CAN (CAN frames).

Br

Re: Loopback between 2 PCAN-LIN adapters

Posted: Mon 31. Jan 2022, 12:56
by M.Heidemann
Thanks for the feedback.

I hope you are clear about the fact that you can have two LIN-Nodes controlled via CAN messages this way but not replace a CAN-Bus with a stretch
of LIN and relay everything 1:1.

You'll first need to be clear what exactly you want to do, my recommendations regarding this:

1)Check the PDF again, set up up a Master as described in: Using PCAN-LIN as LIN Master controlled by CAN frames
2) Set up a LIN slave as described in the PCAN-LIN CT Help. see chapter "Using a LIN Slave with CAN Updates" in the PCAN-LIN CT Help.

Make sure the frame configuration matches the corresponding direction and frame configuration on the bus.

This way you could send Subscriber frames from Master (via CAN RTR) and also change the response data via CAN on the other side.

You may want to start with configuring one frame first to see if the setup works as you expect and then go from there.

Best Regards

Marvin