Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change the checksum of a LIN frame with XNET?

I need to verify the functionality of my part when it receives a bad LIN frame, for example when the checksum is incorrect.

 

Does XNET allow me to change checksum and other parts of the LIN frame?

0 Kudos
Message 1 of 11
(9,552 Views)

Hello,

 

XNET can be used to write frames using the LIN frame format. You can create your own payload for the LIN Frames being sent out on the network.

 

Regards,

Danny F

Danny Funk -- Senior Group Manager -- Software R&D -- NI
0 Kudos
Message 2 of 11
(9,537 Views)

It sounds like the answer is no, then, because the checksum is outside of the payload.

0 Kudos
Message 3 of 11
(9,532 Views)

That is correct. The only parts of the frame that you can control through the API are the payload(Data) and the Identifier. The checksum is handled at the lower level by the driver. You can perform error checking though by using the XNET Read (State LIN Comm).vi then "Last Error" in the output cluster will be 6 if the checksum was different than expected.

Danny Funk -- Senior Group Manager -- Software R&D -- NI
0 Kudos
Message 4 of 11
(9,525 Views)

Hmmm can I change the driver then to do the low level things?

 

Right now I'm trying to move as much testing as possible to PXI Real-Time chassis using VeriStand.   I would prefer not to require another test system to do these low level LIN tests, but if the NI equipment is not capable then I will have no choice but to go with something more complete.

0 Kudos
Message 5 of 11
(9,522 Views)

Can you provide your ideal API/feature set?

 

1) Would you like to be able to set a property for a particular frame to change how the checksum is generated (classic vs enhanced)?

2) Woud you like this property to be perpetual (until set again) or revert after N frames?

3) Would you rather be able to provide a totally different checksum with each frame (i.e., you calculate the checksum manually always?)

4) What do you expect on the receiving end? Or is your receiving end an ECU under test?

 

Are there other fault insertion requirements for LIN that you have?

 

0 Kudos
Message 6 of 11
(9,515 Views)

The benchmark would be Vector's CANoe.LIN tool and they're CAPL programming language.  Those tools give me the flexibility and the ease of use I need, and I will be using them for this particular test because it needs to be done soon.  I would still prefer to use NI tools in the future if they can handle the tasks I need to do.

 

Here are the answers to your numbered questions.

 

1)  That is not the test I'm trying to create but the more flexibility the better.

 

2)  Again more flexibility is better, but if I have to choose I would prefer for the checksum change to be perpetual and easy to turn off.

 

3)  Yes, that is the test I'm trying to create.

 

4)  My ECU will be on the receiving end of the incorrectly formatted LIN frame.  I need to verify my ECU takes the correct action when it receives a bad LIN frame.

0 Kudos
Message 7 of 11
(9,506 Views)

Looking at CANoe, it appears that they allow you to configure the checksum error mode to be automatic error or manual error where you provide the 'error checksum' for each ID.

The automatic mode could be similar to using classic instead of enhanced or vice versa. The manual mode could allow you to store a particular checksum to use when sending frames for an ID.

Are there other fault injections that you would require?

 

0 Kudos
Message 8 of 11
(9,503 Views)

I need to do the same type of tests.  Are there any new tools in LabVIEW since 2011?

0 Kudos
Message 9 of 11
(7,621 Views)

Version 14.0 has a statement about LIN checksum corruption check.

 

  • Added support for LIN checksum corruption.

http://download.ni.com/support/softlib//embedded%20networks/NI-XNET/Driver/NI-XNET%2014.1/readme.htm

 

Might want to download it and try it out.

0 Kudos
Message 10 of 11
(7,619 Views)