LIN (master) to CAN data convertion

RS-232 to CAN/LIN Interface
Post Reply
Redin_NA
Posts: 8
Joined: Mon 10. Feb 2020, 14:44

LIN (master) to CAN data convertion

Post by Redin_NA » Fri 21. Aug 2020, 09:19

I have PCAN-LIN adapter. It's chould configured as LIN master with forwarding messages to CAN.
I can't find any functionality in PCAN-LIN CT to convert the data received from LIN for transmission to the СAN.
Is there a way to convert the data on the fly or PCAN-LIN can only forward the data field?

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: LIN (master) to CAN data convertion

Post by M.Maidhof » Fri 21. Aug 2020, 12:16

Hi,

to forward messages from LIN to CAN you have to set the forward mask accordingly. If the PCAN-LIN will be the master, you must also setup a scheduler, or send the master requests by CAN (rtr) to have a working LIN communication. If you just want to use the PCAN-LIN as a pure listener on the LIN (when a LIN master already exists) which should forward the LIN messages to CAN, you have to configure it as LIN slave. For both modes you have to set the frame config (length code and checksum type) to the needed LIN specification of your LIN system.

It will also be helpfull to see your configuration file.

regards

Michael

Redin_NA
Posts: 8
Joined: Mon 10. Feb 2020, 14:44

Re: LIN (master) to CAN data convertion

Post by Redin_NA » Mon 24. Aug 2020, 09:31

PCAN-LIN module should be configured as master to sent LIN header, then response should be forward to CAN.
For me interesting data field (response).
As far as I understand data just exchanged between LIN and CAN modules and there is no way to put data conversioninto the firmware (for example, rearrange bytes in a different order).
At least I haven't found such function in PCAN-LIN CT. Is it so?
Is there another way to make firmware (may be development packege like PCAN-Router)?
My configuration file
PCAN-LIN_v.1.pclin
(43.22 KiB) Downloaded 4047 times

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: LIN (master) to CAN data convertion

Post by M.Maidhof » Mon 24. Aug 2020, 10:38

Hi,

you have set the forward mask to "No Forwarding", so you will see nothing on CAN or Serial!
forward.JPG
forward.JPG (48.92 KiB) Viewed 5471 times
Next, please check that your LIN ID 0x23 really uses classic checksum (LIN 1.x) and that it has a byte length of 4 as it is set in the frame config of PCAN-LIN CT:
frameconfig.JPG
frameconfig.JPG (84.01 KiB) Viewed 5471 times
It is possible to change publisher data while the PCAN-LIN Scheduler is active. See help of PCAN-LIN CT to see how to change publisher data by CAN using the 0x40 CAN ID offset:
PCAN-LIN-CT Help.JPG
PCAN-LIN-CT Help.JPG (193.95 KiB) Viewed 5471 times
regards

Michael

Post Reply