Howdy, Stranger!

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

Supported by

Sending triggers to PyCorder by means of LabJack

Hey folks,

I'm wondering if anyone has tried to use a LabJack (U3 in our case) to send trigger codes to PyCorder?

The code that I have to crib off of provides no explanation of what it's doing, but essentially...

At the beginning, I have an inline script which imports & inits the labjack:

import u3

labjack = u3.U3()

labjack.configU3()

labjack.getFeedback(u3.LED(State=False))

That works fine, no errors thrown (I have try/excepts inserted that would tell me otherwise)

Later on, after presenting some stimuli, I have an in-line script which attempts to send the trigger:

trigger = var.cue_trigger_value

trigger = [trigger, 0, 0]

try:

labjack.getFeedback(u3.PortStateWrite(State = trigger))

except:

print "failed to send trigger"

Again, no errors thrown, and none of my debug statements print.

But, in PyCorder, where I would normally see a lablled tic for every trigger sent, nothing appears...

Anybody here with experience with this kind of setup that could point out what I'm missing here?

Thanks in advance,


BRett

Comments

  • Hi Brett,

    That is pretty specific, and hard for us to diagnose without having the mentioned devices at our disposal. Have you tried creating a simple python script outside of OpenSesame to see if you can establish a basic connection to PyCorder? That way we eliminate OpenSesame being a factor in this problem, because maybe it's a simple connection problem. It could even be a firewall which is blocking the connection?

Sign In or Register to comment.