Writes a request for the LIN interface to change the running schedule. You can use this XNET Write node with any input or output session for LIN.
The session to use for the schedule change. This session is selected from the LabVIEW project or returned from XNET Create Session. The session must use a LIN interface.
The XNET LIN schedule. Although the data type for this input is the XNET LIN Schedule I/O Name, you also can wire a string.
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
Default: No error
An output that is the same as session in, provided for use with subsequent nodes.
Error information.
The node produces this output according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
You can use XNET Write (State LIN Schedule Change) with any XNET session mode, as long as the session interface is LIN. Because the schedule change applies to the LIN interface, it can apply to multiple sessions.
According to the LIN protocol, only the master executes schedules, not slaves. If the XNET Session Interface:LIN:Master? property is false (slave), this write function implicitly sets that property to true (master). If the interface currently is running as a slave, this write returns an error, because it cannot change to master while running.
XNET Write (State LIN Schedule Change) behavior depends on the Run Mode property of the XNET LIN schedule that you wire in as data:
The run-continuous schedule is handled as if it is lowest priority. If you write a run-once schedule in the middle of a run-continuous execution, the run-continuous schedule is interrupted after the current slot finishes. The scheduler switches to the run-once schedule, and when all run-once schedules are done, the scheduler returns to the slot in the run-continuous schedule where it left off. For example, if run-continuous schedule A has 4 slots, and it is executing slot 2 when a run-once schedule B is written, slot 2 of A finishes, then all slots of schedule B run, then the scheduler returns to slot 3 of schedule A.
Only one run-continuous schedule exists at a time. If you change from one run-continuous schedule to another in the middle of a run, the current schedule completes all of its slots, then the scheduler changes to the new run-continuous schedule.
Each run-once schedule has a priority from 1 to 254. Lower values correspond to higher priority (1 is highest). The LIN interface's scheduler maintains a priority queue of run-once schedule requests. This means the highest-priority run-once schedule executes first, followed by the next run-once in priority, and when no run-once schedules are pending, the interface returns to the run-continuous schedule.
A run-once schedule cannot interrupt another run-once schedule. For example, if run-once schedule X has 3 slots and is executing slot 0 when a run-once schedule Y with higher priority is written, slots 0, 1, and 2 of X finish, then all slots of schedule Y run.
The null schedule is considered the highest priority schedule. It overrides the single run-continuous schedule, thus acting as the default scheduling behavior. For example, if you write a null schedule, then write a run-once schedule, the run-once schedule executes all its slots, then communication stops (returns to null schedule).
XNET Write (State LIN Schedule Change) does not wait for the requested schedule to finish execution prior to return. The node does not wait for the schedule to begin execution, because in the case of run-once schedules, that may take a long time (depending on priority). Because this node simply writes a schedule request and returns, it is safe to use within a high-priority loop in LabVIEW Real-Time.
Node configuration is handled using XNET Write (State LIN Schedule Change) instead of XNET Write (State LIN Diagnostic Schedule Change). Wire the node configuration schedule defined for the LIN cluster into XNET Write (State LIN Schedule Change) so that it is the first schedule executed for the LIN, with a run mode of once. The data for each node configuration service request entry in the node configuration schedule is automatically transmitted by the master. After the node configuration schedule has completed, use XNET Write (State LIN Diagnostic Schedule Change) to write master request messages and query for slave response messages, or XNET Write (State LIN Schedule Change) to run normal schedules.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Supported
Web Server: Not supported in VIs that run in a web application