PCAN-LIN Change LIN frame data through serial commands

RS-232 to CAN/LIN Interface
Post Reply
Lid4936
Posts: 3
Joined: Wed 4. Aug 2021, 02:07

PCAN-LIN Change LIN frame data through serial commands

Post by Lid4936 » Wed 4. Aug 2021, 02:25

Hello,

I configured my PCAN-LIN IPEH-002025 as a LIN master and would like to change frame data while a scheduler table is running. Essentially, I want to be able to modify the highlighted part shown in the image below just by sending serial command because I don't have access to the PCAN-LIN configuration tool while the PCAN-LIN dongle is used in some tests.
Capture.PNG
Capture.PNG (40.08 KiB) Viewed 952 times
I looked through the protocol manual and found no such command, the closest commands I found are:
LIN - Set Frame Length
LIN - Set Checksum Type
Neither of them actually modifies the frame data. There is also:
LIN - Set Slave ID + Data Configuration
But I think this only works in slave mode while I am in master mode.

I would appreciate if anyone can point out if I am missing something, because I know the configuration tool can do it and it is using serial commands.

Thanks

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-LIN Change LIN frame data through serial commands

Post by M.Heidemann » Wed 4. Aug 2021, 08:37

Hello,

Please have a look at the following post by my colleague Michael:

viewtopic.php?f=22&t=6457

The post contains a PDF showcasing different scenarios, controlling a LIN-Master
via serial is also covered.

For further questions feel free to contact me again.

Best Regards

Marvin

Lid4936
Posts: 3
Joined: Wed 4. Aug 2021, 02:07

Re: PCAN-LIN Change LIN frame data through serial commands

Post by Lid4936 » Sun 8. Aug 2021, 06:02

Hi Marvin,

Thank you for your help, I read the document you attached and per my understanding, the method described in section 3 of that PDF describes how to send a LIN frame and if it's a publisher frame, will put the lin frame data (say for frame id = 0x1) on the lin bus. However, this is temporary and if I resume a scheduler table I had configured, the data in frame 0x1 will not be the data I just sent? Is there a way to modify the default frame data in the scheduler table as well just like how it is configured in the configuration tool?

Regards

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-LIN Change LIN frame data through serial commands

Post by M.Heidemann » Mon 9. Aug 2021, 09:15

Hello,

Go to "Profiles Managment" and under "LIN" select "Frame-Configuration",
on the right (In the editing Pane) you should see the "Set"-option:
PCAN_LIN_CT_01.png
PCAN_LIN_CT_01.png (11.27 KiB) Viewed 906 times
Clicking "Set" will open up the frame-configuration window, in which you can change
the length, Checksum Type and Direction, you can also set default data by double-clicking the Data-field:
PCAN_LIN_CT_02.png
PCAN_LIN_CT_02.png (32.22 KiB) Viewed 906 times
Is this what you are refering to or did is misunderstood your request?

Please let me know.

best Regards

Marvin

Lid4936
Posts: 3
Joined: Wed 4. Aug 2021, 02:07

Re: PCAN-LIN Change LIN frame data through serial commands

Post by Lid4936 » Tue 10. Aug 2021, 01:52

Hi Marvin,

That is what I am referring but I was wondering if there are ways to do the same thing through serial and not the CT while in master mode (master status can be inactive). Essentially I would like to see if it's possible to edit the default frame data.
I think the lin write data method (through serial) can only write one lin frame but doesn't actually modify the frame data. Please correct me if that's not the case.

Thanks

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-LIN Change LIN frame data through serial commands

Post by M.Heidemann » Tue 10. Aug 2021, 08:59

Hello,

Please have another look at the tutorial provided by my colleague michael,
especially chapter "using PCAN-LIN as LIN Master using the internal Scheduler of PCAN-LIN:"

viewtopic.php?f=22&t=6457

In order to change the data of a running scheduler, you'll use
the "Lin"-interface and the "Set" command-group and command "Set Slave ID + Data Configuration".
with this you can change the data within the scheduler for your publisher frame.
take a look at the example provided in the document.

The "Write" command is not used in that case.

Please let us know if you have further questions.

Best Regards

Marvin

Post Reply