Skip to main content

GET_HEADSTAGE

Syntax​

GET_HEADSTAGE

Description​

Returns the state of the headstage connected to the board. The board checks for a headstage about once a second while acquisition is stopped; during an acquisition it detects a lost headstage from the data itself.

Response​

OK GET_HEADSTAGE state=<state> chip=<model> channels=<n>
FieldDescription
stateABSENT (nothing connected), DETECTED (connected, being identified), READY (identified), FAULT (connected but cannot be identified).
chipOpaque model identifier (do not rely on its value).
channelsNumber of channels of the headstage (0 until READY).

Changes are announced by EVT headstage … events.

If a headstage is lost or replaced during an acquisition, the acquisition is stopped automatically and SETUP must be done again.

Example​

get_headstage.py
from hmcls_udp import Board

board = Board("192.168.1.11")
hs = board.request("GET_HEADSTAGE")
if hs["state"] == "READY":
print(hs["channels"], "channels")
else:
print("headstage:", hs["state"])