set_relays_by_mask
Control up to 16 relays at once by providing a 16-bit mask. Each bit represents a relay, with 1 to activate and 0 to deactivate, enabling bulk state changes.
Instructions
按 16 位掩码批量设置继电器状态。掩码中 1=吸合, 0=断开,一次性设置所有回路。例如 mask=0x000F = 吸合第1-4路、断开第5-16路。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | Yes | 16 位掩码 (0-65535)。bit0=第1路, bit1=第2路, …, bit15=第16路。1=操作, 0=保持原状。 | |
| address | No | 设备地址/机器号 (1-254),即机器地址。可通过 scan_devices 自动发现,或用 list_devices 查看已注册设备。255为广播地址。 |