Hi Cassandra,
We have a biosemi. There are two things people seem to trouble with:
· Send a 0 after writing a byte to the parallel port – otherwise bits 01 followed by 10 is read as 11 (see The E-Primer). This can be done nicely with delays in the task events, or, by writing
Writeport 888, 0
Sleep 10
Writeport 888, 1
---- followed by the stimulus presentation. This means, by the way, that the sending of the byte is always before the stimulus, not at stimulus onset. But for EMG mimicry, this hardly matters (the onset is quite variable, see https://www.sciencedirect.com/science/article/pii/S0301051117300029 )
· Note that due to pre-release, the code of any inline following a stimulus with pre-release is already executed, possibly long before you expect this. This can be avoided using task-events, or setting the onset of stimuli to trigger sending a byte at the start of the trial. A quick introduction can be found here: http://cognitology.eu/?p=102
Best,
Michiel
--
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/91c54127-06ea-4929-9a69-cbd716ee8491%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cassandra,
You’re welcome!
Are you looking at the slide properties or some of the sub-object properties? Make sure, when you click on the properties, you have the correct ones (the ones that also have duration, logging, and so on), and not the sub-object property pages. In EP2, that’s the white, top-left, not the green, top middle, icon.
If you still use E-Prime 1: wow! You won’t have Task events, but you can still use the classic way:
1) Define a variable in the global script, such as
Dim outport as integer
outport = &H378 ‘I think that’s the same as your 888
beginning of trial procedure, add inline:
Stim.OnsetSignalEnabled = True
Stim.OnsetSignalPort = outport
Stim.OnsetSignalData = c.GetAttrib("TriNo")
Where Stim is the name of the object, and TriNo references an attribute in the triallist having 1/2/3 for you, depending on the condition.
After the Stim, make sure you add another inline:
Writeport Outport, 0
Which sets the parallel port to 0 again.
If you have E-Prime 2 but have a really ancient version: update it! The latest one, OTOH, is 2.0.10.356. The IT here also does not want to install it, but it’s free and it fixes many bugs.
If you have E-Prime 2, but standard rather than pro – I think that version might not have Task Events? In that case, see the explanation above.
If you have E-Prime 3: it should be fine.
“Also, we set the prerelease to 0, does this help with prerelease problem? Or should we do more?”
è It should help but it won’t necessarily fix everything. Make sure you read the documentation on prerelease to understand how it works!
By the way, in your code:
If c.GetAttrib("code")= "3" Then writeport 888,3
(for EMG) writeport 888, 0
writeport 888,1
writeport 888,2
writeport 888,3
May mean that just “3” is recorded by the amplifier. That is, if you send 1/2/3 in quick succession (ca 1 ms), it’s unlikely to capture them all. So if you do need to send 1, then 2, then 3, use something like:
writeport 888,1
sleep 5
writeport 888,0
sleep 5
writeport 888,2
sleep 5
writeport 888,0
sleep 5
writeport 888,3
sleep 5
writeport 888,0
sleep 5
Perhaps that’s a bit more than strictly necessary, but it’s better to be sure at this stage than having to wonder later on.
Hope that helps!
Best,
Michiel
--
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/1fd90b84-244f-47b3-96e9-383126b6ff5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@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/1fd90b84-244f-47b3-96e9-383126b6ff5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@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/078801d3e7b1%24a63bf050%24f2b3d0f0%24%40hope.ac.uk.
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/1fd90b84-244f-47b3-96e9-383126b6ff5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
Dear Cassandra,
I think you will really have to be more explicit with what you are trying to achieve – and not from your point of view, but from someone who’s absolutely not knowing what you are doing. So, you have what exactly in your procedure?
[inline1]
[black]
[Slide1]
The black.run indicates that an object, with the rather uninformative name black, will be run from within the script. I don’t think that is a good idea in terms of timing accuracy and transparency of code. Just insert it onto the timeline. I get that you’re working by hacking another’s script, so to speak, but it’s probably best to just break it and start from there.
The problem is that you will probably want to use Slide1 to have as onset data a signal based on Codeg and codea, yes? So the whole IF statement part is redundant.
Instead:
Slide1.OnsetSignalEnabled = True
Slide1.OnsetSignalPort = outport
Is okay…
Slide1.OnsetSignalData = c.GetAttrib("codeg") And c.GetAttrib("codea")
Is not. The AND is a logical indicator, not a way of concatenating variables.
I would use
Slide1.OnsetSignalData = c.GetAttrib("codeg") & c.GetAttrib("codea")
But just to be sure, it may benefit to cast the numbers explicitly to strings and then combine them
Slide1.OnsetSignalData = cstr(c.GetAttrib("codeg")) & cstr(c.GetAttrib("codea"))
But of course you want to send a number, not a string, so:
Slide1.OnsetSignalData = cint(cstr(c.GetAttrib("codeg")) & cstr(c.GetAttrib("codea")))
Now, Slide1 will send, at onset, the value. FOLLOWING Slide1 (I mean after the object on the timeline, add a new inline), just do the single writebyte:
Writeport Outport, 0
…and get rid of the Black.run.
Second: I would open the file you have with the background in MSPAINT (start, run, mspaint). Make it a BMP instead of JPG (jpg compresses images and what looks like black becomes a different colour). Select (magic wand) the background you want to have, and use to fill tool to change it entirely to, say, blue. Then use blue as a source key instead.
Best,
Michiel
(procrastinating instead of marking)
--
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/078801d3e7b1%24a63bf050%24f2b3d0f0%24%40hope.ac.uk.
For more options, visit https://groups.google.com/d/optout.
--
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/92a040aa-0e77-4a11-8161-e6a4c4b0bea0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi everyone,
Hi Cassandra,
No problem!
You’re correct, the colours in E-Prime are not necessarily the same as those in Windows. This is because a “pure red” that looks as red as red can be has a dash of yellow (see https://www.youtube.com/watch?v=8c-qbGgEAEI ).
That said, you can find out the exact RGB values by going in MSPAINT and clicking Edit Colours. See the red/green/blue values there and use the same in E-Prime for the source colour. I attach an example here, should that be helpful.
Best,
Michiel
From: e-p...@googlegroups.com [mailto:e-p...@googlegroups.com] On Behalf Of Cassandra Bunschoten
Sent: 09 May 2018 19:48
To: E-Prime <e-p...@googlegroups.com>
Subject: Re: Sending signals to biosemi
Hi Michiel,
--
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/f393304d-fb4e-418d-9159-bebac19f84b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
