Table Of Contents

Intf.LIN.Sleep

Last Modified: February 7, 2020

Changes the sleep/awake state for the NI-XNET LIN interface, and can be used to change remote node (ECU) sleep/awake states.

Data type: datatype_icon

Long Name: Interface:LIN:Sleep

Class: XNET Session

Permissions: Write

The Interface:LIN:Sleep property is a ring (enumerated list) with the following values:

String Value Description
Remote Sleep 0 Set interface to sleep locally and transmit sleep requests to remote nodes
Remote Wake 1 Set interface to awake locally and transmit wakeup requests to remote nodes
Local Sleep 2 Set interface to sleep locally and not to interact with the network
Local Wake 3 Set interface to awake locally and not to interact with the network

The property is write only. Setting a new value is effectively a request, and the property node returns before the request is complete. To detect the current interface sleep/wake state, use XNET Read (State LIN Comm).

The LIN interface maintains a state machine to determine the action to perform when this property is set (request).

Sleep/Wake Action for Master

The following section specifies the action when the interface is master.

Request Current Local State
Sleep Awake
Remote Sleep No action Change local state; pause scheduler; transmit go-to-sleep request frame
Remote Wake Change local state; transmit master wakeup pattern (serial break); resume scheduler No action
Local Sleep No action Change local state
Local Wake Change local state; resume scheduler No action

When the master's scheduler pauses, it finishes the pending entry (slot) and saves its current position. When the master's scheduler resumes, it continues with the schedule where it left off (entry after the pause).

The go-to-sleep request is frame ID 60, payload length 8, payload byte 0 has the value 0, and the remaining bytes have the value 0xFF.

If the master is in the Sleep state, and a remote slave (ECU) transmits the slave wakeup pattern, this is equivalent to setting this property to Local Wake. In addition, a pending XNET Wait (LIN Remote Wakeup) is returned. This XNET Wait node does not apply to setting this property, because you know when you set it.

Sleep/Wake Action for Slave

The following section specifies the action when the interface is slave.

Request Current Local State
Sleep Awake
Remote Sleep Error Error
Remote Wake Transmit slave wakeup pattern; change local state when first break from master is received No action
Local Sleep No action Change local state
Local Wake Change local state No action

According to the LIN protocol standard, Remote Sleep is not supported for slave mode, so that request returns an error.

If the slave is in Sleep state, and a remote master (ECU) transmits the master wakeup pattern, this is equivalent to setting this property to Local Wake. In addition, a pending XNET Wait (LIN Remote Wakeup) is returned. This XNET Wait node does not apply to setting this property, because you know when you set it.

Where This Property Is Available:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics