Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't i read lin slave response in xnet

Hello,

 

we have developed a small lin application that starts xnet schedulle and sends master frames and headers.

I am trying to read all the frames on the bus and unfortunately i only see the master frames. The slave headers from master are not filled by the slave.

We are using single point frame approach.

Also, i have observed that when i disconnect the slave from the network, the slave headers are send very fast(as it should be). But when i

 connect the slave, the headers are sent more rare and the payload is not completed by the slave.

The slave is working ok! because we send frames manually without the schedulle and the slave always responded good.

 

Which seems to be the problem?

0 Kudos
Message 1 of 5
(6,388 Views)

It's hard to say, can you post your source?  I've had success with LIN and XNet with signals, but haven't had a need to try frames yet.  My setup is similar to what you described.  I create two sessions for Signals Out Single-Point, and Signals In XY.  Then I have a write LIN Schedule on the Signal Out session selecting a schedule from the database.  Then I write Signal Single-Point on the Signal Output.  Then periodically I read Signal XY using the Signal Input session.  After doing this my read then returns all my signals once every 200ms or so, which is based on the schedule selected.  I've never done frame on LIN but I assume it is similar.

0 Kudos
Message 2 of 5
(6,378 Views)

Hi,

 

in the end i figgure it out:

The problem was we dind't know that the header for the slave is automatically send by the schedule. So we sent it also concluding

in some Lin buss erros due to header overriding.

 

Now it works!

0 Kudos
Message 3 of 5
(6,334 Views)

Hello Flavius,

 

could you please post your code, I try to to exactly the same with no success.

 

Thanks in advance!

 

Madottati

0 Kudos
Message 4 of 5
(5,927 Views)

Hello Madottati,

 

Please see LIN Frame Input Single Point Example in Labview. It will show you how to start a schedule correctly and receive messages. As it is shown in the code you need only to start the schedule and the XNET drivers will do the rest. Also enable the ECHO property by using a session property node. But this is only good if there are no frames you must send. If you need to also send frames, please check the LIN Loopback Test Example and adapt it to your frames. You will see in the example that a single frame is connected to both the input session an the output session. This is not entirely correct. There are frames you write and frames you read. You must use separate constants or controls for the input session and the output session frames. This is how it worked for us.

0 Kudos
Message 5 of 5
(5,910 Views)