LIN Topology and Behavior

NI-CAN

LIN Topology and Behavior

The LIN bus connects a single master device (node) and one or more slave devices (nodes) together in what is called a LIN cluster. The behavior of each node is described by its own node capability file. The node capability files are inputs to a system defining tool, which generates a LIN description file (LDF) that describes the behavior of the entire cluster. The LDF is parsed by a System Generator to automatically generate the specified behavior in the desired nodes. At this point, the master node master task starts transmitting headers on the bus, and all the slave tasks in the cluster (including the master node’s own slave task) respond, as specified in the LDF.

In general terms, the LDF is used to configure and create the scheduling behavior of the LIN cluster. For example, it defines the baud rate, the ordering and time delays for the master task’s transmission of headers, and the behavior of each slave task in response. The NI-CAN Frame API for LIN and NI LIN hardware do not natively provide full support for LDFs, meaning that scheduling behavior cannot be downloaded into the hardware. However, the low-level support of accessing the bus (writing headers and publishing or subscribing to responses) is provided such that the user may create this scheduling behavior at the application level. As mentioned in the description for the NI LIN response entry frame type, the NI LIN hardware does provide a response queue for storing slave task responses. The response queue holds 64 responses, one for each of the maximum number of 64 IDs specified for LIN. This ensures that the LIN interface slave task can respond to headers within the response time defined by the LIN specification.

The NI-CAN Frame API for LIN provides a robust means of complete, low-level interaction with the LIN bus. This provides the end user with the basic functionality from which to develop complex applications involving the analysis and prototyping of LIN networks. The NI-CAN Frame API for LIN does not natively support LIN diagnostics or configuration, LIN Description Files or schedule tables. However, these tasks may be implemented in applications making use of the NI-CAN Frame API for LIN.