by Urs Fischbacher



  z-Tree: Tips & Tricks


Licencing   Installation   First Steps   Programming   Layout   Running a session   Printing   Other Tips   Future improvements


Installation

Laboratory

Software

Sessions

Connection z-Tree/ z-Leaf

File structure


Is there a web page for your lab that provides information regarding its equipment?

Yes, the web page is here.

top of page

What are the technical requirements to install and run z-Tree.

The hardware requirements are modest. Until 2001, we worked with 486/66 with 16 MB of RAM and everything worked fine. I would make sure that there is enough RAM (e.g. 64 MB) installed. For the current istallation in Zurich see here.) The communication between the server program (z-Tree) and the clients program (z-Leaf) works with TCP/IP (network protocol for communication between clients and server), i.e. the server needs a fixed IP address and a network card or a modem. The recommended system software is Windows NT (versions 3.51 and 4.0 are tested), Windows 2000 (is also tested) or Windows XP. z-Tree does not work well with Windows 95/98/ME (z-Leafs than often freeze). There is no other software than z-Tree and z-Leaf (client software). The z-Tree software is written in Visual C++.

top of page

I want to teach z-Tree in our lab. What is the best way to install it?

Install z-Tree and z-Leaf in a directory on the local harddisk of each lab computer. Make shortcuts to zLeaf as explained in "How can I create different z-Leaves to test a treatment with several clients on a single computer ?".

top of page

Can z-Tree be programmed on computers using Windows 95 or 98 (or Windows ME) system software?

In general, this is possible but a problem with Windows 95/98/ME appears on the client side: After some time, the z-Leafs (the computer terminals connected to the server) freeze. So if you want to run a treatment for testing, this is tedious but it works. The z-Leafs then freeze by and by and they have to be ended (by pressing [F4]) and restarted. Running a session though should be done on computers using Windows NT, 2000 or XP.

top of page

If z-Tree is installed on a server running Windows NT, do the computer terminals connected to the server (z-Leafs) also need to use NT or is it possible for the terminals to run Windows 98 or 95 (or even Windows ME) to avoid that the z-Leafs freeze?

The problem is that the computer terminals connected to the server (z-Leafs) freeze on computers using Windows 95 or 98 (or Windows ME), so that also z-Leaf must run with NT or 2000 system software.

top of page

Is it possible to run 2 sessions in a lab at the same time?

To run more than one z-Tree in a lab, put two copies of z-Tree and z-Leaf into two different (network) directories (in the explorer) and start the two "sessions" (copies) in the two directories.

top of page

Is it possible to run 2 sessions on a single machine at the same time?

To run more than one z-Tree on a single machine, one has to use different "channels". One can do this with the command line option “/channel”. Use channels starting from 0 as a starting address to offset the IP Port. In Version 2.0, one uses the IP Port Nr. 700 plus a channel. In version 3.0, higher port addresses will be used.

top of page

z-Tree only runs on the server but not on the client computers. When I try to start z-Tree on one of the client computers, I get the message: "Could not get or write server's address. Possible reasons: 1) TCP/IP not installed or no network card installed. 2) Server has no write permission in current directory.". What is wrong?

When z-Tree (the server program) starts, it checks the network and allows z-Leaf (the client software) to connect. For that, a TCP/IP connection must be established. To establish the connection, an IP number has to be written into a server file.
The server writes this message if it is not able to write his own IP number into a file. This can be for three possible reasons: - There is no network card installed. - The network driver TCP/IP is not installed. - The server is not able to write the file because e.g. it got no permission to do so.
Please check for these three reasons and try again.

top of page

To make the communication work between a client (z-Leaf) and the server (z-Tree), it is sufficient to have a TCP/IP connection. So the z-Tree software is working over the Internet and experiments can be run with clients all over the world?

The communication within experiments that are programmed with z-Tree works with TCP/IP, i.e. the experiments also work over the Internet. If a z-Leaf (or z-Tree) is connected with a modem, check that the modem does not close the connection., i.e. set the timeout to infinity.

top of page

I'd like to perform a z-Tree session over the Internet. How does this work?

You start z-Tree on a server (which is not protected by a fire wall). You note down the IP number of the machine on which z-Tree runs (i.e. 123.45.67.89). (You find the number in the file "server.eec" in the z-Tree directory or in z-Tree's leafdir directory. This file is automatically written as soon as z-Tree is started.) After that you start the z-Leaves with the option /server IP_NUMBER, i.e. with the option /server 123.45.67.89. You can enter the option in a shortcut or start z-Leaf from a command line window. Then the connection between z-Tree and z-Leaf is established. Attention: You have to guarantee that the connection does not break down. For instance, if the clients are connected via a modem that shuts down the connection after a timeout, you have to set the timeout sufficiently high. Otherwise, z-Leaf looses the connection and there is no way for z-Tree to re-establish the connection.

top of page

Why do subject PCs not connect to the experimenter PC? It says it can not create a socket.

To connect with the experimenter PC, the zLeaves have to know the IP number of it. There are different ways to provide zLeaf with the IP number of the machine running z-Tree:

1.	If you place z-Tree and z-Leaf in a common network directory, you should have no problem.
	z-Tree writes it's IP number into the file "server.eec" in its home directory or 
	into the zleafdir (see Configurable Directories). 
	zLeaf checks whether there is this file in it's (zLeaf's) home directory. 
	If the file is found, zLeaf tries to connect with z-Tree on the machine with the 
	IP number given in this file.
2.	You can specify the IP number with the command line option "/server". 
	The easiest way to do this is to create a shortcut to zLeaf.
3.	If no other IP number is specified, zLeaf tries to connect with z-Tree 
	on the local machine.

top of page

I wonder if you have any advice about how we should organise the file structure?

There are some tips in the "What's new in 2.0"-manual (5. Configurable Directories). Furthermore, the following picture shows our current installation.



On this picture:
"z-Tree experiments" is the shortcut:
z-Tree /datadir expdata /leafdir ..\zleaf /privdir priv /tempdir temp /gsfdir temp
"z-Tree test" is the shortcut:
z-Tree /dir testtrash /leafdir ..\zleaf

Permissions:
Experimenters have read and write permission in all directories.
Subjects have read permission in the zleaf directory.

Startup procedure:
We put a batch file (which lies on the server) into the startup folder of the subjects. This batch file should look about as follows (suppose "L:" is the volume of z-Tree and z-Leaf and you want to start the z-Leaves in English):

-------------
L:
cd \zleaf
start zleaf /language english
-------------

top of page


Last modified: April 14, 2003; Urs Fischbacher (fiba@iew.unizh.ch), Marianne Sulzer