Error Management

Now that we have re-arranged things a little, we can set the Iteration Count for the RECORDING_SEQUENCE to 1. This is shown below.
2014-04-06 16_32_12-Developing Experiments using Experiment Builder_EYETRACKING - Microsoft PowerPoi
There are a few remaining things we need to do before we can begin recording eye movements. Here we will now start getting errors after re-arranging so much. But this is a good learning opportunity as we will take a look at the types of errors that can occur, and what you can do to  fix them!

Unfortunately, as with most programming languages, moving things around in Experiment Builder can have an impact on variables that link to it. If we now Test Run the experiment it can no longer find the images because we have moved the Data Source to a new location! Oh no!

2014-04-06 16_33_30-Developing Experiments using Experiment Builder_EYETRACKING - Microsoft PowerPoi
To remedy this situation, we need to look at all of our variables and resources and re-link them to the new location for the Data Source. Lets start with the error from the Output tab – It cannot find the reference to the DataSource in:
2014-04-06 16_34_23-Developing Experiments using Experiment Builder_EYETRACKING - Microsoft PowerPoi
If you click on the error in the Output tab it will take you to the node where the error lies and in the Properties panel you can see an error shown in red. This is helpful since it is trying to show us where we have messed things up!

2014-04-06 16_35_26-Developing Experiments using Experiment Builder_EYETRACKING - Microsoft PowerPoi
Click on the red error in Source File Name and re-link the image_name in the datasource to it’s new location within SEQUENCE. This is shown below.

Test run again…What else is wrong?! There is a problem with the CONDITIONAL that links to the expected_button in the datasource. To fix this, re-link this to its new location. Again, notice the red text highlighting where the problems are, as shown below.

Cross your fingers and test run it again. Is it fine now? Yep! You should be able to successfully test run now. You will have the correct number of trials with a drift correct preceding each one.

However, in testing it out, it seems something else is wrong. You may notice that just before the drift correct you see a preview of the image about to be shown drawn to the next trial. This is caused by the prepare sequence. We need to insert a blank screen after each trial to stop us seeing this preview. It’s important to understand that some errors won’t let you run the experiment. Those we have fixed already. However, other types of errors – so-called logic errors – are those that occur because, although everything technically works, there’s a flaw in the logic of what we’ve got working somewhere that is causing undesired outcomes.

To fix this, go to the RECORDING_SEQUENCE and drag down a new DISPLAY_SCREEN. Call this DISPLAY_BLANK_SCREEN. Insert it at the end after ADD_TO_RESULTS_FILE. These steps are shown below. This will fix the preview problem! You now have a working experiment with a drift correct!