DAQ
For more information regarding a DAQ, please visit this link.
NI DAQ USB-6259
In the Optomechanics lab and LCO, we are mainly using NI DAQs, such as the USB-6259 model:
Specifications
Detailed specifications can be found on the website of National Instruments Specific specs: Multichannel maximum: 1.00 MS/s. This rate is shared among all input channels.
Ghosting
When reading multiple signals simultaneously, it is possible that the signal of channel X will be partially visible in the signal recorded by channel Y due to what is called ghosting. Please find more information about ghosting here.
NI DAQ USB-600X

We also use these smaller DAQs for simpler setups.
Specifications
Full specifications at National Instruments website.
The USB-6009 model presents up to 48 kS/s and 13/14 bit input resolution, depending on configuration.
Measurement Computing DAQ
There are also a couple of MC DAQs such as USB-1208LS and USB-1408FS, with similar specs to the NI USB-600X. More information at Digilent.
Data acquisition
National Instruments (NI DAQmx)
NI DAQs use the nidaqmx python package, which depends on the installation of NI DAQ drivers.
An example of a python script to read out channels
Note that in the example below, we use shorts in between the three main signals to read in order to reduce ghosting. The shorts need to be read out to be effective.
import nidaqmx
DAQtaskAI = nidaqmx.Task(); #create a task object
DAQtaskAI.ai_channels.add_ai_voltage_chan("Dev1/ai0",min_val=0,max_val=10) # add an input channel to the task. min_val and max_val are the minimum and maximum voltage that will be applied. #Transmission
DAQtaskAI.ai_channels.add_ai_voltage_chan("Dev1/ai1",min_val=0,max_val=10) # Short
DAQtaskAI.ai_channels.add_ai_voltage_chan("Dev1/ai2",min_val=0,max_val=10) # MZI signal
DAQtaskAI.ai_channels.add_ai_voltage_chan("Dev1/ai3",min_val=0,max_val=10) # Short
DAQtaskAI.ai_channels.add_ai_voltage_chan("Dev1/ai4",min_val=0,max_val=10) # HCN signal
DAQtaskAI.timing.cfg_samp_clk_timing(rate=100000,samps_per_chan=500000) #set sampling parameters. In this example the sampling rate per channel is 100 kHz and data will be collected during 5 seconds.
#measure
data = DAQtaskAI.read(number_of_samples_per_channel = 500000, timeout = 5);
transmission = data[0]
mzi = data[2]
hcn = data[4]
An example of a python script to set an output voltage
import nidaqmx
DAQtaskAO = nidaqmx.Task(); #create a task object
DAQtaskAO.ao_channels.add_ao_voltage_chan("Dev1/ao0");
DAQtaskAO.write(data=5.2, auto_start = True); #5.2 Volt will be set at channel ao0.
Measurement Computing
MC DAQs use the mcculw python package, which depends on the proper MC drivers to be installed.
A quick example to read the voltage in one of the channels
from mcculw import ul
from mcculw.enums import ULRange
from mcculw.ul import ULError
board_num = 0
channel = 0
ai_range = ULRange.BIP5VOLTS
try:
# Get a value from the device
value = ul.a_in(board_num, channel, ai_range)
# Convert the raw value to engineering units
eng_units_value = ul.to_eng_units(board_num, ai_range, value)
# Display the raw value
print("Raw Value: " + str(value))
# Display the engineering value
print("Engineering Value: " + '{:.3f}'.format(eng_units_value))
except ULError as e:
# Display the error
print("A UL error occurred. Code: " + str(e.errorcode)
+ " Message: " + e.message)