CereStim API - groupStimulus

CereStim API - groupStimulus

groupStimulus is a fairly useful command in Cerestim APIs, that is described on page 44 of the IFU attached below:
https://blackrockneurotech.com/research/wp-content/ifu/LB-0900_2.00_CereStim_API_IFU.pdf

groupStimulus allows the end user to send stimulations on multiple channels at once, using only a single command. Since this command is only a single line, it significantly reduces the latency required to program the Cerestim while still maintaining a high number of stimulations.
A comparison of what groupStimulus can do vs how it would appear as separate commands is below:
beginGroup()
autoStim(1,1)
autoStim(2,2)
autoStim(3,3)
autoStim(4,4)
endGroup()
Versus using groupStimulus:
groupStimulus(1, 1, 1, 4, [1, 2, 3, 4], [1, 2, 3, 4])
Since groupStimulus only takes one line and ~6ms to program, versus each autoStim taking it's own line and ~4ms, we cut down from roughly 16-20ms of latency to only 6ms.

Attached to this KB article is a MATLAB stimMEX script that demonstrates a few more uses for groupStimulus, including running groupStimulus on a 10ms looping delay, and running groupStimulus back-to-back to verify the programming time for two stimulation attempts.