nctStop

NI-CAN

nctStop

Purpose

Stops communication for the specified task.

Format

nctTypeStatus nctStop(
nctTypeTaskRef TaskRef);

Inputs

TaskRef

Task reference from the previous NI-CAN function. The task reference is originally returned from nctInitStart, nctInitialize, or nctCreateMessage.

Outputs

Return Value

The return value indicates the status of the function call as a signed 32-bit integer. Zero means the function executed successfully. A negative value specifies an error, which means the function did not perform the expected behavior. A positive value specifies a warning, which means the function performed as expected, but a condition arose that may require attention.

Use the ncStatusToString function of the Frame API to obtain a descriptive string for the return value. The ncStatusToString and ncGetHardwareInfo functions are the only Frame API functions that can be called within a Channel API application.

Description

This function stops communication so you can change the configuration of the task, such as by using nctSetProperty or nctConnectTerminals. After you change the configuration, use nctStart to start again.

This function does not clear the configuration for the task; therefore, do not use it as the last NI-CAN function in the application. The nctClear function must always be used as the last NI-CAN function for each task.