Biopac not receiving E-Prime signal for second part of n-back task

99 views
Skip to first unread message

Ashley Sanders

unread,
Aug 9, 2013, 1:08:02 PM8/9/13
to e-p...@googlegroups.com
Hi all,
 
 I am having trouble getting a stimulus delivery/response signal to show up on Biopac for the second part of our n-back experiment. The first task, zero back, asks the subject to press a certain key when a neutral face is presented (non-target) and another key when a scared face is presented (target). The inline script is as follows and works perfectly in connection with Biopac:
 
Const OutPort As Integer = &hD800
'Const BioPacTrigger As Integer = &h01
 
WritePort OutPort, 0
 
TaskStimZERO.OnsetSignalEnabled = True
TaskStimZERO.OnsetSignalPort = OutPort
TaskStimZERO.OnsetSignalData = c.GetAttrib("BioStim")
 
TaskStimZERO.OffsetSignalEnabled = True
TaskStimZERO.OffsetSignalPort = OutPort
TaskStimZERO.OffsetSignalData = 0
 
Next, the one back section asks the subject to only press the target assigned key after two scared faces have been presented in a row. This is where Biopac is not collecting a signal. The inline script is as follows:
 
Const OutPort As Integer = &hD800
'Const BioPacTrigger As Integer = &h01
 
WritePort OutPort, 0
 
TaskStimONE.OnsetSignalEnabled = True
TaskStimONE.OnsetSignalPort = OutPort
TaskStimONE.OnsetSignalData = c.GetAttrib("BioStim")
 
TaskStimONE.OffsetSignalEnabled = True
TaskStimONE.OffsetSignalPort = OutPort
TaskStimONE.OffsetSignalData = 0
 
 
I have tried numerous ways to get this to work but have failed. If anyone has any advice, please let me know. Your help would be GREATLY appreciated!
 
 
Thanks in advance,
Ashley

Paul Groot

unread,
Aug 10, 2013, 2:43:41 PM8/10/13
to e-p...@googlegroups.com
Hi Ashley,

seems pretty straightforward inline script. Just a few trivial checks:

Just declare the constant OutPort just once in the global use script section. If this is done properly, you can remove the corresponding lines from the two inline scripts.

Did you verify the values of "BioStim"? These should be numbers ranging from 1 to 255. Also, the duration of TaskStimOne should be at least as long as the sampling interval used by BioPac. You could verify this by enabling logging of OnsetTime and OffsetTime of TaskStimOne for example. Another method is to add a few Debug.Print statements:

Debug.Print "BioStim value: " & CInt(c.GetAttrib("BioStim"))
Debug.Print "TaskStimONE.Duration: " & TaskStimONE.Duration

And is TaskStimONE really the object that is used during the one back phase?

If these checks don't help, you could test if the IO port is still accessible by adding this below the WritePort statement:

WritePort OutPort, 0
Sleep 1000
WritePort OutPort, 255

This should always give a high pulse of one second on all digital lines.

best
paul


--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/d53d8de5-2b05-4ee2-a466-9a15a471e6f8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages