Skip to main content

GET_CHANNELS

Syntax​

GET_CHANNELS

Description​

Returns the number of channels in each row of the data stream. The value depends on the connected headstage (16 or 32 channels), on the limit set with SET_CHANNELS, and is fixed when SETUP is done. Use it before sizing arrays or channel loops.

Response​

CHANNELS <n>

Example​

get_channels.py
from hmcls_udp import Board

board = Board("192.168.1.11")
line = board.query("GET_CHANNELS")[0] # "CHANNELS 32"
print("Channels:", int(line.split()[1]))