Skip to content

Using_static

T. Pruttivarasin edited this page Jul 15, 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.

Using 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')).

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).

Clone this wiki locally