2 with mates.Mates(
"proxy.mon", 1)
as m:
3 if m.discover_node(m.mates_dac5_mk1_2):
5 value = int((0.5 / 5.0) * 0x10000)
6 print(
"Setting raw DAC value: {0}".format(value))
7 m.set_dac_raw(m.mates_dac5_mk1_2, 39, value & 0xFFFF)
11 m.set_dac_raw(m.mates_dac5_mk1_2, 39, 0xFFFF + 1)
12 except mates.MatesException
as e:
13 print(
"Error setting DAC:")