Dual monitor set up

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2022.2.5
Standard Standalone? (y/n) If not then what?: standard standalone
What are you trying to achieve?:
Using builder view have a message containing information about the participant’s performance during the task displayed on the secondary monitor (for experimenter’s eyes only!).

Nothing attempted yet, but looking back at earlier threads it seems to suggest that this isn’t possible to achieve through builder view - I was wondering why? Is it not possible to create the second window object in a code block and then address it through code…? I’m only wanting to use a simple text object - nothing fancy.

Best wishes,
Jon

Hi Jon,

We would like to make this easier but at the moment this is possible with a code snippet in your Builder experiment.

For example add a code snippet to the first routine in your task.

In the Begin Routine set up the second Monitor

win2 = visual.Window(
    size=[1920, 1080], fullscr=True, screen=0, 
    winType='pyglet', allowStencil=False,
    monitor='MySecondMonitor', color=[-1,-1,-1], colorSpace='rgb',
    blendMode='avg', useFBO=True, 
    units='height', pos = [-200, -200])

Then you can make a text component to draw in the second window (specifying win as win2. For example:

second_screen_text = visual.TextStim(win=win2, name='intro_text',
    text='Examiner Screen \n\nNot seen by participant',
    font='Arial',
    pos=(0, 0.3), height=0.05, wrapWidth=None, ori=0.0, 
    color='white', colorSpace='rgb', opacity=None, 
    languageStyle='LTR',
    depth=0.0);

To draw the stimulus on the second screen add this to your Begin Routine tab:

second_screen_text.setAutoDraw(True)

Then this at the end of the routine to stop drawing it

second_screen_text.setAutoDraw(False)

If you are calculating accuracy you can pipe that into the text e.g.

accuracy = 80# here I made a random value - you are probably calculating this somewhere
second_screen_text.text = 'accuracy is ' + str(accuracy)

Before drawing the second screen text.

Hope this helps,
Becca

2 Likes

Hi Becca,

Thanks very much for this - I have posted a follow up question as I had independently arrived at your solution :slight_smile: but I was missing the setAutoDraw(false) - will reply to let you know if it works!

Thanks again,
Jon

Hi Becca,

Quick follow up - I’ve adapted my code to follow yours.

One modification I found was necessary was to add under “Each Frame”:

# display Experimenter message
secondWin.flip()

Is that to be expected?

Kind regards,

Jon

Hi Jon - Oh yes sorry I forgot that! that is expected yes.

Becca

1 Like