Now Shipping! – The EyeLink 3; combined head and eye tracking at up to 1000 Hz.

FAQ: How do I save behavioral data in a text file?
#1
If your experiment contains a Data Source and/or variables, the values of the Data Source columns for each trial as well as the current variable values can be saved in a text file in the following way:

Place a RESULTS_FILE node anywhere within the experiment's workspace (You can find the RESULTS_FILE node in the "Other" nodes section above the workspace). The RESULTS_FILE node does not need to be linked to any other node as shown in the image below.

Place an ADD_TO_RESULTS_FILE node and connect it to the experiment flow at the point when you want the values of the Data Source and/or variables to be written to a results file. Each time the ADD_TO_RESULTS_FILE node is executed within the script (typically at the end of each trial) it writes a line of text in a .txt file and includes the current values of any Data Source columns and/or variables which can be selected via the "Variables" property of the RESULTS_FILE node. Unless you choose to de-select some of these values, the RESULTS_FILE node will by default include all Data Source columns and/or variable values in the results file.

You can have multiple RESULTS_FILE and multiple ADD_TO_RESULTS_FILE nodes in an experiment and choose to assign only some Data Source columns / variables to each RESULTS_FILE via the "Columns" property of the RESULTS_FILE node. This way you can have different results files for different tasks within the same experiment. In such a case, each ADD_TO_RESULTS_FILE node can be used to update a different RESULTS_FILE node via the "ResultsFile" property of the ADD_TO_RESULTS_FILE node. The "Label" property of each RESULTS_FILE can be changed to reflect its role within the experiment and this in turn will change the name of the text file saved within the participant's results folder at the end of the experiment. By default, a saved results file will be called RESULTS_FILE.txt to reflect the node's label.

The Stroop example that is provided with Experiment Builder (File menu -> Examples -> Stroop) illustrates how to create a non-eye tracking experiment in Experiment Builder. In short, Experiment Builder allows you to create non-EyeLink experiments by going to the top menu bar and clicking on Edit > Preferences (ExperimentBuilder > Preferences on macOS) > Experiment and unchecking the "EyeLink Experiment" property. Doing so will remove most EyeLink-specific nodes from the experiment.

   

This image shows a "key_press" variable being updated with the participant’s key press response (via the UPDATE_ATTRIBUTE node). The “key_press” variable value is then written to a RESULTS_FILE.txt via the ADD_TO_RESULTS_FILE node at the end of each trial.