awg_creation_demo module

This script will generate a binary file that can be used to output a waveform on D-TACQ AO modules.

To have the UUT output a single sample the file should have 32 int16s ie (CH1 CH2 ... CH32) where the value for each channel can be different (they will not be different for this example). The user can extend this to as many samples as necessary and to any value necessary i.e the values do not need to be the same across channels (channel 1 could be a sine wave, channel 2 could be a sinc wave etc).

In this script we are outputting the same identical sine wave across all 32 channels for sine_size number of samples. There is also an argument called even_ch_to_zeros that, if set, will set all of the even channels to zero to illustrate how the channels are ordered.

Example usage:

To create the default file:

python awg_creation_demo.py

To create binary file with even channels set to 0 and a wave size of 3000 samples.

python awg_creation_demo.py --sine_size=3000 --even_ch_to_zeros=1

To upload awg files once it has been generated use the following python script:

python acq1001_awg_demo.py --files="../acq400/waves/example_awg" --capture=1 --awglen=<awg_length> <UUT name>

awg_creation_demo.create_array(sine_size, args)[source]
awg_creation_demo.generate_awg(args)[source]
awg_creation_demo.run_main()[source]
awg_creation_demo.write_array_to_disk(waveform, dir)[source]