Basic Structure -

For each chirp that is done by the DSM, the controlling program should adhere to the following structure:

  1. Intialization of board(s)
  2. Configure control settings
  3. Waveform parameter definitions
  4. Download data
  5. Start DSM memory
  6. Stop memory when complete (optional)


Intialization of board(s)

The initialization of the DSM board only needs to be done once in a program assuming that the DSM is not disconnected. Initialization must be done first before all other steps. Initialization is a multiple step process. First you should find out how many DSM boards are connected by reading the number property in the DSM_Group_API class. Then call the get_sn member function in the DSM_Group_API class to get the board Series Number. The next step is the most important step in the entire DSM program writing process: after you have instantiated a DSMX object, you must initialize it by calling the ini with the board Series Number as argument. Simply having an DSMX object without calling the ini method will likely cause your program to fail.

Always call the ini function immediately after instantiating a DSMX object!


Configure control settings

Control instructions should be redefined everytime a new chirp is implemented. The reason for this is that the DSM will carry over settings from one chirp to the next chirp. Even if two chirps have the same settings you should redefine the settings just in case.

First set the mode (either Free Run, Master or Slave) and the related multi-board settings:

Mode Settings Implementation
Slave Enable/Disable: slave_mode
Loop Count: loop_count
Auto-Arm Enable/Disable auto_armed
SYNCO Enable/Disable synco_enable
Internal SYNCI Enable/Disable synci_enable

Then set the general control settings that apply to all modes:

Control Settings Implementation
Oversampling Factor: over_sampling_rate
Marker Enable/Disable: marker_enable
Page: page
Data Length Enable/Disable: data_lenght_enable
Phase Reset by Memory Enable/Disable: dds_reset_by_memory


Waveform parameter definitions

There are three ways you can set up your waveforms. The easiest way is to just define waveform parameters using the built-in waveform properties:

Built-In Waveform Parameters Implementation
Start frequency: chirp1
Stop frequency: chirp2
Step frequency: chirp3
Waveform code: code
Delay delay

When we talk about the "built-in waveform" we are referring to a waveform that was constructed using these five parameters.

The second way to define a waveform is to use the user_define_bulk function.

The final way to define a waveform is to use the user_define_file function.


There are two mandatory parameters that you must set for ALL waveforms.

Mandatory Parameters Implementation
Data Length data_length
Memory Depth memory_depth


Finally, there are five optional parameters that may be useful for your waveform.

Optional Parameters Implementation
Marker 1 marker1
Marker 2 marker2
Phase Reset Time 1 RESET_T1
Phase Reset Time 2 RESET_T2
Phase Reset Time 3 RESET_T3


Download data

The next step is to download all of the information stored in the computer memory to the memory on the DSM. To do this for the built-in waveform you should use the download method.

For the User-Defined functions, whenever the functions are called the data is automatically downloaded to the DSM memory.


Start memory

When in Free Run mode, start the memory by using the restart method.

For Master mode, use the arm method to arm the board. When armed, the Master board will wait for the trigger signal then start the memory.

For Slave mode, use the slave_mode property to arm the board. When armed, the Master board will wait for the trigger signal then start the memory.


Stop memory (optional)

With the absence of a stop command, the DSM will continue to chirp until the power is shut off. If you want to stop the DSM memory use the stop method.