OnsetSignalEnabled for EEG
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



OnsetSignalEnabled for EEG Expand / Collapse
Author
Message
Posted 2/23/2010 4:31:22 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 6/26/2011 7:20:44 PM
Posts: 10, Visits: 45
Hi,

For over 10 years our lab has been using writeport address, val (values from 0 to 15).  However, recently I was testing our equipment and found in the PST knowledge base about the On and OffSetSignalEnabled code which looks better than the writeport because you aren't waiting for the screen refresh.

I am doing a simple visual (and would like to test auditory later) paradigm for testing.  2 pictures (from a previous eprime example), with same ISI but different pre-releases.  I have 4 conditions in this block - red car (StimTrig1 = 1); blue car (StimTrig1 = 2); ISITrig150: for red car = 6; for blue car = 10;  (I found that having the same value for ISITrig150 6 for example meant that the Stimulus Trigger for the next stimulus wouldn't come up)

Port is defined at the beginning of the experiment CONST Port = &H378

I defined StimTrig1 and ISITrig150 in the TrialList attributes, the trial procedure is inline code below and then ISI2 (text display) and Stimulus2 (ImageDisplay, vertical blank on) 

DIM trigOnCodeISI as Integer
DIM trigOnCodeStim as Integer
DIM trigOffCode as Integer

trigOnCodeISI = CInt (c.GetAttrib ("ISITrig150"))
trigOnCodeStim = CInt (c.GetAttrib ("StimTrig1"))
trigOffCode = 0

ISI2.OnsetSignalEnabled = True
ISI2.OnsetSignalPort = Port
ISI2.OnsetSignalData = trigOnCodeISI

ISI2.OffsetSignalData = True
ISI2.OffsetSignalPort = Port
ISI2.OffsetSignalData = trigOffCode

Stimulus2.OnsetSignalEnabled = True
Stimulus2.OnsetSignalPort = Port
Stimulus2.OnsetSignalData = trigOnCodeStim

Stimulus2.OffsetSignalData = True
Stimulus2.OffsetSignalPort = Port
Stimulus2.OffsetSignalData = trigOffCode

This code is really unreliable, sometimes I get 1's and 2's and at the beginning of the ISI even though I had commented out the Stimulus Trig code and even deleted it from the inline.  I will sometimes get only the first trigger as 10 and then it drops to 8 for the rest (if I use sequential).  I have tried putting only the code for the ISI before the ISI and code for the stimulus in between the ISI2 and Stimulus2 objects and this does not help.   

I am unsure why my code is unreliable, the stimuli are on for 400 ms, ISI is 500 ms.  Any suggestions please?  Am I using this code correctly?

Many thanks,

Vanessa

Post #4098
Posted 3/3/2010 8:05:55 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 6/26/2011 7:20:44 PM
Posts: 10, Visits: 45
Hi All,

I had a typo with OffsetSignalData twice instead of OffsetSignalEnabled!!!  Thanks to Alison at Eprime for spotting the basic error!

DIM trigOnCodeISI as integer
DIM trigOnCodeStim as integer
DIM trigOffCode as integer

trigOnCodeISI = CInt (c.GetAttrib ("ISITrig100"))
trigOnCodeStim = CInt (c.GetAttrib ("StimTrig1"))
trigOffCode = 0

ISI1.OnsetSignalEnabled = True
ISI1.OnsetSignalPort = Port
ISI1.OnsetSignalData = trigOnCodeISI

ISI1.OffsetSignalEnabled = True
ISI1.OffsetSignalPort = Port
ISI1.OffsetSignalData = trigOffCode

Stimulus1.OnsetSignalEnabled = True
Stimulus1.OnsetSignalPort = Port
Stimulus1.OnsetSignalData = trigOnCodeStim

Stimulus1.OffsetSignalEnabled = True
Stimulus1.OffsetSignalPort = Port
Stimulus1.OffsetSignalData = trigOffCode

Post #4123
« Prev Topic | Next Topic »


Permissions Expand / Collapse

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

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.109. 9 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