niHSDIO_WriteScript

NI Digital Waveform Generator/Analyzer

niHSDIO_WriteScript

Specific Function

C Function Prototype

ViStatus niHSDIO_WriteScript (ViSession vi, ViConstString script);

Purpose

Writes a string containing scripts that govern the generation of waveforms. If this function is called repeatedly, previously written scripts with unique names remain loaded. Previously written scripts with identical names to those being written are replaced.

If multiple scripts are loaded when the niHSDIO_Initiate function is called, then one of the scripts must be designated as the script to generate by setting NIHSDIO_ATTR_SCRIPT_TO_GENERATE to the desired script name. If only one script is in memory, then you do not need to designate the script to generate. All waveforms referenced in the scripts must be written before the script is written.

An error is returned if the script uses incorrect syntax. This function calls the niHSDIO_CommitDynamic function. All pending attributes are committed to hardware.

Parameters

Name Type Description
vi ViSession This handle identifies your instrument session. vi was obtained from niHSDIO_InitGenerationSession.
script ViConstString Specifies a string containing a syntactically correct script.

Return Value