I am working on an experiment involving 64 visual stimuli.
I want to send trigger signals that can be used to distinguish all 64 stimuli.
The challenge is that the device I am using only has 3 channels for trigger signals.
Thus, I need to use combinations of trigger signals to achieve 64 patterns.
I am trying to use different trigger signal durations where each trigger channel can send either 0ms, 200ms, 400ms, or 600ms of trigger signals.
I am using pyxid to send the trigger signals to StimTracker Quad using the following code:
if trigger == 1:
Since the code can only run serially, I am having difficulty sending triggers of varying duration simultaneously.
Does anyone have a solution to make it work as intended?
Thank you in advance.
You won’t be able to send triggers simultaneously using this approach because StimTracker Quad needs time to process the commands that you are sending it.
I am curious as to why you think you are limited to 3 bits. By default, you get 8 bits on all outputs (the three m-pods and the TTL Output). If you are using an m-pod, which specific model is it?
Thank you for your response. By device I meant MEG device to send the trigger signals to.
My apologies for the confusion, I may not have articulated my question clearly. Regarding m-pod, I am using m-pod with parallel port.
On m-pod for Parallel Port, you get 13 bits of output. Some devices can accept all 13 but some can accept only 8. Even if your MEG device can accept only 8 bits of input, this would still be sufficient to eliminate the need to vary the pulse duration, no?
Thank you very much for your response.
The device we are using only accepts 3 bits of input.
Hello Jion, with only 3 bits, you are facing a serious hardware limitation. I can see now why you want to use a time-based approach.
If you are going to pursue this method, I highly recommend that you use the ‘mx’ command instead of the ‘mp’ / ‘mh’ pair of commands. It is more flexible, lets you specify the duration on the fly, and allows independent output. It is described on our XID Commands page.
The ‘mx’ command was added in firmware version 2.2.5. If you have an earlier one, you need to update the firmware.
The ‘mx’ command is not yet supported in pyxid2 (make sure you are using pyxid2 and not the original pyxid).
We can add support for the ‘mx’ command in pyxid2 but not before a couple of weeks. If you cannot wait, there is a function in pyxid2 that lets you send commands directly:
# Note that not all XID commands are implemented in this library. You
# can send any arbitrary string to the XID device if you need one of the
# unimplemented commands, like so (second arg is return bytes expected):
I hope this helps.