niFgen_CreateArbSequence
ViStatus niFgen_CreateArbSequence (ViSession vi, ViInt32 sequenceLength, ViInt32[] waveformHandlesArray, ViInt32[] loopCountsArray, ViInt32* sequenceHandle);
Purpose
Creates an arbitrary sequence from an array of waveform handles and an array of corresponding loop counts. An arbitrary sequence consists of multiple waveforms. For each waveform, you can specify the number of times that the signal generator produces the waveform before proceeding to the next waveform. The number of times to repeat a specific waveform is called the loop count.
The function returns a handle that identifies the sequence. You pass this handle to the niFgen_ConfigureArbSequence function to specify what arbitrary sequence you want the signal generator to produce.
Note You must call the niFgen_ConfigureOutputMode function to set the output mode to NIFGEN_VAL_OUTPUT_SEQ before calling this function. |
Parameters
Input | ||
Name | Type | Description |
vi | ViSession | Identifies your instrument session. vi is obtained from the niFgen_init or the niFgen_InitWithOptions functions and identifies a particular instrument session. |
sequenceLength | ViInt32 | Specifies the number of waveforms in the new arbitrary sequence that you want to create. The value you pass must be between the minimum and maximum sequence lengths that the signal generator allows. You can obtain the minimum and maximum sequence lengths from minimumSequenceLength and maximumSequenceLength in the niFgen_QueryArbSeqCapabilities function.
Default Value: None |
waveformHandlesArray | ViInt32[] | Specifies the array of waveform handles from which you want to create a new arbitrary
sequence. The array must have at least as many elements as the value that you specify in
sequenceLength. Each waveformHandlesArray element has a
corresponding loopCountsArray element that indicates how many times that
waveform is repeated. You obtain waveform handles when you create arbitrary waveforms with the niFgen_AllocateWaveform function or one of the following niFgen CreateWaveform functions:
Default Value: None |
loopCountsArray | ViInt32[] | Specifies the array of loop counts you want to use to create a new arbitrary sequence. The array must have at least as many elements as the value that you specify in the sequenceLength parameter. Each loopCountsArray element corresponds to a waveformHandlesArray element and indicates how many times to repeat that waveform. Each element of the loopCountsArray must be less than or equal to the maximum number of loop counts that the signal generator allows. You can obtain the maximum loop count from maximumLoopCount in the niFgen_QueryArbSeqCapabilities function.
Default Value: None |
Output | ||
Name | Type | Description |
sequenceHandle | ViInt32* | Returns the handle that identifies the new arbitrary sequence. You can pass this handle to niFgen_ConfigureArbSequence to generate the arbitrary sequence. |
Return Value
Name | Type | Description | ||||||||
Status | ViStatus | Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You can examine the status code from each call to an NI-FGEN function to determine if an error occurred.
To obtain a text description of the status code, call the niFgen_error_message function. To obtain additional information about the error condition, call the niFgen_GetError function. To clear the error information from NI-FGEN, call the niFgen_ClearError function. The general meaning of the status code is as follows:
|