Skip to content

Configuring Labrad Nodes

Eric Oelker edited this page Jul 18, 2018 · 21 revisions

Windows 7:

  1. Set environment variables for Labrad. Note: You may have to restart the computer for these changes to take effect.

LABRADNODE = yesr1 (for this example)

LABRADHOST = yecookiemonster

LABRADPASSWORD = usual with ! at end

LABRAD_TLS = off

  1. Install pylabrad on yesr1: pip install pylabrad

  2. Clone the labrad_tools repo (on desktop of yesr1)

  3. Add to python path: C:\users\Desktop\labrad_tools

  4. For yesr1 we need the right version of pyserial for serial server: pip install pyserial -

  5. go to labrad_tools/batch -> start_servers.bat. This will start the labrad node on yesr1.

  6. Configure Labrad node through pylabrad connection in ipython:

#Establish labrad connection
import labrad
cxn = labrad.connect()

#Go to yesr1 Node
r = cxn.registry
r.cd('Nodes')
r.cd('yesr1")

#Add labrad_tools to 'directories' so it can see the server code
r.set('directories', ['C:\Users\srgang\Desktop\labrad_tools'])
cxn.node_yesr1.refresh_servers()

#List available servers (to double-check that it worked)
cxn.node_yesr1.available_servers()

#Add any servers that we want to run automatically:  In this case the SerialServer hardware interface server
cxn.node_yesr1.autostart_add('serial')

#Call the autostart function if you want to run the server right now
cxn.node_yesr1.autostart()

Now the serial server will start automatically in the future when we execute the batch file in step 6.

Ubuntu 16.04: