labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 58 forks source link

NI-6738 AO sample clock too high #91

Open dihm opened 2 years ago

dihm commented 2 years ago

This is more a cautionary note than something to fix, necessarily.

The 6738 analog output DAQ has 32 channels of AOs and a max single channel sample rate of 1 MS/s. This sample rate is preserved if only one output channel per bank is used (a bank being formed from four sequential AO channels).

However, if you have two AOs from the same bank (ie ao0 and ao1), the max single channel sample rate drops to 350 kS/s. The NI-DAQmx driver doesn't know this and will error out when trying to transition to buffered (since it tries to set a Sample clock limit of 1e6).

The current workaround is to only use one AO per bank (so ao0 and ao4 is fine), or to manually override the max_AO_sample_rate instantiation argument to an allowed 400e3.