i am trying to understand how to manage XID mode under Presentation.
Few examples of the necessary code would be of great help. Could anyone provide even a short example?
Besides, in case of use of the BB in the ASCII mode, what kind of RT accuracy should I expect?
I can’t offer any advice managing XID code under Presentation because I don’t have any Presentation programming experience, but the ASCII mode would certainly be a lot easier to program for than XID mode as you only have to look for a byte when a key is pressed. In XID mode, you would have to look for 6 bytes and decode them every time a key is pressed or released.
As for RT accuracy, it is dependent mainly on the USB driver, but you can expect something around a few milliseconds. XID mode is more accurate only because the responses are time-stamped by the RB-730.
“As for RT accuracy, it is dependent mainly on the USB driver, but you can expect something around a few milliseconds”. The phrase “a few miliseconds” is a bit vague. Could you be any more specific?
Also, would you expect a delay delay that is consistent over time/key presses, or is there some variance?
The delay is in the order of about 5 milliseconds, and unfortunately, is not constant. The reason I’m a little vague about it is because we have not found a reliable way to measure it.
However the USB driver is provided by cedrus, so should be always the same… isn’t it?
Or actually cedrus provides only the usb to serial driver?
Furthermore do you have any advice for the settings of the USB-serial port? I did not find anything in the manual.
Finally how can we have a hint about the delay in our system? The testing procedure in XID mode could be an option? Anything simpler?
The USB driver is not interrupt driven. It “polls” the input, i.e. it checks to see every few milliseconds (5, I think) if there is input. We mitigate that in XID mode by time stamping the responses that are sent.
Regarding the USB-serial port setting, I can’t think of anything that needs to be set. Let me know if I missed something.
The testing procedure in XID mode tests can only measure how long a roundtrip takes between the computer and the XID device.
If this is the case then also using XID mode produces in the end rather inaccurate timing estimates(with an overall resolution definitively > 1ms). It just moves the inaccuracy from the button press side to the synchronization between the timer of the presentation pc and the bbox.
To make it clear I quote a reply from the presentation forum http://www.neurobs.com/chatter_box/view_thread?id=5389
Stimulus onset is recorded by Presentation at the moment that the active stimulus is presented. There may be a lag between this time and the moment the button box receives the “e5” code sequence. Furthermore, there may be a lag between the time that the button is pressed and the “k” code is received by Presentation. Ideally the reaction time would be the difference between the stimulus onset time in Presentation and the time of the button press recorded by the button box. As it is, however, there is no way to determine this difference. I would use the reaction time given by Presentation as it is more conservative and encompasses the reaction time given by the button box. You could also use the the reaction time from the button box to establish an uncertainty for the reaction time.
It looks like that the situation for the XID protocol is not so different from what happens when using the ASCII protocol.
We always remain with the uncertainty of about 5 ms due to the serial/USB transfer. In XID the inaccurate transfer is for the “e5” code, in ASCII for the button press itself.
Am I right?
As a possible improvement, would it be possible to implement an “ultrapolling” driver for the usb? For example: http://www.razerzone.com/gaming-mice/razer-copperhead
Any other advice for improving timing accuracy and getting nearer to the 1ms resolution?
would it be possible to obtain a comment by cedrus on the questions of the preceding message?
i’m still uncertain about what time resolution i can get from the bbox using presentation. a clarification/confirmation on those questions would help.
would it be possible to obtain a comment by cedrus on the questions of the preceding message?
i’m still uncertain about what time resolution i can get from the bbox using presentation. a clarification/confirmation on those questions would help.
thanks!
carlo[/QUOTE]
Yes – I second Carol’s request – I’m having trouble with this too.
Carlo, you are largely correct. The resolution on sending might be lower than 5 msec; all I’m saying is that we haven’t found a way to measure it reliably. We’ll look into better drivers.