private void buttonTestAMmodulation_Click(object sender, EventArgs e) { // Create a waveform object in PC RAM from waveform file SD_Wave wave = new SD_Wave("W:\\Waveforms_Demo\\Gaussian.csv"); if (wave.getStatus() < 0) { printToConsole("Error opening waveform File"); return; } int nWave = 0; // Erase all waveforms from module memory and load the waveform waveID in position nWave moduleAOU.waveformFlush(); moduleAOU.waveformLoad(wave, nWave); // Turn off nChannel moduleAOU.channelWaveShape(nChannel, SD_Waveshapes.AOU_OFF); // Switch off angle modulation and setup AM modulation moduleAOU.modulationAngleConfig(nChannel, SD_ModulationTypes.AOU_MOD_OFF, 0); moduleAOU.modulationAmplitudeConfig(nChannel, SD_ModulationTypes.AOU_MOD_AM, 1); // Deviation Gain = 1 // Config carrier amplitude, frequency and shape moduleAOU.channelAmplitude(nChannel, 0); // 0 Volts Peak moduleAOU.channelFrequency(nChannel, 10E6); // 10 MHz moduleAOU.channelWaveShape(nChannel, SD_Waveshapes.AOU_SINUSOIDAL); // Flush channel waveform queue moduleAOU.AWGflush(nChannel); // Queue waveform nWave in nChannel moduleAOU.AWGqueueWaveform(nChannel, nWave, SD_TriggerModes.AUTOTRIG, 0, 0, 1); printToConsole("Module configuration successfull. Press CONTINUE to start the AWG"); runPause(); moduleAOU.AWGstart(nChannel); printToConsole("AWG started. Press CONTINUE to stop the AWG."); runPause(); moduleAOU.AWGstop(nChannel); printToConsole("AWG Stopped. Press CONTINUE to finish."); runPause(); }
private void numericUpDownFrequency_ValueChanged(object sender, EventArgs e) { // Change the selected channel frequency (in Hz) module.channelFrequency(comboBoxChannel.SelectedIndex, (double)numericUpDownFrequency.Value * 1E6); }