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 at 40MHz (or lower sampling frequency depending on the decimation factor which is explained below),
 * 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,
 * Gain Offset



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.

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
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
The SonixDAQ contains a High Pass Filter to suppress the low frequency noises. The user can bypass this HPF by selecting the Bypass HPF option.

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
The decimation option allows the user to sample the data with a lower sampling frequency (20MHz, 10MHz, or 5MHz). This option can be used to store more frames on the DAQ. Note that for the same number of samples, decreasing the sampling frequency by a factor of two will increase the line duration.

File Size
There are four separate boards on the DAQ. Each board is responsible for data from 32 channel. The file size allows the user to set the maximum memory size for each board on the DAQ. Setting the File Size to 4GB will result in capturing 16GB of channel data.

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.