LIN BUS Component faulty (SOLVED)

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
Chip7882
Posts: 4
http://meble-kuchenne.info.pl
Joined: Wed Feb 17, 2021 8:59 am
Has thanked: 1 time
Been thanked: 1 time

LIN BUS Component faulty (SOLVED)

Post by Chip7882 »

Hi Flowcode team,

I have problems with the LIN bus component. I use a PIC18F25K80.
When I try to send a simple message as a LIN master, it looks like this (see screenshot). There seems to be quite a long break between the individual bytes (20ms). There are also problems if I only send the header to get a response from a slave

Could you help me please?

Best regards
Daniel

Image

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: LIN BUS Component faulty

Post by BenR »

Hi Danial,

Please can you attach your programs and I'll investigate for you.

Chip7882
Posts: 4
Joined: Wed Feb 17, 2021 8:59 am
Has thanked: 1 time
Been thanked: 1 time

Re: LIN BUS Component faulty

Post by Chip7882 »

Hi Ben,

thanks for your quick help.

Here are the files...
Micro_CAN_LIN_test.fcfx
(39.65 KiB) Downloaded 52 times
LIN_TX_Master.PNG
LIN_TX_Master.PNG (77.46 KiB) Viewed 652 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: LIN BUS Component faulty

Post by BenR »

Hello,

It looks like it's working ok but it's waiting a long time for an ack after sending each byte due to a timeout. I'm guessing the slave device isn't connected or isn't responding. If the slave is there then it might start appearing more usual.

The Receive Timeout property doesn't seem to be being used and instead there are timeouts of 10ms everwhere so I can look at this if that would help.

Chip7882
Posts: 4
Joined: Wed Feb 17, 2021 8:59 am
Has thanked: 1 time
Been thanked: 1 time

Re: LIN BUS Component faulty

Post by Chip7882 »

Hi Ben,

You're right. I wasn't aware that every byte is acknowledged. Have now tried it with the slave and it works great. The timeout setting is not a problem. Thank you for your help and the great support!

regards
Daniel

Post Reply