E-prime 2 validation
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



E-prime 2 validation Expand / Collapse
Author
Message
Posted 4/30/2007 6:38:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/9/2007 6:26:06 AM
Posts: 5, Visits: 20
Dear  all,

I am currently designing my experiments and I encountered a problem with my port communications. Then I stumbled a couple off days ago across e-prime 2 in which this problem is solved.

I tried to find out if this version will work prolonged (a year or so ) and is already tested enough to be used in an experiment, but I couldn't find any confirmation on the website.

So I was wondering can I use the latest version for my experiments which will have a duration of a year? Is it stable and time accurate enough?

Or should I stick to E-prime 1.2 and try to solve my port communications trouble with an inline object?

Best wishes Jolanda

Post #321
Posted 4/30/2007 12:16:43 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:44:24 PM
Posts: 698, Visits: 1,481
I would be interested in hearing what your port woes were regardless of the version of EP as if there is an issue, it shoudl be addressed.  In general, if you are using a parallel port with EP 1.x, we strongly advise using the ParallelPortConfigure full script to set the mode of the port, which adds the ability to use the DATA port for read or write and also avoids the need to go into the BIOS to do the configuration.

As far as timing goes, PST is expected to make a formal statement on using E-Prime 2 for critical timed trials during the month of June 2007 when timing tests and other release conditions permit it.

Informally (and non-binding statement), we have performed a number of timing tests with E-Prime 2 on Windows XP and Vista (x86) and have not currently run into any timing issues provided that the hardware meets the requierments for the paradigm.

As far as long term use and replication, using the BETA for such use is currently at least mildly discouraged.  Each crop of BETA will expire 3-6 months which will not permit its usage.  For replication, the methods section typically lists the version of E-Prime being used and using a version that cannot be later used for replication may not be advised depending on the situation.  The E-Prime 2 BETA program is slated to end after the next 2-3 public releases.

-Brandon

Post #323
Posted 5/1/2007 5:17:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/9/2007 6:26:06 AM
Posts: 5, Visits: 20

Dear Mr Brandon,

The problem with port communications isn't an e-prime problem as such. The problem I have is that it requires scripting and I don't have experience with scripting. I copied the bit of script (see below) that is necessary to make port communications work. I also changed the bits necessary and stuck it on the start of my time line. I didn't configure anything else which felt odd. So w>hen I saw version 2 where I could specify in the comport whether the pulse would be input or output, part of my problem seemed  solved.>

X.OnsetSignalEnabled
X.OnsetSignalPort
X.OnsetSignalData> >

X.OffsetSignalEnabled
X.OffsetSignalPort
X.OffsetSignalData
 > >

>>>But only part of it because I think this will result in a non descriptive prolonged pulse to my EEG equippement. What I want is a pulse at the start of the presentation of the stimulus (P1) and a pulse when the participant pushes a button(P2). I also want the presentation pulse (P1) to have a code that specifies that specific stimulus presented and I want the reaction code to specify if the participants reaction was right or wrong.>

>I have no idea how to do this. >>Do you know how to get the communications port to do this? Any help is much welcomed!>

>Best wishes Jolanda>

>> 

Post #325
Posted 5/1/2007 4:08:59 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:44:24 PM
Posts: 698, Visits: 1,481
E-Prime 2.0 Professional is going to be introducing the ability to do a number of port pulsing mechanisms, but that feature is about a month away for public consumption (it is next in the queue).

Please see the attached example as it lays out the most common method of doing port pulsing in E-Prime 1.x and E-Prime 2 (non-pro).  I believe this could be mapped to your paradigm.  This is not a full blown sample, but shows a method to perform a pulse trigger at time of stimulus and response.  You can also view the Process Responses Template sample in web support for another way to send a port value based on a response.

-Brandon

  Post Attachments 
PortPulseAtStimulusAndResponse.es (12 views, 27.54 KB)

Post #326
Posted 5/2/2007 6:39:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/9/2007 6:26:06 AM
Posts: 5, Visits: 20
Dear Mr Brandon,

I am trying to understand the script in the example experiment you sent. But since I am a layman in programming in script I have some difficulty.

I if programm the following at the start(modified from SetupStimulus inline object):


Dim PictureDisplay As RteRunnableInputObject
Set PictureDisplay = CRteRunnableInputObject(Rte.GetObject("PictureDisplay"))

Dim nPortAddress As Long
nPortAddress = CLng(c.GetAttrib("PortAddress"))

Dim nFirstPortValue As Long
nFirstPortValue = CLng(c.GetAttrib("Stimsignal")) 

PictureDisplay.OnsetSignalEnabled = True
PictureDisplay.OnsetSignalPort = &H378
PictureDisplay.OnsetSignalData = nFirstPortValue

Am I then telling the computer that it the picturedisplay is the object for which it has to send the first pulse and that the pulse is defined in the attribute Stimsignal?

Also since I don't use a feedback object in my experiment what part of the script of the ProcessStimulus inline text object from your example do I need to send the second pulse refering to the response?

I need to make something like:

Defining were to find the response (it is defined in picturedisplay) and after defining that 

 If  [CorrectAnswer] = true then send the word "Correct" as SecondPortValue to the port

 If  [CorrectAnswer] = false then send the word "Wrong" as SecondPortValue to the port

Many thanks for your help so far!

Cheers Jolanda

Post #329
Posted 5/2/2007 10:27:04 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:44:24 PM
Posts: 698, Visits: 1,481
1) You can directly use the variable name of the object in question.  If your object is named PictureDisplay in your experiment, then a variable PictureDisplay is created for you by E-Studio code generation and you can directly access it.  You will commonly see lines like Set theResponseObject = CRteRunnableInputObject(Rte.GetObject("Stimulus"))  so that the code is more easily able to be used across experiments where you would only have to change one line versus all of the lines (that is doing a search and replace for Stimulus over PictureDisplay).  So if you defined an object in the interface named PictureDisplay, then those first two lines in your code last reply can be cut out.

2) Your understanding of assigning the port value is on target.

3) For most port access, you can only send one byte at a time to it which maps to one ASCII character.  So you cannot in most cases send "Correct" or "Wrong".  You could send "C" and "W" which would map to 67 and 87 in decimal equiv.  In the example, it shows how you can map an integer to a response so that "cat" = 1, "dog" = 2.  If you know there is something expected like that you can do the mapping.  If things will be open eneded, then there is not much you can do besides doing some post processing later.  You may send the trial number so that it could be later associated, but not that a byte can only hold 0-255 values so larger trials would not work.

If you only concerned with the accuracy value, then send 1 for accurate and 2 for not accurate.

The example used a boolean OR operation to send the mapping to the cat/dog/etc as well as the accuracy.  By using boolean bit-masking you can have 16 unique values that can be associated with what is sent.

-Brandon

Post #330
Posted 5/2/2007 10:30:22 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Administrators
Last Login: Yesterday @ 9:44:24 PM
Posts: 698, Visits: 1,481
One thing I want to clear up is the use of "first port value" and "second port value".  Please note that this is not related to "port value at time of stimulus onset" and "port value at time of response".  Most external equipment requires to see the port value in a transition, so two values must be sent to tigger the pulse.  Thus if you want to send a 1 for the stimulus onset you have to send 1, then wait the pulse width value required by the external equipment usually 10-50ms, and then send a clearing value usually 0.  So for each action you want to log with the external equipment, you have to send two values.  One to set the value and one to clear.

-Brandon

Post #331
Posted 5/3/2007 7:14:23 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/9/2007 6:26:06 AM
Posts: 5, Visits: 20
Sorry to be such a pain but I still don't quite understand:

If I want to send a pulse at the beginning of presentation of my stimulus including a code that specifies that stimulus  can I then program the following:

Dim nPortAddress As Long
nPortAddress = CLng(c.GetAttrib("PortAddress"))
     (but what am I saying here?)

Dim nFirstPortValue As Long
nFirstPortValue = CLng(c.GetAttrib("StimSignal"))
 (<-- refers to the code to be sent?)

PictureDisplay.OnsetSignalEnabled = True
PictureDisplay.OnsetSignalPort = &H378
PictureDisplay.OnsetSignalData = nFirstPortValue
 (<--says this is the first pulse right?)

But after this I have to put a line in in to clear the pulse and reset it to 0 how do I write that?

Then I have to write a piece I have to stick in the timeline after picture display to get a pulse for the response. I do have an attribute called CorrectAnswer which can be either 1 or 2 depending on the stimulus (examp: blue flower i= 1 redflower = 2, correct answer depends on wheter red or blue flower is presented but for each stimulus has a fixed value stated in attributes. Also coding with eiter 1 and 2 or R and W for right and wrong is perfect) but how do I write the response script?

I am sorry I read the second bit of script from your example a number of times but I have no Idea how to do this.

Cheers Jolanda

Post #335
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 3:46am

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.109. 10 queries. Compression Disabled.
 
Privacy | Terms of Use | Terms and Conditions | Legal Trademarks | Authorized Use | Quality Policy
Copyright 2012 Psychology Software Tools, Inc. All Rights Reserved
Email: Info@pstnet.com | Telephone: 412.449.0078 | Fax: 412.449.0079