CAN Clear.vi
Purpose
Stop communication for the task and then clear the configuration.
Format
Inputs
task reference in is the task reference from the previous NI-CAN VI. The task reference is originally returned from CAN Init Start.vi, CAN Initialize.vi, or CAN Create Message.vi, and then wired through subsequent VIs. | |||||||
Error in describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the Error in cluster in Error out.
|
Outputs
Error out describes error conditions. If the Error in cluster indicated an error, the Error out cluster contains the same information. Otherwise, Error out describes the error status of this VI.
|
Description
The CAN Clear VI must always be the final NI-CAN VI called for each task. If you do not use the CAN Clear VI, the remaining task configurations can cause problems in execution of subsequent NI-CAN applications.
If the cleared task is the last running task for the initialized interface (refer to CAN Init Start.vi), the CAN Clear VI also stops communication on the CAN controller of the interface and disconnects all terminal connections for that interface.
Unlike other VIs, this VI will execute when status is True in Error in.
Because this VI clears the task, the task reference is not wired as an output. To change properties of a running task, use CAN Stop.vi to stop the task, CAN Set Property.vi to change the desired property, and then CAN Start.vi to restart the task.