code
Description
Specifies the type of waveform for built-in waveforms.
Syntax
Read
Gets the current waveform code.
Example
int wfCode;
wfCode = awg.code;
Write
Sets new waveform code.
Example
awg.code = 1;
Values
| Code | Alias | Description |
| 1 | SINE | Outputs a sine wave at the specified frequency |
| 2 | SIN_AB | Outputs a sine wave at a frequency that is A/B * sampling clock rate |
| 3 | TWO_TONE | Outputs two tones, one at frequency A/B * sampling clock rate and one at frequency C/D * sampling clock rate |
| 5 | SIN_AB_PHASED | Outputs a sine wave at a frequency that is A/B * sampling clock rate with beginning phase control |
| 21 | CHIRP_PCH | Phase Coherent Chirp |
| 22 | CHIRP_PCT | Phase Continuous Chirp |
| 31 | RAMP | Ramp |
| 32 | SINC | Sinc |
| 50 | PULSE | Pulse |
| 101 | CONSTANT | Constant |
Notes
Please refer to the AWG Manual for a detailed description of each waveform. The descriptions can be found on the "Waveform Styles" page under the "Waveforms Section".
Instead of the integer code, you can instead write to code using the alias with the following syntax:
awg.code = (unsigned) WAVEFORM_CODE::ALIAS;
where "ALIAS" is the alias name found in the table above. So if you wanted a Sine A/B waveform you would type in the following:
awg.code = (unsigned) WAVEFORM_CODE::SIN_AB;
Please see the waveform_parameter_xx property for a description of the parameters used for each waveform style.