I am migrating my experiment code from MATLAB over to Python and from Psychtoolbox -> PsychoPy. I have run into an issue where the LabJack is only sending the trigger ‘1’ all the time.
This same issue was raised in a post I found back in 2016 by Thomas Bullock in this post:
He had this test code (that I’ve changed in very minor ways) and reported the same problem. A response to his post was to use address 6700. That didn’t work for him (it didn’t send any triggers) and the same thing happened to me. He then went on to say that using address 6701 did work for him. However, unfortunately when I tried that solution, it didn’t work for me. I still see only 1s for every value.
import psychopy, time from psychopy.hardware.labjacks import U3 p_port = U3() # initial set port to zero byte=0 p_port.setData(byte, endian='big', address=6701) #6008 for loop_byte in range(1,50): time.sleep(.1) # wait between triggers p_port.setData(loop_byte) # send trigger print loop_byte # print to output #close labjack p_port.close()
I am using Python 2.7 (for pylink reasons), psychopy version is 3.0.4. I’m on Windows 10 and using Coder interface (is that what you just call scripting / not using Builder? If so, that’s what I am doing).
The LabJackPython version I installed was the latest one from today, LabJackPython 2.0.0.
Is anyone able to give a hint on what might be going wrong here?
Many thanks in advance