Trouble with using LIN as slave

RS-232 to CAN/LIN Interface

Trouble with using LIN as slave

Postby JA2092 » Fri 11. Jan 2019, 21:52

Hello, I'm currently trying to communicate with a high voltage heater that uses the LIN protocol as an interface. I am testing communication and am trying to send a message via CAN but am not receiving any message either on the PCAN-LIN CT software or on PCAN-view. The only message I receive on PCAN-View is an error message, 2 bytes long: 0x0FFF, and it occurs right after I configure the module to the current profile settings. Not sure what those two bytes represent, but the only way I know it's some sort of error message is because the CAN ID matches the CAN error ID in the profile. Attached is project I'm working on. The CAN ID I'm using is 0x278, offset of 0x200, thus the LIN ID is 0x38.
Attachments
newTest.pclin
(43.23 KiB) Downloaded 59 times
JA2092
 
Posts: 6
Joined: Fri 11. Jan 2019, 21:30

Re: Trouble with using LIN as slave

Postby M.Maidhof » Mon 14. Jan 2019, 14:49

Hi,

do you want to use the PCAN-LIN as CAN to LIN gateway (LIN master) or do you just want to see the LIN traffic from an existing LIN system on CAN? Do you have a ldf of that system?

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1153
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Trouble with using LIN as slave

Postby JA2092 » Mon 14. Jan 2019, 16:11

Michael,
Thank you for your response. I don't have the LDF file for the system but I realized that I want to use LIN as a master. I think I am able to see the CAN frames initiate the transmission of LIN frames, but I'm not getting a response to messages I'm sending. Attached is an image of the message/scheduler TAB, and the project with current settings.

Thank you for your help.
Attachments
linMaster.pclin
(43.6 KiB) Downloaded 48 times
PCL.JPG
message and scheduler tab
PCL.JPG (28.41 KiB) Viewed 431 times
JA2092
 
Posts: 6
Joined: Fri 11. Jan 2019, 21:30

Re: Trouble with using LIN as slave

Postby JA2092 » Mon 14. Jan 2019, 20:09

Michael, I found an LDF file that corresponds to the heater:
Attachments
Webasto_HVH100 B2sample_V3.ldf
(8.73 KiB) Downloaded 49 times
JA2092
 
Posts: 6
Joined: Fri 11. Jan 2019, 21:30

Re: Trouble with using LIN as slave

Postby M.Maidhof » Tue 15. Jan 2019, 10:21

Hi,

attached the new configuration file, where I have set the values to your ldf settings and activated the scheduler in PCAN-LIN. As soon as you will downlaod the file to the PCAN-LIN it will send the subscriber frames 0x0C (12) and 0x30 (48) and will also send the publisher frame 0x1C (28) with all data set to 0x00. If you want to change the default data, you can modify the frame config for 0x1C. If you want to change the data by CAN, please send an ID 0x5C (0x1C+0x40) with 4 databytes by CAN. The 4 bytes will than be used as publisher data for 0x1C on the LIN.

Next, please don´t send emails to our support team and post the same issue in the forum. This will just double our work and will not speedup anything!

regards

Michael

Heater_PCAN-LIN_01.pclin
(44.38 KiB) Downloaded 55 times
M.Maidhof
Support
Support
 
Posts: 1153
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Trouble with using LIN as slave

Postby JA2092 » Tue 15. Jan 2019, 15:40

Thank you Michael, I apologize. I downloaded the project and attached is the result, I'm getting warning message.
Also, I am seeing data from the subscriber 0x30, but only if I use a scheduler, if not I don't get a response. Is there a way to communicate the the device without using the scheduler? Thank you
Attachments
Captur2e.JPG
Captur2e.JPG (26.48 KiB) Viewed 412 times
JA2092
 
Posts: 6
Joined: Fri 11. Jan 2019, 21:30

Re: Trouble with using LIN as slave

Postby M.Maidhof » Tue 15. Jan 2019, 18:10

Hi,

yes, you can also disable the scheduler in the config and use rtr CAN frames to get the subscriber data.

in your case send publisher data with a normal CAN message:

0x1C len 4 0xXX 0xXX 0xXX 0xXX (you have to send data which makes sense for your heater!)

send subscriber frames on LIN by using rtr CAN messages (while scheduler is off):

0x30 len 8 rtr
0x0C len 8 rtr

BTW: wondering why your heater doesn´t respond on ID 0x0C as listed in the ldf

best regards

Michael
M.Maidhof
Support
Support
 
Posts: 1153
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Trouble with using LIN as slave

Postby JA2092 » Wed 16. Jan 2019, 16:05

Great, it works, thanks! Another quick question: how does the attached image on page 95 relate to communicating via CAN. I had originally thought that this was the method to send rtr messages, instead of selecting the rtr checkbox on PCAN-View (image also attached). Can you please clarify? Thank you
Attachments
H_PCView.JPG
H_PCView.JPG (23.63 KiB) Viewed 403 times
pg95.JPG
pg95.JPG (72.71 KiB) Viewed 403 times
JA2092
 
Posts: 6
Joined: Fri 11. Jan 2019, 21:30

Re: Trouble with using LIN as slave

Postby M.Maidhof » Thu 17. Jan 2019, 10:12

Hi,

please distinguish between serial commands and CAN commands! Page 95 of the serial protocol definitions will show you how to handle serial commands to the PCAN-LIN.

regards

Michael
M.Maidhof
Support
Support
 
Posts: 1153
Joined: Wed 22. Sep 2010, 13:00
Location: Darmstadt, Germany

Re: Trouble with using LIN as slave

Postby JA2092 » Mon 21. Jan 2019, 21:11

Thank you, Michael. Is it possible to get subscriber frames with out using a RTR? Like using the diagnostic frames (0x3C, 0x3D)? If possible how would these messages be sent?

Thank you!
JA2092
 
Posts: 6
Joined: Fri 11. Jan 2019, 21:30

Next

Return to PCAN-LIN



This website uses cookies for analytics, for logins to the online shop and the forum, and for the handling of an order. By browsing this website you agree to the use of cookies. Detailed information on their use can be found in our privacy policy.

OKPrivacy Policy