MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_11.py
1 import mates
2 with mates.Mates("proxy.mon", 1) as m:
3  if m.discover_node(m.mates_dac5_mk1_2):
4  # Set DAC voltage to 1 V if digital input is 0 or
5  # to 2 V if the digital input is 1.
6  if not m.get_din(m.mates_dio3_mk1_1, 0):
7  m.set_dac(m.mates_dac5_mk1_2, 0, 1.0)
8  else:
9  m.set_dac(m.mates_dac5_mk1_2, 0, 2.0)