MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_15.py
1 import mates
2 with mates.Mates("proxy.mon", 1) as m:
3  if m.discover_node(m.mates_dio3_mk1_1):
4  # Get hardware revision for the device from the DIR register.
5  dir = m.get_reg(m.mates_dio3_mk1_1, m.regs.REG_COMMON_DIR)
6  version = (dir >> 24) & 0xFF
7  print("Hardware version: MK{0}".format(version))