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
| Parameter | Type | Range | Description |
|---|---|---|---|
<n> | integer | 0 – channels of the headstage | Number of channels to acquire. 0 = all. |
Response
OK SET_CHANNELS limit=<n>
Errors
| Reply | Condition |
|---|---|
ERR SET_CHANNELS bad_arg | Missing argument, or n larger than the headstage channel count. |
ERR SET_CHANNELS running | Acquisition is running. |
ERR SET_CHANNELS busy | Another 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']