Configuring SRBox port number on the fly (and other parameters)

JACanterbury jacanterbury at gmail.com
Tue Dec 13 10:19:46 UTC 2011


Not a question, but I thought I'd post some recent findings, cobbled
together from various posts and a little experimentation  [ This may
be explained succinctly elsewhere but I couldn't find all the info I
needed in one place so please excuse the posting if its duplicating
info you already know] - Hopefully they'll be of interest to others at
some point.

Usually I set the commport for the SR response box by using the menu
options in E-studio:
Edit || Experiment || Devices tab || SRBox || and set the Port setting
from the drop-down menu [values 1-4 allowed]

Unfortunately we have a whole range of PCs that are used to run
studies some using serial ports and some using USB serial port
emulators and having the port hard-wired in the ebs2 file is a pain.

So, how to override this at runtime?

There are (at least) 2 ways to override the port setting that's
compiled in the ebs2 file.

The first is at the this can be overridden by making utilising E-
primes global settings which are stored in a text file
e.g. C:\Users\user_name\Documents\My Experiments\Global.startupInfo


You can get E-prime to generate this for you in E-studio as follows:

-Edit || Experiment || Startup Info || Edit global values || then
click the Add button (green PLUS sign) and choose SRBox.Commport from
the dropdown list then click into the field alongside it and enter the
desired port value.
-Click SAVE and the OK.

NB this creates an xml type text file that can be edited using a text
editor (eg notepad)

An example is :-

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<StartupInfo>
  <StartupInfoItem itemName="SRBox.Commport">1</StartupInfoItem>
</StartupInfo>

Note that the above will set the SRBox.Commport setting to use port 1


It seemed to me though that using the Global.startupInfo file was not
ideal though as it's distinct to user profiles
[ though you may well be able to set this for all users by setting the
InitPath key in the registry (HKEY_CURRENT_USER\Software\Psychology
Software Tools\E-Prime\1.1\E-DataAid\ViewOptions\InitPath ) but I've
not experimented with that ]


An alternative way is to user a 'local' config file ( e.g
"my_exp_name.startupInfo" ).

Again, you can get E-prime to create this for you, as above but click
on "Edit Local Values" (instead of global). This creates the xml file
in your experiment folder alongside your ebs2 file. (eg
stroop.startupInfo)

Now, users can then edit this file to change the port number if
necessary without having to regenerate the ebs2 file in E-Studio.

Note that this local file will take precedence over the Global file if
it exists which in turn takes precedence over the value set on the
Devices tab that's compiled into the ebs2 file.


I've only focused on setting the commport but you can change a whole
load of settings in the same way. The drop-down list on the 'add'
screen lists them all (seems to be everything that's available through
the 'Devices' tab)

Hope thats of interest to someone!

cheers,

John

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list