unreliable communication and triggering
thanks, I now have managed to communicate successfully with the response pad across the USB port using XID and using all the commands I need (switching to general purpose mode, setting the lines to input mode to allow external trigger, resetting the reaction timer, detecting and reading external trigger and button events).
However almost every one of these functions is very unreliable, even though I always insert code to wait for 100 ms after each command or trigger event. For instance, often when I send the command ‘a10’ to switch the response pad into General Purpose mode and then ask the box what mode it is in (’_a1’) it tells me it has not switched. Usually after a few more tries it works, but sometimes up to 10 tries are needed. For every single message I send to the response pad, I have to build a loop into my code where I check for success and then try again and again when it occasionally fails. However, these problems are only time-consuming annoyances, requiring me to write dozens of lines of code for error checking and testing, but not show-stopping for my experiments.
The show-stopper is that the pad has about a 5% failure rate for detecting the trigger I send into it when that trigger is part of a stream of repeated triggers.:mad:
I have done extensive tests sending in an external trigger every 200 ms, or every 700 ms for several seconds. The button box usually records each trigger accurately with an accurate timestamp. However 5-10% of the time no event is registered by the pad in response to the input line trigger. I have done no tweaking of the ‘bounce’ interval but presume this wouldn’t be an issue for inter-trigger intervals of many hundreds of milliseconds like I am using. Am I going to have to give up on the response pad as a timer for several precisely-timed triggers in a row? Is it possible I am doing something wrong? It seems unlikely since I am doing exactly the same thing in my code many times, and only occasionally these randomly creates a failure. Because the trigger is from a photocell, I can see with my own eyes that each of the triggers is actually occurring. Will this (and the annoying difficulties referred to earlier) be fixed and if so, how soon? I see that the MATLAB-using psychtoolbox people have also reported unreliability in their tests (http://docs.psychtoolbox.org/CedrusResponseBox)