Page 1 of 2

Receiving data from lin device using RS232

Posted: Wed 18. Nov 2020, 11:26
by rollinstone
Hello,
i'm using pcan-lin gateway to communicate with carseat. Frames are sent from PLC through rs interface to PCAN-Lin device.

All the commands that i'm sending to start executive elements are working, but i'm not able to receive response frame from the device.

i'm sending 02 09 81 31 53 00 03 80 00 00 00 00 69
where
02 - stx
09 - frame length + 1
81 - CC
31 - frame id
53 00 03 80 00 00 00 00 - frame
69 - checksum

Expected response should be frame consisting of 2 bytes, with id 0B
instead - all i receive is frame "02 01 00 01" which according to PEAK docummentation means "Positive Response"

Lin config in attachment

Re: Receiving data from lin device using RS232

Posted: Wed 18. Nov 2020, 15:21
by M.Maidhof
Hi,

as a LIN master, you must also send the subscriber frame, so that your LIN slave could answer to it. Check that the frame config for ID 0x0B is set to subscriber, and send a subsciber frame for 0x0B through the following command: 0x02 0x21 0x81 0x8B 0x2B

regards

Michael

Re: Receiving data from lin device using RS232

Posted: Thu 19. Nov 2020, 07:00
by rollinstone
M.Maidhof wrote:
Wed 18. Nov 2020, 15:21
Hi,

as a LIN master, you must also send the subscriber frame, so that your LIN slave could answer to it. Check that the frame config for ID 0x0B is set to subscriber, and send a subsciber frame for 0x0B through the following command: 0x02 0x21 0x81 0x8B 0x2B

regards

Michael
Hi Michael, thank you for fast feedback.
Just to make it clear - i'm suppose to send 02 21 81 8B 2B frame instead of 02 09 81 31 53 00 03 80 00 00 00 00 69? Or should i send them alternately?

Re: Receiving data from lin device using RS232

Posted: Thu 19. Nov 2020, 08:16
by M.Maidhof
Hi,

as a LIN Master you must send publisher and subscriber frames. So you must send both, if you like to get data from your connected LIN slave. Take care that you have set the correct checksum type and length code in the frame config, which fits to your LIN slave. Details can be found in the ldf file of your LIN node.

regards

Michael

Re: Receiving data from lin device using RS232

Posted: Thu 19. Nov 2020, 09:29
by rollinstone
M.Maidhof wrote:
Thu 19. Nov 2020, 08:16
Hi,

as a LIN Master you must send publisher and subscriber frames. So you must send both, if you like to get data from your connected LIN slave. Take care that you have set the correct checksum type and length code in the frame config, which fits to your LIN slave. Details can be found in the ldf file of your LIN node.

regards

Michael
Thank You. So i suppose if i'm sending frames form PLC through rs232 interface - i have to switch between these two frames? one cycle i send 02 09 81 31 53 00 03 80 00 00 00 00 69 and next cycle 02 21 81 8B 2B ?

Re: Receiving data from lin device using RS232

Posted: Thu 19. Nov 2020, 11:11
by M.Maidhof
yes, and keep the timing as it is specified in the scheduler definition of your ldf.

regards

Michael

Re: Receiving data from lin device using RS232

Posted: Fri 27. Nov 2020, 08:09
by rollinstone
M.Maidhof wrote:
Thu 19. Nov 2020, 11:11
yes, and keep the timing as it is specified in the scheduler definition of your ldf.

regards

Michael
Hello,

i tried to send both my frame with id 31 with subscriber frame, but i did not get confirmation of pushing any button at the carseat
when i was sending frame 31 - i've received answer which i've mentioned before so it was 02 01 00 01, when subscriber frame was sent - i've received "02 21 00 21" - no matter what i've pressed at the carseat

Re: Receiving data from lin device using RS232

Posted: Fri 27. Nov 2020, 13:07
by M.Maidhof
Hi,

with the given info, we can't help you. Please provide the ldf of your system and the configuration of your PCAN-LIN module, to see if the configurations fits to your LIN device.

regards

Michael

Re: Receiving data from lin device using RS232

Posted: Fri 27. Nov 2020, 13:13
by rollinstone
M.Maidhof wrote:
Fri 27. Nov 2020, 13:07
Hi,

with the given info, we can't help you. Please provide the ldf of your system and the configuration of your PCAN-LIN module, to see if the configurations fits to your LIN device.

regards

Michael
How do i get ldf file from the device?
Please find config of pcan-lin module in attachment

Re: Receiving data from lin device using RS232

Posted: Fri 27. Nov 2020, 14:59
by M.Heidemann
Hello,

Thank your for providing the configuration file.

The LIN Description File (LDF) is an text file supplied by manufacturer and contains information about publishers and subscribers, signals and frames, in short a description of the LIN-network.

This file may be obtained from the manufacturer of the LIN-node (car seat).

For further questions feel free to contact me again.

Best Regards

Marvin