Difference between revisions of "Installing Psychtoolbox"

From Addiction Research Laboratory
Jump to: navigation, search
(Linux)
(Linux)
Line 54: Line 54:
 
#Mobile lab is currently using the Measurement Computing (MCC) dio card [http://www.mccdaq.com/usb-data-acquisition/USB-1024LS.aspx USB-1024LS]
 
#Mobile lab is currently using the Measurement Computing (MCC) dio card [http://www.mccdaq.com/usb-data-acquisition/USB-1024LS.aspx USB-1024LS]
 
#Download/extract USB 1024LS API-driver to desktop: [ftp://lx10.tx.ncsu.edu/pub/Linux/drivers/USB/ MCCUSBHID.1.37.tgz]
 
#Download/extract USB 1024LS API-driver to desktop: [ftp://lx10.tx.ncsu.edu/pub/Linux/drivers/USB/ MCCUSBHID.1.37.tgz]
#Save drivers WHERE
+
#Save drivers '''JOHN WHERE??'''
 +
#NOTE: On Linux we no longer need to use the io32.mexw32 files. Also do not need the ConfigIO.dat file. All IO is controlled via [http://docs.psychtoolbox.org/Daq PTB DAQ function library].
 +
 
 +
'''Conduct tests to confirm PTB is working'''
 +
#Run the following [http://docs.psychtoolbox.org/PsychDemos PTB Demos]:
 +
'''LIST DEMOS HERE'''
  
 
'''PTB Website Links for Linux'''
 
'''PTB Website Links for Linux'''
Line 60: Line 65:
 
#[http://psychtoolbox.org/download/#Linux Download & Install for Linux]
 
#[http://psychtoolbox.org/download/#Linux Download & Install for Linux]
 
#[http://psychtoolbox.org/linux/ Using PTB with Linux/Tips]
 
#[http://psychtoolbox.org/linux/ Using PTB with Linux/Tips]
 +
 
#In future can update PTB from within matlab with function UpdatePsychtoolbox
 
#In future can update PTB from within matlab with function UpdatePsychtoolbox
  

Revision as of 09:16, 1 July 2016

Windows

This page describes how to install and configure Psychtoolbox in Matlab. It also describes how to configure the sound card for low latency, precision use and how to configure IO. More generalized information on this process from Scheiber is at this link. (validated 12/2014)

1. Download and install Psychtoolbox by following these instructions. Note that if installing on a 32-bit matlab you will need to specify a compatible PTB flavor in the matlab command as well as the path, e.g.: >> DownloadPsychtoolbox('C:\toolbox','Psychtoolbox-3.0.11'). Note on Linux you need to specify the branch that includes non-free software.


2. Install drivers and configure fast IO.

From P:\Methods\Matlab\PTB\IO:

For 32bit Matlab on 64bit Windows 7: Copy inpout32a.dll to the C:\windows\sysWOW64 directory
For 32bit Matlab on 32bit Windows 7: Copy inpout32.dll to the C:\windows\system32 directory

3. Copy custom Curtin lab PTB functions to local computer.

FOR CURTIN LAB PC DATA COLLECTION ONLY: Checkout the library via SVN this URL: https://svn.code.sf.net/p/curtinlibrary/code/trunk to access custom Curtin lab PTB functions on your local computer. Check and make sure these four files are included in your local PTB folder:
io32.mexw32
ConfigIO.m
TestInput.m
TestOutput.m

For other machines, copy the contents of the above library to your study programs folder, for example: C:\Local\CurtinLab\LocalKaye1\Kaye1_Programs.


4. Indicate base address for IO card. See instructions on this page: Create IOConfig.dat File


5. Conduct preliminary timing test. If this is a Windows OS installation, type GetSecsTest at the Matlab command prompt to conduct a preliminary timing integrity test. For more information on this test, type help GetSecsTest at the Matlab command prompt and/or read the old Psychtoolbox Wiki entry.

6. Fix DAQ error. Open C:\Program Files\Matlab\R2012a\toolbox\daq\daq\private\mwmcc.ini

Search for PCIe and delete one of the double brackets. This is a bug and hopefully will be fixed in subsequent release by Matlab

Linux

Download PTB

  1. Download PTB via instructions here: http://psychtoolbox.org/download/#Linux
    1. In Terminal type: sudo apt-get install subversion
  2. Open Matlab
    1. In terminal navigate to folder: cd /matlab2015b/bin
    2. Type ./matlab
  3. Download m file from link above into Downloads folder and unzip: DownloadPsychtoolbox.m
    1. In Matlab run: DownloadPsychtoolbox('home/ra/ptb/')
    2. Answer question with 'p' for permanent.
  4. In Matlab run PsychLinuxConfiguration
    1. Answer yes to all prompts.
  5. In Terminal run: sudo apt-get install linux-lowlatency
  6. Map server: Accessing/Mapping the Network on Linux OS
  7. Copy CurtinLibrary folder (from P/Methods/Matlab/Toolboxes) to local computer dir: '/home/ra/'

Install drivers and configure fast IO.

USB 1024LS IO Card

  1. Mobile lab is currently using the Measurement Computing (MCC) dio card USB-1024LS
  2. Download/extract USB 1024LS API-driver to desktop: MCCUSBHID.1.37.tgz
  3. Save drivers JOHN WHERE??
  4. NOTE: On Linux we no longer need to use the io32.mexw32 files. Also do not need the ConfigIO.dat file. All IO is controlled via PTB DAQ function library.

Conduct tests to confirm PTB is working

  1. Run the following PTB Demos:

LIST DEMOS HERE

PTB Website Links for Linux

  1. Requirements
  2. Download & Install for Linux
  3. Using PTB with Linux/Tips
  1. In future can update PTB from within matlab with function UpdatePsychtoolbox

TO DO UPDATE BELOW:

  1. Will not need to create ConfigIO file, or use io32 dll drivers
  2. Will need to downlaod appropriate IO driver, but use DAQ PTB functions

Page created by JJC, 2010-04-21