ncDisconnectTerminals.vi

NI-CAN

ncDisconnectTerminals.vi

Purpose

Disconnect terminals in the CAN or LIN hardware.

Format

Inputs

ObjHandle in is the object handle from the previous NI-CAN VI. The handle reference originated from ncOpen.vi.
source terminal specifies the connection source. For a description of values for source terminal, refer to ncConnectTerminals.vi.

destination terminal specifies the connection destination.

For a description of values for destination terminal, refer to ncConnectTerminals.vi.

modifiers provides optional connection information for certain source/destination pairs. The current release of NI-CAN does not use this information for any source/destination pair, so modifiers must be left unwired.
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. If status is True, the VI does not perform any operations.
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.

Outputs

ObjHandle out is the object handle for the next VI.
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

This VI disconnects a specific pair of source/destination terminals that were previously connected with ncConnectTerminals.vi.

When the final task for a given interface is cleared with ncClose.vi, NI-CAN disconnects all terminal connections for that interface. Therefore, the ncDisconnectTerminals VI is not required for most applications. This VI is typically used to change RTSI connections dynamically while an application is running. First, use ncAction.vi to stop all tasks for the interface, then use ncDisconnectTerminals and ncConnectTerminals to adjust RTSI connections. Then use ncAction.vi with the opcode to start the network interface and higher-level CAN Objects to restart communication.