Transmit LIN Message usig CAN with 8 bytes

RS-232 to CAN/LIN Interface
Post Reply
jptalledo
Posts: 3
Joined: Fri 18. May 2012, 21:46

Transmit LIN Message usig CAN with 8 bytes

Post by jptalledo » Mon 6. Aug 2018, 17:11

Hello

Need help sending 4 and 8 bytes payload using a CAN Message to LIN. Currently I am able to send only 2 bytes payload from CAN to LIN. I changed the address to be from 0x20 to 0x2f for 4 bytes and from 0x30 to 0x3f for 8 bytes without success.

Do I need to change something on the LIN or CAN configuration.

Please advise

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

Re: Transmit LIN Message usig CAN with 8 bytes

Post by M.Maidhof » Tue 7. Aug 2018, 13:31

Hi,

please send us your configuration (*.pclin) and also an info about the CAN message you send to the PCAN-LIN, to be able to help you with your problem. Is there a scheduler active on the PCAN-LIN?

regards

Michael

jptalledo
Posts: 3
Joined: Fri 18. May 2012, 21:46

Re: Transmit LIN Message usig CAN with 8 bytes

Post by jptalledo » Tue 7. Aug 2018, 21:04

the message I see on the LIN bus during normal operation is ID 0, data 0x00, 0x54, 0x26, 0x22, 0x00 ,0x30, 0x1B, 0x97. this appears to be seven bytes of data and a checksum. the message does not appear on the CAN side but i believe it generates a checksum error on the LIN-CAN module. For LIN 2.0 the spec says ID 0 is should have two bytes of data so I think it uses the third byte 0x26 as a checksum and fails.

When I try to generate it from CAN to LIN I send ID = 0x100, with CAN id off set of 0x100, and data of 0x00, 0x54, 0x26, 0x22, 0x00 ,0x30, 0x1B, 0x97. The LIN message is ID 0x00 with data of 0x00, 0x54 and a checksum. if I change the ID to 0x130 it still only sends two bytes.

when sending the message ID 110, 0x05, 0x01 from CAN the LIN message looks ok.

when configured as a master the message appears on the LIN bus as a complete message.
Attachments
Master scheduler.pclin
(33.55 KiB) Downloaded 628 times
CAN forward.pclin
(32.99 KiB) Downloaded 648 times

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

Re: Transmit LIN Message usig CAN with 8 bytes

Post by M.Maidhof » Wed 8. Aug 2018, 09:46

Hi,

please set the frame configuration for ID 0x00 to 8 bytes and subscriber and disable the scheduler, to be able to forward a CAN message from CAN to LIN. If you want to work with an active scheduler in PCAN-LIN, you have to add 0x40 + CAN ID offset to the CAN message so that the publisher data will be changed by CAN. See help of PCAN-LIN CT for more details on how to do publisher data update by CAN.

regards

Michael

Post Reply