I'm using Matlab to present stimuli for a series of experiments, and want to be able to precisely control the timing of their presentation based on external events. Previously I had been using TTL pulses through the parallel port, but that solution no longer works due to security updates which needed to be implemented by my university.
The script I was using for the trigger was as follows, using the daq legacy interface:
addline(digin, 0, 'in')
And the computer would idle when input was not received using:
This was embedded in a larger loop to show multiple stimuli. This solution worked very efficiently, so is there anything similar I could use if I purchased a USB device for the updated interface? Or is anyone aware of another simple solution, especially if I can use step voltage signals like TTL as the input? I'm using these commands in conjunction with psychtoolbox. Thank you!