Diagnostics on LIN
Posted: Tue 5. Nov 2024, 10:02
Hello,
I try to set up an UDS diagnostic tool using PLIN. I know diagnostics well, but I have some troubles to program it with PLIN.
I can't find any example how to do it, so I do try and error:
- RegisterClient
- SetFrameEntry using FrameId 0x3C as Publisher
- SetFrameEntry using FrameId 0x3D as Subscriber
- SetSchedule for MasterRequest, Delay=20 ms, the only FrameID is 0x3C; ScheduleNumber=0
- SetSchedule for SlaveResponse, Delay= 20 ms, the only FrameID is 0x3D; ScheduleNumber=1
- InitHardware
- Write a MasterRequestFrame --> this will be physically sent
- StartScheduler 1 --> I expect to see at least the frame headers sending, it does, but always with 16 seconds delay
There must be somethig wrong with Delay at calling SetSchedule.
How should ist basically work? Do I need to StartSchedule=0 before I send a request and StartSchedule=1 after a sent request, expecting response?
Is there any example code available?
Gyula
I try to set up an UDS diagnostic tool using PLIN. I know diagnostics well, but I have some troubles to program it with PLIN.
I can't find any example how to do it, so I do try and error:
- RegisterClient
- SetFrameEntry using FrameId 0x3C as Publisher
- SetFrameEntry using FrameId 0x3D as Subscriber
- SetSchedule for MasterRequest, Delay=20 ms, the only FrameID is 0x3C; ScheduleNumber=0
- SetSchedule for SlaveResponse, Delay= 20 ms, the only FrameID is 0x3D; ScheduleNumber=1
- InitHardware
- Write a MasterRequestFrame --> this will be physically sent
- StartScheduler 1 --> I expect to see at least the frame headers sending, it does, but always with 16 seconds delay

How should ist basically work? Do I need to StartSchedule=0 before I send a request and StartSchedule=1 after a sent request, expecting response?
Is there any example code available?
Gyula