DAQmxSaveGlobalChan

NI-DAQmx C Functions

DAQmxSaveGlobalChan

int32 DAQmxSaveGlobalChan (TaskHandle taskHandle, const char channelName[], const char saveAs[], const char author[], uInt32 options);

Purpose

Saves the specified local or global virtual channel to MAX as a global virtual channel. You must specify both the local or global virtual channel to save and a task that contains that channel.

Programmatically saved global virtual channels cannot be viewed in the DAQ Assistant for versions of NI-DAQ earlier than 7.4. To view a programmatically saved global virtual channel in an earlier version of NI-DAQ, first use the DAQ Assistant in NI-DAQ 7.4 or later to save the global virtual channel.

Visit the DAQmx Professional Developer Tools website for more information and examples of programmatically saving global virtual channels.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task that contains the local or global virtual channel you want to save.
channelName const char [] Name of the local or global virtual channel to save.
saveAs const char [] Name to save the global virtual channel as. If you pass an empty string ("") or NULL, the name currently assigned to the global virtual channel will be used.
author const char [] Name to store with the global virtual channel.
options uInt32 Use this parameter to set certain options. You can combine options with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value Description
DAQmx_Val_Save_Overwrite Overwrite a global virtual channel of the same name if one is already saved in MAX. If you do not set this flag and a global virtual channel of the same name is already saved in MAX, the function returns an error.
DAQmx_Val_Save_AllowInteractiveEditing Allow the global virtual channel to be edited in the DAQ Assistant. If you set this flag, the DAQ Assistant must support all global virtual channel settings.
DAQmx_Val_Save_AllowInteractiveDeletion Allow the global virtual channel to be deleted through MAX.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.