Skip to content

Instantly share code, notes, and snippets.

@blakejohnson
Created January 17, 2013 20:59
Show Gist options
  • Save blakejohnson/4559702 to your computer and use it in GitHub Desktop.
Save blakejohnson/4559702 to your computer and use it in GitHub Desktop.
Loads a Gaussian waveform onto the APS
aps = deviceDrivers.APS();
aps.connect(0);
aps.init();
% configure the APS
% set up channel 1
aps.setAmplitude(1, 1.0);
aps.setOffset(1, 0);
aps.setEnabled(1, true);
% load Gaussian waveform in float mode (scaled (-1-1))
aps.loadWaveform(1, exp(-(linspace(-2,2,100).^2)));
% configure output rate and trigger source
aps.triggerSource = `internal';
aps.triggerInterval = '20e-3';
aps.run();
% acquire data...
aps.stop();
aps.disconnect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment