Trouble with using LIN as slave
Trouble with using LIN as slave
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 3513 times
Re: Trouble with using LIN as slave
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
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
Re: Trouble with using LIN as slave
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.
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 3443 times
-
- message and scheduler tab
- PCL.JPG (28.41 KiB) Viewed 9502 times
Re: Trouble with using LIN as slave
Michael, I found an LDF file that corresponds to the heater:
Attachment removed by ADMIN - we do not share commercial files from other customers here !
Attachment removed by ADMIN - we do not share commercial files from other customers here !
Re: Trouble with using LIN as slave
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
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
Re: Trouble with using LIN as slave
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
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 (26.48 KiB) Viewed 9483 times
Re: Trouble with using LIN as slave
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
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
Re: Trouble with using LIN as slave
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 (23.63 KiB) Viewed 9474 times
-
- pg95.JPG (72.71 KiB) Viewed 9474 times
Re: Trouble with using LIN as slave
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
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
Re: Trouble with using LIN as slave
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!
Thank you!