niFgen_CreateAdvancedArbSequence
ViStatus niFgen_ConfigureArbSequence (ViSession vi, ViConstString channelName, ViInt32 sequenceHandle, ViReal64 gain, ViReal64 offset);
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 specify the number of times 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.
The niFgen_CreateAdvancedArbSequence function extends on niFgen_CreateArbSequence by adding the ability to set the number of samples in each sequence step and to set marker locations.
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 |
sampleCountsArray | ViInt32[] | Specifies the array of sample counts that you want to use to create a new arbitrary sequence. The array must have at least as many elements as the value you specify in the sequenceLength parameter. Each sampleCountsArray element corresponds to a waveformHandlesArray element and indicates the subset, in samples, of the given waveform to generate. Each element of the sampleCountsArray must be larger than the minimum waveform size, a multiple of the waveform quantum and no larger than the number of samples in the corresponding waveform. You can obtain these values by calling the niFgen_QueryArbWfmCapabilities function.
Default Value: None |
markerLocationArray | ViInt32 | Specifies the array of marker locations to where you want a marker to be generated in the sequence. The array must have at least as many elements as the value you specify in the sequenceLength parameter. Each markerLocationArray element corresponds to a waveformHandlesArray element and indicates where in the waveform a marker is to generate. The marker location must be less than the size of the waveform the marker is in. The markers are coerced to the nearest marker quantum and the coerced values are returned in the coercedMarkersArray parameter.
If you do not want a marker generated for a particular sequence stage, set the marker to NIFGEN_VAL_NO_MARKER. Defined Value: NIFGEN_VAL_NO_MARKER Default Value: None |
Output | ||
Name | Type | Description |
coercedMarkersArray | ViInt32[] | Returns an array of all given markers that are coerced (rounded) to the nearest marker quantum. Not all devices coerce markers.
Default Value: None |
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:
|