Sending simultaneous triggers
OpenSesame version 4.1.9
Operating system Windows 10
Backend Expyriment
I hope this is a relatively straightforward coding question - I have to send triggers via a break-out box which is connected to the presentation PC's parallel port with a coax cable. The break-out box has 4 input ports, which I can use to send triggers with different codes. But I *think* the ports need to have Open Sesame triggers sent simultaneously to make different combinations, e.g., from the documentation:
Port 1 alone: Event number = 1
Port 1 and port 2 binary number: 3
Port 1 and port 3 binary number: 5
Port 1 and port 5 binary number: 9
I would like to test whether this is true anyway, but I'm not sure how to send triggers simultaneously from Open Sesame. My trigger set-up is this:
port = parllel.ParallelPort(address='0xD050')
port.setData(4)
port.readPin(2)
port.setPin(2,1)
def sendPP(trigger):
port.setData(trigger)
return;
sendPP(1) # works as expected, trigger = 1
To get a trigger labelled 3, I've tried sending:
sendPP(1,2) # error message, not the right syntax sendPP(1) sendPP(2) # not sure if this would be strictly simultaneous, or simultaneous every time, anyway no trigger is sent
This might not actually be an Open Sesame problem, but just trying to rule that out. Thanks for any tips!
Best,
Kate
Comments
Hi @stoney,
I'm not really familiar with this, but I think it's just a syntax or coding issue indeed. It does make sense that sendPP(1,2) throws an error, as your function only takes one argument. Have you tried sendPP(3)? I think it's equivalent to sendPP(1 | 2), which sounds like what you were trying to achieve with your two sendPP(1) and sendPP(2) lines but I'm not sure.
Also, careful but you forgot an 'a' in your line "port = parallel.ParallelPort(address='0xD050')"
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖