Discussion:
troubless in lin network using usb-8476
(too old to reply)
greatwall
2008-07-21 14:10:11 UTC
Permalink
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.
 


LIN Master Send Header Frame Respond and Receive.vi:
http://forums.ni.com/attachments/ni/30/3614/1/LIN Master Send Header Frame Respond and Receive.vi


frontpanel pic.jpg:
http://forums.ni.com/attachments/ni/30/3614/2/frontpanel pic.jpg


telegram.jpg:
Loading Image...
DirkW
2008-07-22 16:10:12 UTC
Permalink
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

body { margin: 0 0 0 0; padding:0 0 0 0 }
td,div { font-family:Tahoma;font-size:8pt;vertical-align:top }
body { margin: 0 0 0 0; padding:0 0 0 0 }
.transcript { background-color:#d2d2d2; }
.messageBlock { margin-left:4px; margin-bottom:3px }
.message { margin-left:100px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre; }
.messageCont { margin-left:100px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre;}
.other { color:#39577a;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.myself { color:#da8103;font-style:normal;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont { font-size:8px;text-align:right; color:#39577a;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.myselfCont { font-size:8px;text-align:right; color:#da8103;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.system { margin-left:4px; word-wrap:break-word;color:#da8103;font-style:normal;font-weight:normal; white-space:-moz-pre-wrap; _white-space:pre; }
.showTimestamp { margin-right:3px; float:right; color:#999999;font-style:normal;font-weight:normal; }
.other1 { color:#ac2000;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont1 { font-size:8px;text-align:right; color:#ac2000;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other2 { color:#3c9fa8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont2 { font-size:8px;text-align:right; color:#3c9fa8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other3 { color:#e25614;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont3 { font-size:8px;text-align:right; color:#e25614;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other4 { color:#0b6ac8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont4 { font-size:8px;text-align:right; color:#0b6ac8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other5 { color:#b23290;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont5 { font-size:8px;text-align:right; color:#b23290;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other6 { color:#02e7c7;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont6 { font-size:8px;text-align:right; color:#02e7c7;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.other7 { color:#5b3284;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; }
.otherCont7 { font-size:8px;text-align:right; color:#5b3284;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; }
.tsDisplay { display:block }


LIN.pdf:
http://forums.ni.com/attachments/ni/30/3619/1/LIN.pdf
greatwall
2008-07-23 09:40:14 UTC
Permalink
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!
 
 
 


LIN Master Send Full Frame and Receive.vi:
http://forums.ni.com/attachments/ni/30/3624/1/LIN Master Send Full Frame and Receive.vi
DirkW
2008-07-23 19:40:05 UTC
Permalink
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


LIN Master Send Full Frame and Receive_modified.vi:
http://forums.ni.com/attachments/ni/30/3628/1/LIN Master Send Full Frame and Receive_modified.vi
greatwall
2008-07-24 06:40:05 UTC
Permalink
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 = 0X3Cdata = 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?????
DirkW
2008-07-24 19:40:06 UTC
Permalink
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
 


LIN Master Send Full Frame and Receive_modified2.vi:
http://forums.ni.com/attachments/ni/30/3632/1/LIN Master Send Full Frame and Receive_modified2.vi
greatwall
2008-07-30 08:10:07 UTC
Permalink
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!
y***@gmail.com
2014-03-17 10:11:35 UTC
Permalink
Post by greatwall
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!
Can you please tell me what was the problem or send you VI? Because i'm trying to send full frames to a slave to receive response based on the labview - LIN Master Send Full Frame and Receive. But i'm not getting any response.
I send a full frame with diagnostic ID (Ox3C)

Loading...