Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Sending triggers via C-Pod

edited May 2019 in OpenSesame

Hello all,

I have been working to try to sync triggers to a NIRx NIRSport system via the Cedrus C-Pod from Open-Sesame

I have initialized my experiment with an in-line script using the following lines

import pyxid
import time
print('loaded OK')
devices = pyxid.get_xid_devices()
print('device located')
assert len(devices) > 0
d = devices[0]
d.init_device()
d.set_pulse_duration(1000)

This code works perfectly in PsychoPy, and I am able to connect and send triggers (using the following code).

I then add an additional in-line script with the following code

d.activate_line(lines=[1])

to send the trigger.

I am aware that Cedrus requires an updated pyxid (available in their github account), and I have tried with and without the update. When the file is not replaced, a simple error arises stating the the get_xid_device function requires a string input rather than an integer for the port.

ValueError: "port" must be None or a string, not <type 'int'>

When the file is replaced, which basically changes the error line for

port = Serial(int) 

to

port = Serial('COM%d' %int)

the experiment fails to run I have checked and indeed ('COM%d' %int) is a string, which should satisfy the error.

Has anyone gotten triggers to send through a Cedrus C-Pod using Open Sesame?

I appreciate all the help that I could get.


Thank you,

Comments

Sign In or Register to comment.