Admin Production ni-theme
Current Publication

CNVWrite

LabWindows/CVI

CNVWrite

int CNVWrite (CNVWriter writer, CNVData data, int waitTime);

Purpose

Writes the input data to a network variable using a writer connection.

Note Note  To avoid deadlocks, do not call this function in a network variable callback function.

Parameters

Input
Name Type Description
writer CNVWriter The handle that identifies the network variable writer connection.
data CNVData The handle that identifies the network variable data.
waitTime int Number of milliseconds the Network Variable Library waits for this operation to complete. Pass CNVWaitForever to wait indefinitely. Pass CNVDoNotWait to execute the operation asynchronously; in this case, you will not get an error if the operation fails.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. One indicates that a next item was found, zero indicates that a next item was not found, and a negative number indicates that an error occurred.

You can call CNVGetErrorDescription to obtain a string that describes the error.

Additional Information

Library: Network Variable Library

Include file: cvinetv.h

LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later

Examples

Refer to the following examples that use the CNVWrite function:

  • apps\chess\chess.cws

    Open example
  • networkvariable\Buffering\NVBuffering.cws

    Open example