Task Events Error With fNIRS

109 views
Skip to first unread message

David Brush

unread,
Feb 4, 2016, 6:21:24 PM2/4/16
to E-Prime
Hello,

I am using E-Prime 2.0 Professional along with an fNIRS device (connected via parallel port). I have been working to have triggers sent for the OnsetTime using the task events feature. For some reason, the triggers appear on the fNIRS device for some stimuli but not others. Any thoughts as to why this might be occurring? 

I thought that it might have something to do with the pins needing to be reset, so I added another event to set a ResetBit action hoping that would fix the problem. Unfortunately, that did not work either. 

Does anyone know what I can do to get triggers to appear for all of the OnsetTimes?

Thanks,
David Brush

-- 
___________________________
David Brush
Clinical Psychology Doctoral Student
Department of Psychology
University of Central Florida

David McFarlane

unread,
Apr 11, 2016, 4:31:25 PM4/11/16
to e-p...@googlegroups.com
David,

FWIW, we have a similar problem here. Oddly, we get different results,
from different programs, and with the same program depending on whether
we run it using E-Run, E-Studio > E-Run > Run ("ES-Run"), or E-Studio >
E-Run > Test ("ES-Test"). Even when I make a fresh program, directly in
EP2.0.10.356 (SP2) Pro, and have it do nothing but send output to some
EEG equipment using the Parallel device with Task Events, some of the
output fails when run using E-Run (although all of the output from that
program succeeds when run using ES-Run or ES-Test). By contrast, all
output using WritePort or OnsetSignal succeeds, no matter how we run
those programs.

This is with a Dell Optiplex 3020, running Windows 7 64-bit, with an
add-on LPT board. I do wonder if this problem is peculiar to this
machine. Tomorrow I will haul another machine over to that lab, just to
see if it makes a difference. I will start with another Dell Win7-64
machine; after that fails I may just haul over another WinVista-32 or
even a WinXP machine.

I also have a ticket in to PST Support, and they have been looking into
this for me. You might want to submit your own ticket. Tell them I
sent you :).

-- David McFarlane

David Brush

unread,
Apr 11, 2016, 8:16:57 PM4/11/16
to E-Prime
Hi David,

I appreciate the response and am glad that I am not alone in this, although I am sorry you are running into similar problems. I do not believe it is computer specific, as I have run into the same problems on both a laptop with an add-on LPT board and a desktop with a built-in parallel port.

That being said, I was able to get my tasks to run with a few work-arounds. For starters, in the Duration/Input tab if the PreRelease is set to anything other than 0 for me, the triggers, sent from Task Events or InLine, will not send properly. I have some Task Events throughout my tasks, but to get those to work I had to set the action to WriteByte, the Source to Custom, set a custom number 1-9 (fNIRS triggers have been hit or miss when custom is set to 10+), and finally set the Data Type to Byte. For most of the triggers, however, I have had to use InLine code.

What I have noticed is that using ResetBit, SetBit, or ToggleBit to try to change the port back to 0 from whatever custom trigger I sent would not work. Instead, I had to use InLine code (Writeport [port address], 0). 

I do not know if any of this information is helpful to you, and I am still figuring this out as I go. 

I will look into putting in a ticket to PST Support and will be sure to tell them you sent me. Please keep me updated, and I will do the same.

Best,
David Brush

David McFarlane

unread,
Apr 12, 2016, 5:25:20 PM4/12/16
to e-p...@googlegroups.com
David,

First, a correction -- I said earlier, "all output using WritePort or
OnsetSignal succeeds, no matter how we run those programs", but that was
wrong. In our tests with WritePort or OnsetSignal, we got complete
failure of output to the parallel port when we ran the program using
E-Studio Test mode (ES-Test), although we got complete success when
running that program normally from E-Studio (ES-Run) or from E-Run. I
should have taken another look at my Excel summary worksheet before I
posted that.

So, thanks for writing back. Interesting that you got things to work by
setting PreRelease to 0. Task Events should really work with
PreRelease, but if it doesn't, then it doesn't. I would have tried this
myself today, but today we had trouble replicating the problem in the
first place. Indeed, in our first run using WritePort/OnsetSignal with
ES-Test, we got complete LPT output failure just as before. But all
later runs gave complete success, as did all our runs using Task Events.

So we are at a loss for the moment. The lab manager will run more
extensive tests here, focusing on the earlier failure modes of interest
(Task Events under E-Run). At least it turns out that the lab has
another similar system in the same room, so now we can run comparisons
between two systems. And PST Support is still working with me on this,
and I have brought their attention to this thread.


As to WriteByte, ResetBit, etc. ... We output a variety of changing
codes, so for Task Events we always use the WriteByte action with Custom
data, either a literal value or an attribute reference (e.g.,
"[MovieMarker]"). For resetting to 0, again I always just use
WriteByte, with a Custom value of 0. And we use paired Task Events on
each stimulus object of interest -- one with Delay 0 to output the
desired data, and another with Delay of, say, 20 to reset the output to
0. Very tidy when it works! (Oh, and I add "TE" to the name of any
object that uses Task Events so that I can identify them in my structure
-- e.g., "StimTEMovie" or "LptResetTEWait".)

Best,
-- David McFarlane
Reply all
Reply to author
Forward
0 new messages