BioSemi USB Trigger and E-prime

215 views
Skip to first unread message

Caitlin O'Riordan

unread,
Jul 5, 2023, 11:10:08 AM7/5/23
to E-Prime
Hi all, 

Our lab has recently upgraded our trigger cable for EEG experiments to a BioSemi USB trigger cable (https://www.biosemi.com/faq/USB%20Trigger%20interface%20cable.htm).

I have tested the trigger cable using a small piece of software called Termite, and the cable is working successfully to send triggers from the Stim PC to the Dig PC.

However, I have adopted an E-Prime experiment that was previously used with EEG, with the old cable. However, now it is not sending triggers. I am not familiar with E-Prime, so it may be a simple fix. I am using an older version of E-Prime, so task events are not available (2.0.8.90).

Things I've done so far;
1. Ensured that the new trigger cable is added to the experiment.
2. Ensured that the trigger cable properties (COM number, Baud Rate, etc.) matches the settings on Device Manager.

Things I'm unsure of;
1. The adopted EEG paradigm uses 888 in a piece of InLine code to communicate with the port. How do I know if the new cable is still 888? I have looked at the address in Device Manager and it says 0000000D?

The adopted script/paradigm should be up and running and just ready to go. What solutions can I try to get E-Prime to send triggers? 

Thanks, 
Caitlin



Caitlin O'Riordan

unread,
Jul 5, 2023, 11:13:03 AM7/5/23
to E-Prime
Also, I note the InLine script uses WritePort. I may be wrong, but I believe I have to use WriteByte with the serial port?
Do I just replace all instances of WritePort with WriteByte?

Connor De Coster

unread,
Jul 5, 2023, 3:46:50 PM7/5/23
to E-Prime
Hi Caitlin,

If you have the ability to update E-Prime 2, The latest version of E-Prime 2 Professional has Task Events which would be the preferred method to send triggers. Note that E-Prime 2 Standard does not have Task Events.

To answer your question, you are correct in replacing WritePort with Serial.WriteByte. It sounds like you have the correct Com port and Bits per second specified for the Serial device, so E-Prime should be sending bytes over with Serial.WriteByte.

-Connor

Caitlin O'Riordan

unread,
Jul 5, 2023, 4:44:40 PM7/5/23
to E-Prime
Hi Thanks for your prompt response.
To clarify, I have two screenshots here which is the code I presume is sending the EEG triggers. I have not included "EEGcode", which is a column in a trial list object.
Screenshot 1.
Screenshot 2.


How do I know the port is still 888?
Do I just change Writeport to Serial.WriteByte in the code in the second screenshot?
That doesn't seem to work.

Thanks, 
Caitlin

Connor De Coster

unread,
Jul 5, 2023, 6:52:08 PM7/5/23
to E-Prime
Hi Caitlin,

The images that you attached are not showing up. You could also copy and paste your Inline script here as text.

Instead of using an I/O port address (888) which the EEG Paradigm originally used, Biosemi wants you to use the virtual COM Port. The only thing you need to worry about is which COM Port the usb is plugged into, and if that matches the COM Port property of the Serial Device in E-Prime's Devices. The Serial Device in E-Prime must also have the bits per second set to 115200. I would recommend double checking in Device Manager which COM Port number the trigger cable is plugged into because if you plug the trigger cable into a different usb port, the COM Port will be different.

When you say that changing the Inline to Serial.WriteByte does not work, do you get an error or do the triggers not show up on the Dig PC?

-Connor
Reply all
Reply to author
Forward
0 new messages