SonixDAQ Software

Main Window
The SonixDAQ software is separated from the Exam software. This section will only focus on the DAQ software which is used to:
 * Program the DAQ by pressing "Create Sequence ..."
 * Adjust the DAQ parameters and capture channel data the by pressing "Start Sequencing"
 * Transfer the DAQ data back to PC by pressing "Download Data"
 * Load the collected data from the Sonix system (PC) and display the results by pressing "...".

The following figure shows the main user interface of the SonixDAQ software. The menu section of this window contains:
 * Directory : is the path of the collected data and can be used to load acquired channel data
 * Sequence (the same as the Create Sequence push button): programs the DAQ and opens another window "Sequence Control" which provides data acquisition options to the user. More detail is given below.
 * View: to show/hide the frame control in the main window
 * Help: shows the information about the software version.



This window enables the user to view:
 * The channel-by-channel waveform of the collected data (e.g. decrease/increase the time scale),
 * The FFT or FFT average of the data (In case decimation is used during data collection, the same value needs to be set in this window for the frequency spectrum to show the correct frequencies),
 * One or more channels (up to 32) on the screen (by adjusting "Channel Scale"), and
 * Different acquisition frames (by pressing "<<" and ">>").

A sample screen shot of the window when displaying the results is shown below:



Sequence Control
After pressing the "Create Sequence" button, the DAQ software will program the DAQ hardware. Once the DAQ is programmed, the "Sequence Control" window will appear. The Sequence Control window, which is shown below, allows the user to adjust the parameters for data acquisition, start/stop the sequencing, and download/transfer the captured data to PC.



The flowchart of the supported sequence control is depicted in a figure below and will be explained in detail in the following sections.



Choose the TGC Curve
The user can obtain the desired TGC curve in the top section of the window. Both adjustable TGC (as a function of depth) and fixed TGC can be programmed.

Imaging Parameters
This window allows the user to adjust the imaging parameters such as The effects of these parameters on data acquisition are depicted in a figure below. Further explanations are provided in the next subsections.
 * Number of Samples: number of samples that will be acquired regardless of the sampling frequency,
 * Receive Delay: the delay (in micro seconds) after the sync signal and before start of data collection,
 * Line Duration: duration of each acquisition in micro seconds,
 * Gain Delay, delay after the transmit before the TGC is applied in micro seconds,
 * Gain Offset, shifts the TGC curve up based on the Gain offset value, the value is in micro volts and it ranges from 0 to 1600 (1.6 Volt maximum gain),



The parameters either has to be entered manually, or loaded from a file. Note that some combination of the parameters are not supported by the DAQ. In case "Load From File" option is selected. The first three parameters will be loaded from the file. It should be noted that for this option to work properly, the Sonix system has to write these information to the same file. For this purpose, the "writeDAQparams" has to be set to 1 on the mouse over menu in the Exam software. For further information refer to Sonix system setup.

In case the "external" synchronization pulse is selected, the Line Duration is determined by the sync pulse coming from the Sonix system. Also, it is up to the user to ensure that Number of Samples is short enough to fit in between the sync pulses. Otherwise, unwanted transmits will occur during data acquisition.

If "internal" synchronization pulse is selected, the DAQ software checks the feasibility of the selected combination of Number of samples, Line Duration and Receive Delay.

Clock Configuration
The DAQ has its own internal clock that runs at 40MHz. This clock is different from the Sonix clock. In this section you set the DAQ to use its own internal clock or to use the external clock provided to the DAQ through a BNC cable. This will make sure that both the DAQ and the Sonix system are using the same clock.

It is important to note that this clock always has to be 40MHz regardless of the sampling frequency. The DAQ uses this 40MHz clock to generate the 60MHz sampling frequency.

Note: This option is only available on the Sonix systems with the new PCI card (i.e. SonixTouch, SonixMDP, and modified SonixRP). On the old SonixRP system only the internal clock should be used.

Start Configuration
In this section you select synchronization pulse source: internal or external. The synchronization pulse is a pulse which indicates the beginning of each acquisition. The user can choose the source of this pulse based on the purpose of the data collection. If the purpose is to test the DAQ, it is not required to connect the synchronization BNC to the Sonix system’s BNC. The DAQ is capable of generating this pulse internally.

In this scenario, the source of the synchronization pulse must be selected as internal. Also, it is not required to connect the DAQ to the probe slot. Instead, the DAQ's probe connector can be connected to a signal generator, which generates a wave form with a frequency less than 20MHz and amplitude less than 50mV.

However, if the goal is to capture synchronized ultrasound data from the Sonix system, the DAQ has to be connected to the Sonix system's probe connector and DAQ's BNC input signal has to be connected to Sonix's BNC output signal. In this scenario, the source of the synchronization pulse must be selected as external.

Channel Mapping
There are four separate boards inside the DAQ. Each board is responsible for data from 32 channel.

The next step is to select the active channels. These can be any combination of channels from 1 to 128. Next figure shows the active channel selection window.



Select/Deselect HPF
This is a digital filter that performs as a DC canceler. The cut off frequency for this filter is 280kHz. The user can bypass this filter by selecting the Bypass HPF option.

Note: In addition to this digital HPF, the sonixDAQ has anti-aliasing filters as well. The AA filter is a combination of a low pass filter LPF and a high pass filter HPF. Currently the cut-off values for AA filter are set to be: In other words the pass band for AA filter is approximately from 1MHz to 20MHz.
 * HPF cut-off = F_high = F_sampling/3 = 60MHz/3 = 20MHz and
 * LPF cut-off = F_low = F_high/20.7 = 1MHz.

Operating Mode
The SonixDAQ can work in two different operating modes:
 * Normal mode: the data is written to the memory (i.e. DDR2) until it gets full. In this mode, the user can choose the max capacity of the memory.
 * Free-Run mode: the memory is treated as a ring buffer. In this mode, the user has to press the stop button in order to stop writing the data into memory before downloading the stored data.

Decimation/Sampling
In the old DAQ firmware the sampling frequency was the same to be the same as FGPA clock, running at 40MHz. In the new DAQ firmware, the DAQ FPGA runs at 40MHz but the receive board (rx board) generates a 60MHz clock from the 40MHz clock and samples the data at 60MHz. This way, the base sampling frequency is now fixed to 60MHz.

The decimation option allows the user to reduce the sampling frequency (i.e. down sampling). This option can be used to store more frames on the DAQ. Currently, this is the only parameter that allows the user to control the sampling frequency as follows:
 * 60MHz (decimation = 0)
 * 30MHz (decimation = 1)
 * 20MHz (decimation = 2)
 * 15MHz (decimation = 3)

Note: At the moment, decimation only uses down-sampling with no anti-aliasing filter. Thus, setting the sampling frequency too low will result in aliasing.

File Size
The file size allows the user to set the maximum memory size for each board on the DAQ. Since there are four boards on the DAQ, setting the File Size to 4GB will result in capturing 16GB of channel data. Currently the following options are supported for the File Size:
 * 4GB (divisor = 0)
 * 2GB (divisor = 1, i.e. 4G/2^1 = 2G)
 * 1GB (divisor = 2, i.e. 4G/2^2 = 1G)
 * 128K (divisor = 15, i.e. 4G/2^15 = 128K)
 * 128K (divisor = 15, i.e. 4G/2^15 = 128K)

Note: due to limited bandwidth of the USB cable, increasing the memory size will result in longer transfer time. Thus, it is recommended to set the file size lower than the maximum value unless it is necessary.

Gain Adjustments
In this section LNA gain, PGA gain, and the Switch gain can be adjusted. Note that maximizing all the gain may cause the TR switch to saturate. Thus, the values have to be adjusted depending on the application.

Download data
The write procedure to memory can be terminated by either pressing the stop button or when memory is filled to capacity (only in Normal mode). The user can download the captured data from DAQ. The following figure shows the download window.



Format of the stored data
In the output directory, the ultrasound data is stored in binary files CHZZZ-YYYY.daq, where ZZZ is the channel number from 0 to 127 and YYYY is the file number. For example, CH000-0000.daq is the first set of data for channel 0, while CH000-0001.daq is the second set of data for channel 0. At the beginning of each file is a header consisting of two unsigned integers (32 bits each) which contain the number of lines and the number of samples per line, respectively. The ultrasound samples are 16-bit signed integers, stored in lines after the header.

For example, if the integers are 10 and 1024, respectively, the file contains ten lines of 1024 samples per line, for a total of 10,240 samples. Since the ultrasound samples are stored in lines, to read the first line of samples one would simply read 1024 * (2 bytes/sample) = 2048 bytes from the file beyond the header. Each line would be the next 2048 bytes beyond that.