Page 1 of 1

LIN (master) to CAN data convertion

Posted: Fri 21. Aug 2020, 09:19
by Redin_NA
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?

Re: LIN (master) to CAN data convertion

Posted: Fri 21. Aug 2020, 12:16
by M.Maidhof
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

Re: LIN (master) to CAN data convertion

Posted: Mon 24. Aug 2020, 09:31
by Redin_NA
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 4349 times

Re: LIN (master) to CAN data convertion

Posted: Mon 24. Aug 2020, 10:38
by M.Maidhof
Hi,

you have set the forward mask to "No Forwarding", so you will see nothing on CAN or Serial!
forward.JPG
forward.JPG (48.91 KiB) Viewed 6580 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 6580 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.94 KiB) Viewed 6580 times
regards

Michael