Skip to content

Using_static

T. Pruttivarasin edited this page Sep 28, 2015 · 20 revisions

In this page, we describe steps that will get the Pulser up and running in a simple fixed frequency mode.

Setting up the LabRAD manager and Pulser server

  1. Assumed that all the software is installed and you have cloned the code from the repository, go ahead and open LadRAD manager. You should see the LabRAD window like the one below. You can leave the port as it is. Put in the password if you need (you can change it later).

LabRAD initial

  1. Now after this simply click the top left "Play" button. This will start the Manager server and the Registry server.

LabRAD blank

  1. Then those two servers should appear.

LabRAD basic server

  1. Navigate in the command prompt to "Python_files" -> "servers" -> "pulser". Then run the server script by typing python pulser_ok.py

  2. If there's nothing wrong, the Pulser server should appear in the LabRAD manager.

Talking to the server by a client connection

So now that the server is running, to make the server change the frequency or amplitude of one of the DDS channel, we need to use a "client" to talk to the server.

  1. Open a python console.

  2. import labrad then cxn = labrad.connect(). This will connect to the local LabRAD manager. Enter the password is it's needed.

  3. Now type cxn. This will list all available servers. You should see the server called pulser in it.

  4. Do pulser = cxn.pulser then type pulser and this will list all available commands that you can use.

  5. To change the frequency/amplitude of the DDS channel, we need to know the channel name. This is listed in the file called hardwareConfiguration.py in the same "pulser" folder. Look at where it says "ddsDict". This is where all the channels are configured. By default, the first channel (channel 0) is called "DDS_0"

  6. We are using LabRAD framework and all quantity should have appropriate unit. To use that we have to import necessary packages first. Do from labrad.units import WithUnit. Now after this, any quantity that has unit should be declared as value = WithUnit(2.0, 'MHz')

  7. So let's try changing the amplitude of "DDS_0" channel. Do pulser.amplitude('DDS_0', WithUnit(-10,'dBm')). This will set the amplitude to -10 dBm.

  8. Let's now change the frequency. Do pulser.frequency('DDS_0', WithUnit(80.0,'MHz')).

  9. If you don't like command line, we have a simple PyQt-based GUI front-end in the folder clients. Simply execute python DDS_CONTROL.py.

Description of the configuration file

In the DDS setting of hardwareConfiguration.py, there are a few parameters in the line 'DDS_0':ddsConfiguration(0, (0.01, 400.0), (-48,-5.0), 70.0, -40).

  • First one is the name. It's now set to DDS_0.
  • Next number right after the parenthesis is the channel number. This is 0.
  • Next is the allowed frequency range in MHz. This is from 0.01 MHz to 400.0. If you try to set the frequency beyond this range, the program will complain.
  • Next is the allowed amplitude range. It's -48.0 dBm to -5.0 dBm.
  • Next is the initial frequency (set to 70.0 MHz).
  • Last number is the initial amplitude (set to -40.0 dBm).

Initial values are the setting that the pulser server will set all the channels to right after we started the server (by running python pulser_ok.py). So that being said, for all the changes in the configuration file to take effect, you have to stop the pulser server and restart it.

Using the PyQT GUI to control the DDS

By running python DDS_CONTROL.py, you can use a GUI client that control the amplitude and frequency of the DDS channels. However, there are a few settings that we should make sure that are correct.

The GUI client will look for a channel name that matches what's listed in the registry. The location of the registry is set in the very first picture of this page. If you want to change it's location, you can edit it in LabRAD.ini file.

Now in the registry folder, there is a folder called Clients.dir/DDS Control.dir and there is a file called display_channels.key. We just have to make sure that the name listed in this key matches the name (not the channel) of the DDS channel in the hardwareConfiguration.py file.

Once you have made change in the registry, you have to restart LabRAD manager for the registry to update.

The GUI should look something like this

DDS GUI

Clone this wiki locally