Skip to main content

SET_CHANNELS

Syntax​

SET_CHANNELS <n>

Description​

Limits the acquisition to the first n channels. 0 removes the limit: all channels of the connected headstage are acquired. Fewer channels means smaller datagrams and less processing.

The new channel count takes effect at the next SETUP, which invalidates the current one: send SETUP again before START.

Parameters​

ParameterTypeRangeDescription
<n>integer0 – channels of the headstageNumber of channels to acquire. 0 = all.

Response​

OK SET_CHANNELS limit=<n>

Errors​

ReplyCondition
ERR SET_CHANNELS bad_argMissing argument, or n larger than the headstage channel count.
ERR SET_CHANNELS runningAcquisition is running.
ERR SET_CHANNELS busyAnother operation is in progress.

Example​

set_channels.py
from hmcls_udp import Board

board = Board("192.168.1.11")
board.request("STOP")
board.request("SET_CHANNELS 16")
board.request("SETUP", timeout=5.0)
print(board.query("GET_CHANNELS")) # ['CHANNELS 16']