Skip to main content

ZCHECK_SCAN

Syntax​

ZCHECK_SCAN

Description​

Measures the impedance of every acquired channel at 1 kHz, one after the other. Acquisition must be stopped. The scan takes several seconds; the board state is busy meanwhile, and the lines are sent to the PC that sent the command as the measurements complete.

The results also feed the impedance page of the device screen, and the heat map of the HMCLS app.

Response​

ZCHECK_SCAN_BEGIN
Z <ch> <value> kOhm
Z <ch> ERR <code>
...
ZCHECK_SCAN_END

One Z line per channel: the value in kΩ, or ERR with a code when that channel could not be measured.

Errors​

ReplyCondition
ERR ZCHECK_SCAN runningAcquisition is running. Send STOP first.
ERR ZCHECK_SCAN busyAnother operation is in progress.

Example​

zcheck_scan.py
from hmcls_udp import Board

board = Board("192.168.1.11")
board.request("STOP")

values = {}
for line in board.query("ZCHECK_SCAN", timeout=3.0):
parts = line.split()
if parts and parts[0] == "Z" and parts[2] != "ERR":
values[int(parts[1])] = float(parts[2])

print(len(values), "channels measured")