Functions for controlling the arbitrary waveform buffer of a generator.
A generator has a buffer in which arbitrary waveform patterns can be loaded, after which the loaded pattern can be generated, when the signal type is set to ST_ARBITRARY. Waveform patterns must have a length in samples between a minimum and maximum value. Use GenGetDataLengthMin() and GenGetDataLengthMax() to get the buffer length limits in samples.
When the frequency mode is set to "signal frequency", the loaded pattern is treated as one period of the signal to generate. When the frequency mode is set to "sample frequency", the samples of the loaded pattern are generated at the set sample frequency.
The samples in the waveform pattern buffer represent the voltage values of the signal to generate. These sample values are unitless floating point values. Positive values represent the positive part of the signal. Negative values represent the negative part of the signal. When loading the buffer, the values in the buffer are normalized:
- a value
0
(zero) will equal the set offset value.
- the highest absolute value will equal the set amplitude value.
Example pattern:
Sample number | Buffer value | Generated voltage
Amplitude = 7 V
Offset = 0 V | Generated voltage
Amplitude = 4V
Offset = -1 V |
0 | 0.0 | 0.0 V | -1.0 V |
1 | 0.5 | 3.5 V | 1.0 V |
2 | 1.0 | 7.0 V | 3.0 V |
3 | 0.5 | 3.5 V | 1.0 V |
4 | 0.0 | 0.0 V | -1.0 V |
5 | -0.5 | -3.5 V | -3.0 V |
6 | -1.0 | -7.0 V | -5.0 V |
7 | -0.5 | -3.5 V | -3.0 V |
Check whether the current signal type of a specified generator supports controlling the Arbitrary waveform buffer.
- Parameters
-
- Returns
- BOOL8_TRUE if supported, BOOL8_FALSE if not.
- Status values
-
- See also
- GenSetData
- Since
- 0.6
Get the minimum length of the waveform buffer of a specified generator.
- Parameters
-
- Returns
- The minimum waveform buffer length in samples.
- Status values
-
- See also
- GenGetDataLengthMax
-
GenGetDataLength
- Since
- 0.4.2
Get the maximum length of the waveform buffer of a specified generator.
- Parameters
-
- Returns
- The maximum waveform buffer length in samples.
- Status values
-
- See also
- GenGetDataLengthMin
-
GenGetDataLength
- Since
- 0.4.0
Get the length of the currently loaded waveform pattern of a specified generator.
- Parameters
-
- Returns
- The currently set waveform pattern length in samples.
- Status values
-
- See also
- GenGetDataLengthMin
-
GenGetDataLengthMax
- Since
- 0.4.0
void GenSetData |
( |
LibTiePieHandle_t |
hDevice, |
|
|
const float * |
pBuffer, |
|
|
uint64_t |
qwSampleCount |
|
) |
| |
Load a waveform pattern into the waveform buffer of a specified generator.
- Parameters
-
[in] | hDevice | A device handle identifying the generator. |
[in] | pBuffer | A pointer to a buffer with the waveform data. |
[in] | qwSampleCount | The number of samples in the pattern. |
- Status values
-
- See also
- GenGetDataLengthMin
-
GenGetDataLengthMax
-
GenGetDataLength
- Since
- 0.4.0