PEBL: The Psychology Experiment Building Language


Community and Support




Test Battery




Tech Reports

Sourceforge Project Site Logo

Frequently Asked Questions (FAQ)

Q: Where is the data?
When you install PEBL, a folder gets created in your documents folder called pebl-exp.0.14 (for version 0.14). Every test in the test battery will be located in a subfolder there, in a folder called battery. Data are all saved within the folder the .pbl script is stored in, in a subfolder called data. So, for the ANT task, look in Documents\pebl-exp.0.14\battery\ANT\data\. Normally, each participant will have their own subfolder in the data directory.

Q: How do I launch a script?
The easiest way is to start the launcher directly from the start menu (Windows) or applications folder (OSX). This will open the launcher, from which you can select and run one of the scripts. If you want to just launch a specific script with preset parameters (screen size, etc.), you can launch the script directly from a shortcut or batch file (see below)

Q: When I try to launch a PEBL script, nothing seems to happen. What can I do?
This could happen for a number of reasons. The first thing you shoud look at is the 'Error Messages' window at the bottom of the launcher. Scroll down to the bottom and see if there is a message that helps you track down what happened. The same text is found in a file stderr.txt that will be located in the directory you started the script.

Q: How do I launch a script directly, bypassing the launcher
This can be done by writing a batch file or creating a shortcut. You may want to do this so you can set different options directly without worrying about setting the right options every time you launch the script. You can also use this to launch PEBL from another program (i.e., if it is one of a series of tests you are conducting controlled by some other piece of software). To create a batch file, create a new text file and name it with a .bat extension, (for example, runme.bat). If you want to run an experiment called experiment.pbl, copy the following into that file:

"c:\Program Files (x86)\PEBL\bin\pebl.exe" experiment.pbl
Make sure you add the quotes, and if you use non-US location for Program Files, change it there. You can add command line arguments to specify different options at runtime: below).
"c:\Program Files (x86)\PEBL\bin\pebl.exe" experiment.pbl -v sub1 --fullscreen --display 800x600 
See more on command line options next. Note that when launching from the command line, you no longer have tha ability to enter a subject code. This can be done within the script too (see another question below).

Q: What command line arguments are available?

example: pebl experiment.pbl -v sub1 --fullscreen --display 800x600 --driver dga

  Invokes script and passes VALUE1 and VALUE2 (and any text immediately
  following -v) to a list in the argument of the Start() function.

  Initiates the global variable gSubNum to IDENTIFIER.  If not set here,
 gSubNum is initiated to 0.

  Sets the video driver, when there is a choice.  For linux SDL, options xf86,
  dga, svgalib (from console).  Also controlled via environment variables.

  Controls the screen width and height (in pixels). Defaults to 800x600.

  Controls the pixel depth.  Depends on your video card.  Currently,
  depths of 2,8,15,16,24, and 32 are allowed on the command-line.
  Controls whether the script will run in a window or fullscreen.

  Turns on unicode handling, with slight overhead

Q:I'm not using the launcher--How can I specify a subject number within the script?
Somewhere after the line where you create a window with the MakeWindow() command, use the GetSubNum() command. So if the window is named gWin:

  gWin <- MakeWindow()
  gSubNum <- GetSubNum(gWin)

Q: How do I use non-ascii characters? When I try, I get little boxes in the text! When I try, the program crashes!
Two things are needed to display non-ASCII characters. First, you need to use a font that is able to display your characters. A number of fonts available in PEBL offer good support in this area. Next, you must save the PEBL script in UTF-8 format. Try using an editor like jEdit or notepad++, each of which offer saving in UTF-8.

Q: I want to translate the gambling task/card sort task into language X. How do I do it?
We offer internationalized versions of these tasks, where you simple need to translate a set of lines in a text file to localize the tests. More details available here..

Q: How do I cite PEBL?

    Mueller, S. T. & Piper, B. J. (2014). The Psychology Experiment Building Language (PEBL) and PEBL Test Battery. Journal of Neuroscience Methods, 222, 250-259. doi: 10.1016/j.jneumeth.2013.10.024.
  • Mueller, S. T. (2014). PEBL: The Psychology experiment building language (Version 0.14) [Computer experiment programming language]. Retrieved June 2014 from


The latest version of the PEBL manual is available below. We also have a simple beginners tutorial, and some other documents of interest.

Introductory Howto

This howto assumes you are running PEBL on Windows using the launcher. To begin, you must install PEBL with the PEBL installer. This provides a number of easy ways to launch the program and experiment scripts. It will create a folder called "pebl-exp" in your "My Documents" folder. Inside that folder, there is a shortcut that will start the launcher, allowing you to run any script in that folder. To run an experiment not in that folder, you can navigate to the script within the launcher. Alternately, you can just copy the new script into the My Documents\pebl-exp folder.

All scripts will produce two output files, one is called "standard output" and one called "standard error". In PEBL launcher, the standard error stream is displayed in the "Errors and Messages" dialog after you script is complete. This includes parsing/compilation messages, and any error messages if the script finished early. If the script contains any "Print" commands for debugging or instrumentation, these will appear in the "User Output" message box in the launcher. If no output is provided by the script, the message "failed to load [C:\Program Files\PEBL\bin\stdout.txt]." will be displayed. This is not an error, but simply means that no output was produced by the script. The easiest way to run PEBL is to navigate to the experiment directory and start the launcher from a shortcut in that directory. The initial parameters of the launcher can (and must) be controlled with a file called pebl-init.txt which must be present in the directory the launcher shortcut starts the launcher in.

This can allow you to have different initial parameters fed into different experiments. To make a new launcher shortcut, first copy the shortcut in the MY Documents\pebl-exp directory, then paste it into the place you want the new launcher to start from. Next, copy and paste the pebl-init.txt file to the new directory. Edit the pebl-init.txt file if you want--you can control the starting directory, the initial command-line parameters, the initial highlighted experiment, etc (check the manual for more details). When your experiment is complete, the data file (if any are produced) should be in the same directory as the script you ran.
Last Modified 9-2009