From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of communication lin

Hello Guys ,

 

I am working with ni usb lin 8476 and i want to run some functionality on an lin product by sending frames to that product using the demo application of labview "Lin master send full frame and receive" .But the problem is that whenever i send any frame the responce in always" LIN BUS inactive",i verify the connection of the ni usb 8476 and it is correct , what that should be the problem ?

Please I need your help Smiley Indifferent 

 

0 Kudos
Message 1 of 8
(9,840 Views)

Hi Mad,

 

How do you have your LIN bus configured?

1. LIN 1.3 or 2.0?

2. Baud Rate?

3. LIN configured as Master in MAX?

4. Is the bus correctly powered? I would receive the "Bus Inactive" error when I wasn't using a CAN Breakout box to connect my cables between two 8476's in order to properly power the bus.

 

Do any of the other LIN Master examples work from the LabVIEW example finder? Do you have another LIN USB device you can do a loopback test with?

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 2 of 8
(9,806 Views)

Hi Joey,

 

1. LIN 1.3 or 2.0?

 

 

=>it's 2.0.

 

2. Baud Rate?

 

=>19200 bps.

 

3. LIN configured as Master in MAX?

 

 

=> How to configure it there is 2 choice bus monitor and properties and it never specify how to use lin usb device??

 

 

4. Is the bus correctly powered? I would receive the "Bus Inactive" error when I wasn't using a CAN Breakout box to connect my cables between two 8476's in order to properly power the bus.

 

=>Yes i the bus is powred correctly,in fact i can run another communication protocol on the product .

I tried the other example on labview and it's the same results ,i am blocked now Smiley Sad

 

 

0 Kudos
Message 3 of 8
(9,783 Views)

I actually would expect that from this VI. The LIN BUS inactive means that you waited >= 4 seconds after transmitting a frame before transmitting a subsequent frame. That is defined by the LIN spec.

 

If you want to be able to write AND read from your device, you may consider LIN Master Send Header Frame Respond and Receive. This will send headers. If you "Update LIN Reponse Entry Frame", then send the ID, you will write to your slave. If you don't update the response entry frame, then you will send the header and a slave would responds. You still have the 4 second period and in a real applicaiton you would probably want to create a cycilc rate to schedule your frames like a typical LIN bus.

0 Kudos
Message 4 of 8
(9,778 Views)

Hi everyone,

I'm new to Labview and LIN-Bus and seem to encounter the same problem as mad_madridista.
I read the LIN-Spec, the Hardware Manual and a lot of threads but it's getting more and more confusing. So I thought this could become a kind of "First-Steps-with-8476-Module-for-LIN-and-LV-Newbies-Thread"?

The situation is as follows:
I want to use a 8476-module and Labview 2013 to communicate with a product

 

The module is connected (via USB) and recognized by MAX. I assigned Port: LIN0 and Baudrate: 19200 (as specified for the product).

 

The connector of product has the following pins:

  • 12 V plus potential
  • 12 V ground
  • LIN
  • Interlock in
  • Interlock out

I connected the 12V+ to VBat; the 12V- to both ground Pins and LIN to LIN. Also I connected a 12V-power supply (5A max) to the 12V+ and 12V-. So the first question is: is this it? Here it seems like some resistors and diodes need to be added; but as I read it from the NI-CAN Hardware and Software Manual, 4-26, this isn't needed on NI USB-Lin products.

 

I'm assuming that everything is correct by the means of hardware and will proceed.

I want the 8476 (or more specifically the .vi) to be the master, because I want to control the product. My understanding is, that this is possible with the example .vi's (e.g. LIN Master Send Full Frame and Receive.vi), by simply sending an ID (or more correctly: a Frame Header) to the BUS and having my product react to it. Is it that simple?

I had an ldf coming with the product, where the frames and signals are described:

 

LIN_description_file;
LIN_protocol_version = "2.0";
LIN_language_version = "2.0";
LIN_speed = 19.2 kbps;
Nodes {
	Master: PC, 5 ms, 0.2 ms;
	Slaves: ..., HEIZER;
}
Signals {
...
	Geraet_ein: 1, 0, PC, GERAET;
...
	Temp_Sensor: 8, 254, GERAET, PC;
...
}
Diagnostic_signals {
...
}
Frames {
...
	Ger_01: 28, PC, 4 {
...
		Geraet_ein, 8;

	Ger_02: 48, GERAET, 8 {
...
		Temp_Sensor, 48;
...
}
...
}
}
Diagnostic_frames {
...

Node_attributes { ... GERAET { LIN_protocol = 2.0; configured_NAD=0x5F; product_id=0x0006, 0x0000, 0x00; response_error =Geraet_ResponseError; P2_min = 10 ms; ST_min = 10 ms; configurable_frames { Ger_01 = 0x401C; Ger_02 = 0x4030; } } } Schedule_tables { main { Ger_01 delay 10 ms; ... Ger_02 delay 10 ms; ... } } Signal_encoding_types { ... Temp_Sensor_encoding { logical_value, 254, "Init"; logical_value, 255, "Fehler"; physical_value, 0, 220, 1, -50, "Unit_DegreCelsi"; } ... HZ_Off_On { logical_value, 0, "Aus"; logical_value, 1, "Ein"; } } Signal_representation { ... Temp_Sensor_encoding: Temp_Sensor ... HZ_Off_On: Geraet_ein ... }


In order to read "Temp_Sensor" my assumption was that I need to send the Header-ID "48" to the BUS because of

 

 

Frames {
    Ger_02: 48, GERAET, 8 {

With "LIN Master Send Header Frame an Receive.vi" it seems possible to "Write Header Frame", but the problem starts with the fact, that It won't accept the "ArbitrationId: 48". Then I thought this might be hexadecimal, and with "ArbitrationId: 30" there is something happening (see screenshot), but I'm still getting no response from the slave.

So, I hope somebody could tell me where I am going wrong!
Thanks!

0 Kudos
Message 5 of 8
(7,919 Views)

Hello taka87,


Please post your question in a new thread. Keeping each thread focused on one questions makes it easier for the community to provide answers and allows users to search the forums for answers and guidelines to resolve their issues more effectively. 


Regards,


j_bou

0 Kudos
Message 6 of 8
(7,887 Views)

Dear,

I meet a problem about LIN8476 application, which needs to send raw data.

Customers just told me that it should send bellow format,

Send low byte: < sync_break ><0x55><0x85><Low Byte><checksum>

and refer to

http://www.ni.com/white-paper/9733/zhs/

But now I just have access to use examples which use frame, and it's different with raw data.

so how can I solve this?

 

Hope your suggestions, thanks!

Lookfor

 

0 Kudos
Message 7 of 8
(4,022 Views)

Dear Joey S.

 

Could you pls provide some suggestions/examples that solutions for sending raw data by LIN8476?

It seems hard for me to find correct examples in LabVIEW LIN module.

http://www.ni.com/white-paper/9733/zhs/

Our customer request me that it should send frame such as

"Send low byte: < sync_break ><0x55><0x85><Low Byte><checksum>"

but my side just have examples as attached pictures show, it quite different with raw data.

so how can I solve this?

Hope your suggestions.

Thanks

Lookfor

0 Kudos
Message 8 of 8
(4,020 Views)