How to Send Event Triggered Frames on Lin Bus

Updated Dec 7, 2024

Environment

Software

  • LabVIEW

Driver

  • NI-XNET

There is no LIN LabVIEW example on how to send event triggered frames on a LIN bus, similar to the CAN example; CAN signal output single point vi, which sends data out when Write button is pressed. 

How would you do this with LIN?  

The LIN specification further classifies LIN frames into six types. The types of LIN frames are defined in the ldf file. The ldf example file (C:\Users\Public\Documents\National Instruments\NI-XNET\Examples\NIXNET_exampleLDF.ldf) which ships with LabVIEW does not contain any event triggered frames, so you would have to add this using the XNET Database Editorimage (16).png

You can then send this event triggered frame using a case structure, when the user presses the write button. 

Note, set the delay of the frame at least long enough to support the payload for the unconditional frame(s) in the list, for example 10ms. 

Unbenannt.PNG

 

Please note, the Write button should be in Latched when pressed mode, and the MasterFrame1 should be defined to be an event frame in the ldf file, which is the frame defined in the XNET LIN Schedule you are using. 

Typically the same frames that are in the event-triggered frames list will be be in the collision resolving schedule, but as mentioned in the specifications, it just has to at least contain the frames in the frames list (and here, in this example we only have one frame in the list). 

This should allow you to use event based signals in LIN.