Receiving data from lin device using RS232
-
- Posts: 10
- Joined: Wed 13. Jan 2016, 13:58
Receiving data from lin device using RS232
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
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
- Attachments
-
- ln.png (9.55 KiB) Viewed 7328 times
Re: Receiving data from lin device using RS232
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
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
-
- Posts: 10
- Joined: Wed 13. Jan 2016, 13:58
Re: Receiving data from lin device using RS232
Hi Michael, thank you for fast feedback.M.Maidhof wrote: ↑Wed 18. Nov 2020, 15:21Hi,
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
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
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
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
-
- Posts: 10
- Joined: Wed 13. Jan 2016, 13:58
Re: Receiving data from lin device using RS232
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 ?M.Maidhof wrote: ↑Thu 19. Nov 2020, 08:16Hi,
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
yes, and keep the timing as it is specified in the scheduler definition of your ldf.
regards
Michael
regards
Michael
-
- Posts: 10
- Joined: Wed 13. Jan 2016, 13:58
Re: Receiving data from lin device using RS232
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
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
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
-
- Posts: 10
- Joined: Wed 13. Jan 2016, 13:58
Re: Receiving data from lin device using RS232
How do i get ldf file from the device?
Please find config of pcan-lin module in attachment
- Attachments
-
- cfg.pclin
- (43.47 KiB) Downloaded 2213 times
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Receiving data from lin device using RS232
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
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
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team