ncClose.vi

NI-CAN

ncClose.vi

Purpose

Close an object.

Format

Input

ObjHandle in is the object handle from the previous NI-CAN VI. The handle originates from the ncOpen VI.
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.
status is True if an error occurred. Unlike other NI-CAN VIs, this VI always closes the object, regardless of the value of status.
code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.

Output

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.
status is True if an error occurred.
code is the error code number identifying an error. A value of 0 means success. A negative value means error: VI did not execute the intended operation. A positive value means warning: VI executed intended operation, but an informational warning is returned. For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.
source identifies the VI where the error occurred.

Description

ncClose closes an object when it no longer needs to be in use, such as when the application is about to exit. When an object is closed, NI-CAN stops all pending operations and clears all configuration for the object(including RTSI). The application can no longer use that specific ObjHandle in.

Unlike other NI-CAN VIs, this VI always closes the object, regardless of the Status in Error In.

Network Interface Object

ObjHandle in refers to an open CAN or LIN Network Interface Object.

CAN Object

ObjHandle in refers to an open CAN Object.