Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

troubless in lin network using usb-8476

Hi,
I am encountering some troubles in using the usb-8476 lin network interface.my software consists of labview 8.2 and can driver for ver 2.5.2. and the usb-8476 interface which is a master within lin network and a car sunroof controller model which is a slave within lin network form the lin network. my task is that diagnosing lin network function of the sunroof controller .I selected the example "LIN Master Send Header Frame Respond and Receive.vi" to do a diagnosise.
If I do a lin diagnostic ,now I am in a pazzle about the items for "arbitrationID for","Data for Respone",and "arbitrationID for header".what do I fill in these items?
whatever I fill in,only when  "arbitrationID for" equal to "arbitrationID for header" ,the the  slave task for Master will read the data as the same as "Data for Response" I filled in.why?
Otherwise,
1,the 'arbitrationID' here is the 'protected Identifer' defined in the Lin specification?
2,"response entry frame","header frame" and "full frame" are "response" ,"header" and "Header + Response "respectively?
3,How I can get the address of the Usb-8476(master) and controller(slave)?
 
I am a new one  in the field of bus technology(e.g. can bus,lin bus ).and I have no enough time to learn in detail now,If I want to diagnose the lin network,what should I do? if I use the example "LIN Master Send Header Frame Respond and Receive.vi" to diagnose.How should I configure the input parameters? and how I do this task step by step?
Give my Best Regards to you first! I need your helps!
 
 
the attechment is vi and the diagnostic telegram.
 
0 Kudos
Message 1 of 21
(16,712 Views)

My guess is that you need to send a full frame to your slave with ID 60. When the slave receives full, it looks at ID, NAD, PCI, SID and determines that it has received a request frame from the master. It should respond by transmitting a full (response) frame. (ID 61).

Thus you could use the LIN Master Send Full Frame and Receive Example, in order to receive the Slave Response Frame.

For the Future, perhaps the LIN spec is hgelpful?

DirkW

0 Kudos
Message 2 of 21
(16,697 Views)
Hi,
thanks for your reply.
My lin network consists of usb-8476 and a lin slave device, and my task is diagnosing the slave device via lin communication. 
first,
I want to diagnose the slave device with two reserved identifiers (0x3C,0x3D).but ,I send the frames,the slave device looks like  no response.so I don't know if my labview program is incorrect. 
the attechment is my labview program.
 
 
Best Regards!
 
 
 
0 Kudos
Message 3 of 21
(16,681 Views)

Hi,

Could you please run the modified example, to see whether or not your slave is answering with the desired dignostic frame. If not, could you double check your cabling and baudrate?

DirkW

0 Kudos
Message 4 of 21
(16,672 Views)
Hi,
thank you again.
the baudrate is matching.(10417),and the cabling is ok too.
 
I write full frame to the lin network .
my Setting:
arbitrationID = 0X3C
data = 6B 06 B2 00 00 00 00 00

 and I read from the lin network:
TimeStemp    │       ID      │    Frame Type  │   Byte   │             Data
────────┼───────┼─────────┼─────┼──────────────────
08:25:04:053  │ 0000003C  │LIN Full Frame │    8      │   6B 06 B2 00 00 00 00 00
 
but whatever I set the arbitrationID and the data, what I read equal to my setting.
 So I think my usb-8476 works OK,but the slave device doesn't work.

Otherwise ,I want to confirm my conception of lin frame transmission. as you said above,if I send a full frame to my slave With ID 60(0X3C),when it receives correctly,it will respond by transmitting a full respone frame with ID 61(0X3D). So I want to know whether or not I must send a header with ID 61 before I receive the full respone  frame by using usb-8476 in order to I can receive a full response frame. on my mind,the full respone frame  consists of  header sent by master and the respone data sent by my slave too. Now I am not clear about the sent sequence of frames with ID 60 and 61(the sequence for header and respones are sent separately ).


帖子被greatwall在07-24-2008 01:18 AM时编辑过了
0 Kudos
Message 5 of 21
(16,667 Views)

Ok, it could be that you have to send the Full Frame and then a header Frame to receive the response. See the attached VI and check this approach.

DirkW

 

0 Kudos
Message 6 of 21
(16,656 Views)

Hi,

thanks for your help.

I have connected USB-8476 with my slave device.

Actually,My softeware is correct. only the diagnostic data I get from somebody else is incorrect. additionally,the ID of response frame should be 0x3D,no 0x7D.

for USB-8476 lin communication ,the arbitrationID is 6-bits identifier,not ID-field.So I should not convert 0x3D into 0x7D.

Best Regards!

0 Kudos
Message 7 of 21
(16,617 Views)

Hello All,

 

I have a follow up question to this thread. I am communicating with a single slave using the USB 8476. The slave is a lin based sensor and is supposed to publish data. From my understanding of LIN, i have to issue a header frame and the slave will then generate the corresponding response. I use the "LIN Master Send Header Frame and Receive.vi" which is shipped with LabVIEW (8.0 in this case). 

 

However, i keep on getting an error frame everytime I click the send header with the necessary arbitration ID (I want to read a frame with ID 0x22). The response is attatched as a screenshot. The first 4 bytes appear to be some kind of an error code. The last byte is always the arbitration ID of the frame (i tried with other IDs which should also generate frames containing data) Also the reponse lengths of these various frames varies. The error response is always 7 bytes or 4 as can be seen.

 

Could anyone please point out what I might be doing wrong. Could anyone also point out what these 4 byte error codes are for?? Are they part of the LIN standard or is it something my slave is sendng. The slave in question is a LIN 2.0 slave.

 

Regards,

Shailesh.

0 Kudos
Message 8 of 21
(16,220 Views)

Hi,

 

You are right the error has a meaning and the explanation can be found in the NI-CAN driver manual. (Chapter 10- page 10-102) .This chapter explains the LIN error codes and the hexC008 error means that the received checksum byte was not correct.

LIN knows two different checksum calculations classic and enhanced. By default the driver uses the classic calculation. It could be that your devices is using the enhanced checksum calculation.

In this case you would need to use the set attribute function call to switch to enhanced checksum calculation(same manual page 10-97)

Another reason could be a bug the driver version 2.4 and 2.5 did in fact calculate the checksum incorrect. In this case an update to a leter version would fix this issue.

The hex1040 error is received when a timeout occurs, in this case for a sync frame.

That could be related to the other error.

 

DirkW

0 Kudos
Message 9 of 21
(16,216 Views)

Hello Dirk,

 

thanks for the reply. 

 

You are right with the checksum error. I came acrooss another post which said that this shows the checksum necessary and the checksum vailable. While LIN 2.0 slaves send enhanced checksums, the VIs use classic checksums. Setting the checksum attribute did the trick.

 

Thanks again,

 

Shailesh.

0 Kudos
Message 10 of 21
(16,214 Views)